asp.net 2.0网站部署iis 6

发布于 2024-12-29 21:17:16 字数 843 浏览 0 评论 0原文

我开发了一个 ASP.Net 2.0 网站(使用 VS 2008)。该网站使用 sqlmembershipprovider 和authentication mode = "Forms"

当我在 IIS 6 (Windows server 2003 R2) 上部署该网站并尝试浏览它提供的 .aspx 文件时

"The webpage cannot be found HTTP 404" 

,当我浏览同一目录中的 .html 文件时,它给

"You are not authorized to view this page You do not have permission to view this directory or page using the credentials that you supplied." 

我授予了 wwwroot 文件夹上几乎所有可能的用户的权限和网站文件夹
1.asp.net机器帐户(完全控制)
2. IIS_WPG(读取和执行、列出文件夹内容、读取)
3。互联网访客帐户 (IUSR_MachineName)(完全控制)
4。网络服务(读取和执行、列出文件夹内容、读取)
5。系统(完整控制)
6. 用户(读取和执行、列出文件夹内容、读取)

还允许 ASP.NET v2.0.50727 Web 服务扩展。在我网站的目录安全(身份验证和访问控制)中,我只选择了集成 Windows 身份验证。选择默认应用程序池,其中具有“网络服务”作为应用程序池标识。.

我陷入了困境,非常感谢你们帮助我......

PS:我已经搜索了很多有关我的问题的信息,但找不到有效的解决方案:(

I have developed an ASP.Net 2.0 website (Using VS 2008). The website uses sqlmembershipprovider and authentication mode = "Forms".

When i deploy the site on my IIS 6 (Windows server 2003 R2) and try to browse the .aspx files it gives

"The webpage cannot be found HTTP 404" 

and when i browse .html file in the same directory it gives

"You are not authorized to view this page You do not have permission to view this directory or page using the credentials that you supplied." 

I have given rights to almost every possible user on wwwroot folder and the website folder
1. asp.net machine account (full control)
2. IIS_WPG (Read & Execute, List Folder contents, Read)
3. Internet Guest Account (IUSR_MachineName) (Full control)
4. Network Service (Read & Execute, List Folder contents, Read)
5. System (Full cotnrol)
6. Users (Read & Execute, List Folder contents, Read)

ASP.NET v2.0.50727 web service extensions are also allowed. In the directory security(authentication and access control) of my website i have only selected integrated windows authentication. default application pool is selected which has "network service" as application pool identity..

I am badly stuck and will be very grateful to you guys for helping me out...

PS: I have searched a lot about my problem but couldn't find a working solution :(

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

递刀给你 2025-01-05 21:17:16

我认为您的安全设置设置错误。

  • 如果您仅在 IIS 中设置集成 Windows 身份验证,那么您应该在 ASP.NET Web 应用程序中将身份验证方法设置为 Windows。

  • 如果您想使用 Forms 身份验证,则应在 IIS 中启用匿名访问,并且不应选中 Integrated Windows 身份验证。在 MSDN 上,您可以看到以下内容:

由于表单身份验证不依赖于 IIS 身份验证,因此如果您打算在 ASP.NET 应用程序中使用表单身份验证,则应在 IIS 中为应用程序配置匿名访问。

I think you set security settings wrong.

  • If you only set Integrated Windows authentication in IIS then you should set your authentication method to Windows in your ASP.NET web app.

    <authentication mode="Windows">

  • If you want to use Forms authentication then you should Enable anonymous access in IIS and should not check Integrated Windows authentication. On MSDN you can see this:

Because forms authentication does not rely on IIS authentication, you should configure anonymous access for your application in IIS if you intend to use forms authentication in your ASP.NET application.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文