webconfig代码如下:
<authentication mode="Forms">
<forms loginUrl="~/Login.aspx" timeout="2000"/>
</authentication>
<authorization>
<deny users="?"/>
<allow users="*"/>
</authorization>
<customErrors mode="RemoteOnly" defaultRedirect="Error/Error.aspx">
<!--<error statusCode="403" redirect="Error\\403.htm" />
<error statusCode="404" redirect="Error\\404.htm" />
<error statusCode="500" redirect="Error\\500.htm" />-->
</customErrors>
为什么加上 <deny users="?"/>
<allow users="*"/>
页面就错位了!
<authentication mode="Forms">
<forms loginUrl="~/Login.aspx" timeout="2000"/>
</authentication>
<authorization>
<deny users="?"/>
<allow users="*"/>
</authorization>
<customErrors mode="RemoteOnly" defaultRedirect="Error/Error.aspx">
<!--<error statusCode="403" redirect="Error\\403.htm" />
<error statusCode="404" redirect="Error\\404.htm" />
<error statusCode="500" redirect="Error\\500.htm" />-->
</customErrors>
为什么加上 <deny users="?"/>
<allow users="*"/>
页面就错位了!
解决方案 »
- 请教高手,错误:请求因 HTTP 状态 401 失败:Unauthorized
- 在线急等!!!!
- 初学.net,请问各位如何打开别人的三层结构代码源文件
- 这样的查询效率正常吗?欢迎各位大峡发表宝贵意见
- dll的兼容问题
- javacript中的window.showModalDialog里的输入参数怎么用C#来得到
- 找不到Microsoft Access Drvier ODBC安装程序驱动
- 在vs.net里如何编辑datagrid
- js是否无法对大的函数进行循环调用啊?
- Web Service 怎样返回信息。。。。。。。。。。。
- 请推荐一个软件开发方面的培训计划吧
- 遇到了奇怪的事,LinkButton Enable="Flase"了还能弹出提示!!
因为你的权限也 禁止了文件夹的读
在你的文件夹 里面新建 Web.config
然后写代码
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</configuration>这样绝对没问题了
<allow users="*"/>-----> <allow users="*"/>
<deny users="?"/>
<location path="允许匿名访问的文件夹名称或者文件路径">
<system.web>
<authorization>
<allow users="?"/>
</authorization>
</system.web>
</location>