views:

133

answers:

1

Hi All,

I'm using Cassini to run an ASP.NET app on a machine where I don't have access to IIS. I'm using Cassini for .NET 3.5. My website uses Windows authentication and when run on Cassini

User.Identity.Name

returns an empty string. I'm guess this does this because it is allowing anonymous access to my website. This is documented here:

http://support.microsoft.com/?id=306359

The fix for the problem is:

Change the authentication mode in the Web.config file to Windows as follows:

<authentication mode="Windows" />
  1. In the Internet Services Manager, right-click the .aspx file or the Web Project folder, and then click Properties.
  2. If you clicked Properties for the Web Project folder, click the Directory Security tab. 3. If you clicked Properties for the .aspx file, click the File Security tab.
  3. Under Anonymous Access and authentication control, click Edit.
  4. In the Authentication methods dialog box, clear the Anonymous Access check box, and then select either the Basic, the Digest or the Integrated (NT Challenge/Response) check box.

Cassini doesn't have a UI to do this, can anyone point me in the right direction to modify to Cassini sourse code such that it doesn't allow Anonymous Access?

I am using the version from this website: http://blogs.msdn.com/dmitryr/archive/2008/10/03/cassini-for-framework-3-5.aspx

A: 

You should be able to accomplish this by simply checking the 'ntlm authentication' box on the web property page of your project.

This will send a flag to the VS dev server to require windows authentication and in conjunction with you auth=windows config you should get what you want.

Sky Sanders