“ASP.NET网站管理工具安全性”选项卡显示错误1802

时间:2021-01-12 03:17:34

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

我正在关注此演练:http://msdn.microsoft.com/en-us/library/879kf95c(VS.80).aspx

In a machine running vista ultimate, I have installed:

在运行vista ultimate的机器上,我安装了:

  • IIS
  • SQL Server Express 2005
  • SQL Server Express 2005

  • Visual Studio 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.

我创建了一个新网站,我可以通过http://127.0.0.1访问它,但我想学习创建一个登录并拥有用户会员资格。

When I get to the tutorial step:

当我进入教程步骤时:

To create a membership user

创建成员资格用户

  1. On the Website menu, click ASP.NET Configuration.
  2. 在“网站”菜单上,单击“ASP.NET配置”。

  3. Select the Security tab, ...
  4. 选择安全选项卡,...

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...

以下消息可能有助于诊断问题:执行SQL文件“InstallCommon.sql”期间发生错误。 SQL错误号为1802,SqlException消息为:CREATE DATABASE失败。无法创建列出的某些文件名。检查相关错误。尝试打开或创建物理文件'C:\ INETPUB \ WWWROOT \ MEMBERSHIP \ APP_DATA \ ASPNETDB_TMP.MDF'时,CREATE FILE遇到操作系统错误5(访问被拒绝。)。创建ASPNETDB_9b571c52c35b447ab7947888fa99b6b8数据库...

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

为什么?我以管理员身份运行visual studio。 (右键单击“以管理员身份运行”选项)。

3 个解决方案

#1


Ok here is what fixed it:

好的,这是修正它的原因:

1)

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

    转到控制面板 - >程序和功能 - >打开或关闭Windows功能。

  • checked "windows authentication" here:

    在这里检查“windows authentication”:

screencap http://i44.tinypic.com/20pop1.png

2)

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

    我去了控制面板 - >管理工具 - > Internet信息服务(IIS)管理器

  • Selected my webapp in the tree to the left.

    在左侧的树中选择我的webapp。

  • Selected "authentication" under IIS

    在IIS下选择“身份验证”

  • Enabled "windows authentication"

    启用“Windows身份验证”

#2


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

也许c:\ inetpub \ wwwroot \ membership \ app_data \是只读的

#3


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

这个答案和其他研究帮助我实现了这个目标。我在这里详细总结了这些步骤http://www.yart.com.au/Resources/Programming/ASP-NET-Security-Doesnt-Work.aspx

#1


Ok here is what fixed it:

好的,这是修正它的原因:

1)

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

    转到控制面板 - >程序和功能 - >打开或关闭Windows功能。

  • checked "windows authentication" here:

    在这里检查“windows authentication”:

screencap http://i44.tinypic.com/20pop1.png

2)

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

    我去了控制面板 - >管理工具 - > Internet信息服务(IIS)管理器

  • Selected my webapp in the tree to the left.

    在左侧的树中选择我的webapp。

  • Selected "authentication" under IIS

    在IIS下选择“身份验证”

  • Enabled "windows authentication"

    启用“Windows身份验证”

#2


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

也许c:\ inetpub \ wwwroot \ membership \ app_data \是只读的

#3


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

这个答案和其他研究帮助我实现了这个目标。我在这里详细总结了这些步骤http://www.yart.com.au/Resources/Programming/ASP-NET-Security-Doesnt-Work.aspx