December 29, 2006

Ses Yalitimi

Nasıl ses yalıtımı yapılabilir?
  • Ses yalıtımı için duvarlar akustik alçıpan panellerle kaplanmalı.
  • Panellerin duvara montajı alüminyum profillerle yapılmalı.
  • Duvar ile paneller arasında 5cm kalınlığında camyünü kullanılmalı.
  • Ses yalıtımına takviye çok amaçlı kumaş estetik renk uyumlu panolar kullanılmalı

December 27, 2006

Enabling anonymous access in WSS 3.0

Two steps:
  1. Enable anonymous access in Central Administration > Application Management > Authentication Providers
  2. Enable anonymous access in Site Settings > Permissions > Anonymous Access

December 20, 2006

Working offline in TFS

In Microsoft's new team colloboration tool working offline is not well supported. You have to use some command line utility to get it work as it was in Visual Source Safe.

If you happen to lose your connection during a VS2005 session, you are lost. You should restart it. And after that restart you can have the option to work in disconnected mode.

Then you write some code, change some files, delete some of them and return back to office. Then you start your VS2005 instance and what do you see??? The vs2005 automatically checks in your files!!! Does it ask anything? NO. Any warnings? NO.

What you should do is download a team foundation power toy utility called tfpt. This was used to be a part of vs2005 sdk but is now available as a seperate download. After installation, change your PATH environment variable to include C:\Program Files\Microsoft Team Foundation Server Power Toys. Now haveing installed tfpt (not tftp!!!) , open command prompt and navigate to your solution directory where .sln file is located. Execute tfpt online, enter your domain user name and password and see the list of files and some checkboxes indicating the changed items. If you choose "Pend Changes" your files are automatically checked out and wait for you to checkin. That's all. Just remember to do these prior to starting your visual studio.

The main content of this blog entry taken from here.
Team Foundation Power Toys download site.

December 15, 2006

WPF/E

WPF/E ( Windows Presentation Foundation/Everwhere) community edition is out. I have looked at the samples although you need to download a plugin, the demo applications look promising. The plugin lets you see the XAML content .

December 13, 2006

Enabling forms authentication in Sharepoint 2007 or WSS 3.0



9.4.1 Create forms authentication database
You can do this by running aspnet_regsql and choosing the database to configure for aspnet forms authentication
9.4.2 Create users
You can accomplish this by creating a simple web site in VS 2005 and configuring it for forms authentication.
Run asp.net configuration tool

9.4.3 Change application name if necessary
You can do this using sql server management studio express.
Navigate to your portal authentication database and choose table Applications and change the column applicationName.
9.4.4 In sharepoint site edit machine.config file
Be sure that the provider sections for authentication and role management uses the same application name as forms authentication database application name
Edit LocalSqlServer connection string for custom authentication database connection
9.4.5 In sharepoint administration change authentication provider
Navigate Central Administration > Application Management > Authentication Providers
choose forms authentication
Edit Membership Provider Name
Fill with AspNetSqlMembershipProvider
This entry is defined in machine.config file located in c:\windows\Microsoft.Net\(2.0 framework directory)
This is the place where machine wide configuration information is kept.
Edit Role Manager Name
Fill with AspNetSqlRoleProvider
This entry is defined in machine.config file located in c:\windows\Microsoft.Net\(2.0 framework directory)
This is the place where machine wide configuration information is kept.
9.4.6 Change site administrators
Navigate to Central Administration > Application Management > Site Collection Owners
Choose the users you have created
9.4.7 Execute a iisreset command on sharepoint server machine
9.4.8 Restart your browser

December 11, 2006

Enabling versioning on documents

WSS 3.0 does not initially come with document versioning as Office 2007 Server does. You should enable it, this is how:

  1. Open your site (eg.http://sp2007test/default.aspx)
  2. Click on Site Actions -> Site Settings
  3. Under Site Administration click "Site Libraries and Lists"
  4. Click the "Customize ..." link to customize your library.
  5. Click Versioning Settings
  6. Choose the appropriate options you like.

That's it.Now you should see the "Version history" option in the document drop down list.

Sharepoint Essential Sites

WSS 3.0 SDK
http://msdn2.microsoft.com/en-us/library/ms472057.aspx
Workflow development blog series http://blogs.msdn.com/sharepoint/archive/tags/Workflow/default.aspx
WSS 3.0 Demo(will launch a video)
http://office.microsoft.com/assistance/asstvid.aspx?assetid=ES102055641033&vwidth=884&vheight=540&type=mediaplayer&CTT=11&Origin=HA102055631033
Developer Site
http://msdn2.microsoft.com/en-us/sharepoint/default.aspx

Sharepoint Blog Series

I am currently evaluating Microsoft Windows Sharepoint Services 3.0 (WSS 3.0) as a base for a portal project. I will try to share the difficulties I have come across and the solutions I managed to find. Hope it helps newbies like me.

November 02, 2006

Hotspot Software

For a project setup I have compiled some hotspot software.Here they are if you happen to find google not enough:

I have evaluated publicip.net which is a free service. You download an iso and there is a simple setup process which requires box with two ethernets ,USB port, and an Access Point. No hard drive is required as of the of this post. All configuration is stored in USB and you configure your hotspot server from the publicip.net website. This is somehow awkward but this is how they make money if you need advanced services.

http://www.publicip.net/
http://www.patronsoft.com/firstspot/
http://www.amazingports.com/web60/en/freespot.jsp
http://www.mywifizone.com/news2.asp
http://www.lessnetworks.com/
http://www.spotngo.ca/
http://www.mikrotik.com/docs/ros/2.9/ip/hotspot
http://www.smoothwall.co.uk/
http://www.astaro.com/
http://www.coyotelinux.com/
http://www.freesco.org/
http://www.ipcop.org/
http://leaf.sourceforge.net/
http://sourcesup.cru.fr/talweg/

October 19, 2006

Internet Explorer 7 is out.

Pros:

Rss support is nice.
Fast startup.
Supports google bookmarks plugin.

Cons:

It is hard to organize feeds and directories.
Tab support is not as good as firefox + tab mix plus.
Toolbar customziation support is not as good as firefox.

August 03, 2006

Two useful utils for windows xp configuration and repair

I have found two useful command line utils for configuring windows xp, sfc and msconfig.

sfc checks and repairs protected windows files , I have used it for repairing my messed up internet explorer 6. Use it like this;
Run -> sfc /scannow

msconfig is used for configuring windows startup programs , services and startup options.

May 29, 2006

Enabling DTC between xp service pack 2 and windows server 2003

I spent two hours on enabling some distributed transaction between my iis server and windows 2003 server running sql server 2005. Thanks to people on the net , I compiled the following links.

For enabling DTC:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=230390&SiteID=1
http://blogs.msdn.com/florinlazar/archive/2004/06/18/159127.aspx

Followed the instructions both on IIS server and Sql server boxes.

Dont forget to enable both firewalls for msdtc and sqlserver!

here is what they say:
First verify the "Distribute Transaction Coordinator" Service isrunning on both database server computer and client computers
1. Go to "Administrative Tools > Services"
2. Turn on the "Distribute Transaction Coordinator" Service if it is not runningIf it is running and client application is not on the same computer asthe database server, on the computer running database server1. Go to "Administrative Tools > Component Services"
3. On the left navigation tree, go to "Component Services > Computers> My Computer" (you may need to double click and wait as some nodesneed time to expand)
4. Right click on "My Computer", select "Properties"
5. Select "MSDTC" tab
6. Click "Security Configuration"
7. Make sure you check "Network DTC Access", "Allow Remote Client","Allow Inbound/Outbound", "Enable TIP" (Some option may not benecessary, have a try to get your configuration)
8. The service will restart
9. BUT YOU MAY NEED TO REBOOT YOUR SERVER IF IT STILL DOESN'T WORK(This is the thing drove me crazy before)On your client computer use the same above procedure to open the"Security Configuration" setting, make sure you check "Network DTCAccess", "Allow Inbound/Outbound" option, restart service and computerif necessary.On you SQL server service manager, click "Service" dropdown, select"Distribute Transaction Coordinator", it should be also running onyour server computer.

On client and server:
netsh firewall set allowedprogram %windir%\system32\msdtc.exe MSDTC enable

May 28, 2006

CMS Logbook 5 - Setting default role for anonymous users (part 2)

First of all, this is valid for asp.net only.
Here's the situation, I have some business logic that needs authorization. Yet the not logged in users should have some access defined with the role 'anonusers'. The problem is how the business logic (a seperate class library) gets the authentication info. As this is a web site with Forms Authentication I used HttpContext.Current field to get the authenticated user.

The business logic , uses a base class property namely CurrentUser to get the current user authenticated:


public IPrincipal CurrentUser
{
get
{
if (HttpContext.Current !=
null)
return HttpContext.Current.User;
else
{
GenericIdentity
defaultIdentity = new GenericIdentity("anonymous");
string[] roles = new
string[1];
roles[0] = "anonusers";
GenericPrincipal genericPrincipal
=
new GenericPrincipal(defaultIdentity, roles);
return
genericPrincipal;
}
}
}

As you see if there is no user found in the context, this returns a 'anonymous' principal.

By this way I can now unit test all the business logic.

Ankara'da Seracilik


Finike ve Antalya'nin seraciliktaki basarisini takiben ben de neden Ankara'da da seracilik yapmayalim dedim. Degerli belediye baskanimiz Melih Gokcek 'in Ankara'da gol ve musluk sayisini arttirmadaki azmi de bana ayrica bir guc verdi. Ben de ilk seracilik projemi balkonda gerceklestirdim.
Gerekli malzemeler:
Kalin tel
Mutfaklarda yiyecek sarmak icin kullandigimiz seffaf poset

Yapilis:
Teli bukerek bir sekil olusturun , icine saksiyi alabilecek kadar buyuk olsun, daha sonra seffaf ambalajla kaplayin .

Bakalim icerdeki cin biberi bu giysiyi nasil karsilayacak?

April 11, 2006

CMS Logbook 4 - Setting default role for anonymous users

For anonymous users, I had to define a default role. Thus I would have fine grained control on what they can do in the cms site without declaring a Deny All grant. The first solution for such a thing is defining a default formsauthentication ticket for every anonymous request , that is speaking for ASP.NET 2.0 global.asax file ;


void Application_AuthenticateRequest(Object sender, EventArgs e)
{
HttpApplication app = (HttpApplication)sender;

if (!app.Request.IsAuthenticated && app.Context.User == null)
{
FormsIdentity identity = new FormsIdentity(new
FormsAuthenticationTicket("anonymous", true, 5));
string role = "anonusers";

app.Context.User = new GenericPrincipal(identity,

new string[] { role }

);

}
}
This works but not a neat solution. I could not find a better solution on a built-in role definition for anon users so I have taken the following approach. In my CMS system all authorization requests are handled from a single business class , so I have changed it accordingly to define a default role for anon users, that is something like;
public
Authorizer():base()
{
SetupRoles(base.CurrentUser.Identity.Name);
}
public Authorizer(User user) : this(user.UserName)
{
}
public Authorizer(string username) : base()
{
SetupRoles(username);
}
private void SetupRoles(string username)
{
if (String.IsNullOrEmpty(username))
username = base.AnonymousUserName;
userroles = FindRolesOfUser(username);
}

March 30, 2006

CMS Logbook 3: Users and multiple roles in an application

In an application, when users are member of more than one roles some complications arise. This can be like;
  1. What is the user's default role when logged in? For example if the application customizes the user interface according to role, then what role will be picked up?
  2. If a user has some authorization grant for a role and a deny for another which will be taken into acccount?

For the question 1 , I think that a default role should be given for every user, and this should be used for view customization. For an ASP.NET 2.o application this could be stored in user profile.

For the question 2, I plan to take this approach, If user has at least one grant for an operation then it is sufficient for the authorization.

March 20, 2006

CMS Logbook 2 : Data from different angles

I have been working on a simple content management system for more than a month now and things are getting more interesting for me lately. What makes my simple content management system?(cms from now on).
  • Content is tree based.
  • Leaves can be containers or the content itself.
  • There are different kind of contents.
  • Some contents are approvable some are not.
  • There is an authorization system based on ASP.NET 2.0 Membership and Role Providers.
  • The authorization system is fine grained till the leaves.
  • The authorization system relies on user roles rather than individual users.
  • The authorization system consists of access rights as view, edit, delete, create new and list.
  • List stands for if the user has rights to list the children nodes of the node.
  • View stands for if the user has rights to view the content on the node.
  • Delete stands for if the has right to delete the node.(this operation undergoes a check for finding references for the content on the node)
  • Create New stands for if the user has right to add a new node to the current node. A new node will be automatically editable and deletable for the adding user.
  • Edit stands for if the user has right to edit the content on the node

March 15, 2006

CMS Logbook 1 : Ideas on implementing the authorization code for a content management system

I have been messing around with ASP.NET 2.0 authentication and authorization stuff lately and have come up with some essential sites:

ASP.NET 2.0 Membership, Roles, Forms Authentication
How To: Use Role Manager in ASP.NET 2.0
How to use Forms authentication with sql server 2005

The ASP.NET 2.0 provides some Membership API in order to ease the authentication and autohorization issues. You can set up a whole site with user creation, login, password change, password reset functionality without writing a single line of code.

My aim is to have some role-based restrictions for our simple content management system. On a tree based content the administrator will check , or uncheck some checkboxes for some user , thus authorize him/her for the content. The role management api provides me the functions like queriying the user for some specified role, but for some custom authorization requirement like below I have to write some code.

My business logic classes have to check if these exist:

  • The user has some right to edit content management system, speaking of which I am planning to implement as a standard role in Role Management Api.
  • The user has some right to edit the specified content node. Here I need a new database table to join the built-in roles and rights for that specified node, the database may have the columns like id, role_id, content_id, user_rights.

Thus for a user to do some operation on a content node he must a member of "content manager" role AND have the specific rights for the task.