验证忽略默认文档 [英] Authentication Ignoring Default Document

查看:123
本文介绍了验证忽略默认文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天,我把从IIS6服务器我的应用程序到一个新的IIS7.5使用(在Windows Server 2008 R2)。

奇怪的是,虽然它在默认文档部分设置我无法访问默认的文档。该文件是deault.aspx当我尝试用IP我越来越HTTP访问的页面:// [IP] /login.aspx?ReturnUrl=%2f,但它工作正常,如果我直接访问它<。 / p>

这是从web.config中设置

 &LT;身份验证模式=表格&GT;
  &LT;形成保护=全部loginUrl =login.aspx的NAME =CookieName超时=49200requireSSL =FALSE/&GT;
&LT; /认证&GT;
&LT;授权&GT;
  &LT;拒绝用户= /&gt的帮助?
&LT; /授权&GT; &LT;位置路径=Default.aspx的&GT;
&LT;&的System.Web GT;
  &LT;授权&GT;
    &LT;让用户=*/&GT;
  &LT; /授权&GT;
&LT; /system.web>
&LT; /地点&gt;

我已经尝试过的一些被写在这里的建议来解决这个[<一个href=\"http://stackoverflow.com/questions/3824951/forms-authentication-ignoring-default-document\">Forms验证忽略默认文档]
,但没有运气。

我想通过某种方式配置服务器而不是应用程序来解决它。

感谢

SOLUTION

我不知道这是否是正确的,但我更改应用程序池的方式进入经典,而不是集成。


解决方案

添加下面的web.config中,它会允许您访问Default.aspx的,而不需要预先进行身份验证。其他所有的页面都需要验证。

 &LT;位置路径=Default.aspx的&GT;
    &LT;&的System.Web GT;
        &LT;授权&GT;
            &LT;让用户=*/&GT;
        &LT; /授权&GT;
    &LT; /system.web>
&LT; /地点&gt;

仅仅因为一个文件添加为IIS配置中的默认并不意味着它绕过了FormsAuthentication。

Today I moved my application from a server with IIS6 to a new one with IIS7.5 (windows server 2008 R2).

The odd thing is that I cannot access the default document although it has been set in the default documents section. The file is the "deault.aspx" and when I try to access the page with ip I am getting http://[IP]/login.aspx?ReturnUrl=%2f, but it works fine If I access it directly.

This is the settings from web.config

<authentication mode="Forms">
  <forms protection="All" loginUrl="login.aspx" name="CookieName" timeout="49200" requireSSL="false"/>
</authentication>
<authorization>
  <deny users="?"/>
</authorization>

 <location path="Default.aspx">
<system.web>
  <authorization>
    <allow users="*"/>
  </authorization>
</system.web>
</location>

I've already tried to solve this with some of the suggestions that are written here [ Forms Authentication Ignoring Default Document ] , but with no luck.

I want to solve it by configure somehow the server and not the application.

Thanks

SOLUTION

I don't know if it is the correct one, but I change the mode of the application pool into classic instead of integrated.

解决方案

Add the following to the web.config and it will allow you to access Default.aspx without requiring prior authentication. All other pages will require authentication.

<location path="default.aspx">
    <system.web>
        <authorization>
            <allow users="*"/>
        </authorization>
    </system.web>
</location>

Just because a document is added as the default within the IIS configuration does not mean it bypasses the FormsAuthentication.

这篇关于验证忽略默认文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆