[英]blank asp.net site shows web.config error when i try to access it
I have created a blank asp.net website consisting of a blank default.aspx page, its .cs file, a login.aspx page and its .cs and a web.config. 我创建了一个空白的asp.net网站,其中包含一个空白的default.aspx页面,它的.cs文件,一个login.aspx页面及其.cs和一个web.config。 I'm looking to test .net authentication as seen in here on the MSDN site.
我正在寻找测试.NET认证在看到这里的MSDN网站。 I've copied everything as shown in the article.
我已经复制了文章中显示的所有内容。 I set up the site in IIS6 now when I go to the site I get the runtime error with the:
我现在在IIS6中设置了网站,当我访问网站时,我得到了运行时错误:
"To enable the details of this specific error message to be viewable on remote machines, please create a tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "Off"."
“要在远程计算机上查看此特定错误消息的详细信息,请在位于当前Web应用程序根目录中的”web.config“配置文件中创建一个标记。此标记应具有其”模式“属性设置为“关”。“
message. 信息。 when I add the customErrors mode="On" tag to the web.config I still get this error like its not looking at the web.config.
当我将customErrors mode =“On”标记添加到web.config时,我仍然会收到此错误,就像它没有查看web.config一样。 I've triple checked IIS and its definitely looking at the right site folder.
我已经三次检查IIS,它肯定会查看正确的站点文件夹。 Here's my web.config:
这是我的web.config:
<?xml version="1.0"?>
<configuration>
<system.web>
<customErrors mode="On"/>
<authentication mode="Forms">
<forms loginUrl="Logon.aspx" name=".ASPXFORMSAUTH">
</forms>
</authentication>
<authorization>
<deny users="?" />
</authorization>
<compilation debug="false" targetFramework="4.0" />
</system.web>
</configuration>
I usually set sites up through CMS installations. 我通常通过CMS安装设置网站。 This is the first time I've done one from a blank site in visual studio.
这是我第一次在visual studio的空白网站上做过一次。 Is there more you need to add to web.config?
是否还需要添加到web.config?
set 组
<customErrors mode="Off"/>
to see the actual error. 看到实际的错误。
You need to set 你需要设置
Not "On" to see the actual error with stacktrace. 没有“打开”以查看stacktrace的实际错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.