Question

I'm following this walkthrough: http://msdn.microsoft.com/en-us/library/879kf95c(VS.80).aspx

In a machine running vista ultimate, I have installed:

  • IIS
  • SQL Server Express 2005
  • Visual Studio 2005

I created a new website and I can access it ok via http://127.0.0.1 but I want to learn to create a login and have user memberships.

When I get to the tutorial step:

To create a membership user

  1. On the Website menu, click ASP.NET Configuration.
  2. Select the Security tab, ...

I get this error:

There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.

The following message may help in diagnosing the problem: An error occurred during the execution of the SQL file 'InstallCommon.sql'. The SQL error number is 1802 and the SqlException message is: CREATE DATABASE failed. Some file names listed could not be created. Check related errors. CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file 'C:\INETPUB\WWWROOT\MEMBERSHIP\APP_DATA\ASPNETDB_TMP.MDF'. Creating the ASPNETDB_9b571c52c35b447ab7947888fa99b6b8 database...

Why? I'm running visual studio as administrator. (right-click "run as administrator" option).

Was it helpful?

Solution

Ok here is what fixed it:

1)

  • went to control panel -> programs and features -> Turn windows features on or off.

  • checked "windows authentication" here:

screencap

2)

  • I went to control panel -> administrative tools -> Internet Information Services (IIS) Manager

  • Selected my webapp in the tree to the left.

  • Selected "authentication" under IIS

  • Enabled "windows authentication"

OTHER TIPS

maybe c:\inetpub\wwwroot\membership\app_data\ is read-only

This answer and other research helped me get this working. I have summarized the steps in detail here http://www.yart.com.au/Resources/Programming/ASP-NET-Security-Doesnt-Work.aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top