IIS7中的表单身份验证问题 [英] Forms Authentication issue in IIS7

查看:106
本文介绍了IIS7中的表单身份验证问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI,
我的asp.net应用程序在本地计算机和QA服务器(Windows Server 2008,IIS7)中运行良好,但有时在DEV服务器(Windows Server 2008,IIS7.0)中却无法运行.我什至在IIS 7中为我的网站启用了表单身份验证.
当我在开发服务器上运行该应用程序时,它会给我登录页面,单击"Sing In"按钮后,它只会显示为"Internet Explorer无法显示该网页".

Web.config中的身份验证设置:

 <  身份验证   模式  ="  > 
      <  表单    ="   Login.aspx" 
             保护  ="  
 
                     span>       超时   30 " 
                     名称  . ASPXAUTH"  
 
                     span>       路径  /" 
                     span>        requireSSL    false " 
                     span>        slidingExpiration    true " 
                   span>        defaultUrl    SDAuditUI .aspx"  
 
                     span>       无cookie    UseDeviceProfile " 
                   span>        enableCrossAppRedirects    false " / <  /authentication  > 
    <  授权 > 
      <  拒绝       ?"    / > 
      <  允许       *" / <  /authorization  >  



请帮助我解决问题.
以下是事件查看器的信息:

Event code: 4005 <br />
Event message: Forms authentication failed for the request. Reason: The ticket supplied has expired. <br />
Event time: 9/7/2011 8:23:19 AM <br />
Event time (UTC): 9/7/2011 2:23:19 PM <br />
Event ID: b5fb4de7d8f345318a0128350166c92f <br />
Event sequence: 2 <br />
Event occurrence: 1 <br />
Event detail code: 50202 <br />
 <br />
Application information: <br />
    Application domain: /LM/W3SVC/2/ROOT/QueryUIApp-1-129598789993721155 <br />
    Trust level: Full <br />
    Application Virtual Path: /QueryUIApp <br />
    Application Path: E:\QueryUI\QueryUIApp\ <br />
    Machine name: DNVDEVSAPINT2 <br />
 <br />
Process information: <br />
    Process ID: 3184 <br />
    Process name: w3wp.exe <br />
    Account name: NT AUTHORITY\NETWORK SERVICE <br />
 <br />
Request information: <br />
    Request URL: http://dnvdevsapint2:83/QueryUIApp/Login.aspx?ReturnUrl=Forms authentication failed for the request. Reason: The ticket supplied has expired.fQueryUIAppForms authentication failed for the request. Reason: The ticket supplied has expired.fSDAuditUI.aspx <br />
    Request path: /QueryUIApp/Login.aspx <br />
    User host address: 172.25.186.16 <br />
    User:  <br />
    Is authenticated: False <br />
    Authentication Type:  <br />
    Thread account name: NT AUTHORITY\NETWORK SERVICE <br />
 <br />
Name to authenticate:  <br />
 <br />
Custom event details:

解决方案

这可能与您正在使用的DEV服务器的机器配置有关,下面的讨论可能会提供更多的见解:

http://stackoverflow.com/Questions/2686324/forms-authentication-for-the-request-reason-the-ticket-supplied-has-expi [ ^ ]


<我认为这与开发服务器上的机器配置文件有关.检查w3wp.exe是否作为服务帐户运行,并检查计算机配置中的processmodel元素.还要确保检查计算机配置中的模拟"元素.将其与您的质量检查机器/您的机器进行比较,可能您会发现问题所在.


HI,
My asp.net application is working fine in my local machine and QA Server(Windows server 2008, IIS7), But it is not working sometimes in DEV server( Windows Server 2008, IIS7.0). I even verified the Forms Authentication in enable for my website in IIS 7.
When I run the application on dev server, it is giving me login page and after clicking ''Sing In'' button it is just displaying as "Internet Explorer Cannot display the web page".

My authentication settings in Web.config:

<authentication mode="Forms">
      <forms loginUrl="Login.aspx"

      protection="All"

           timeout="30"

           name=".ASPXAUTH"

           path="/"

           requireSSL="false"

           slidingExpiration="true"

           defaultUrl="SDAuditUI.aspx"

           cookieless="UseDeviceProfile"

           enableCrossAppRedirects="false" />
    </authentication>
    <authorization>
      <deny users ="?" />
      <allow users = "*" />
    </authorization>



Please help me in fixing the issue.
Below is the information from Event Viewer:

Event code: 4005 <br />
Event message: Forms authentication failed for the request. Reason: The ticket supplied has expired. <br />
Event time: 9/7/2011 8:23:19 AM <br />
Event time (UTC): 9/7/2011 2:23:19 PM <br />
Event ID: b5fb4de7d8f345318a0128350166c92f <br />
Event sequence: 2 <br />
Event occurrence: 1 <br />
Event detail code: 50202 <br />
 <br />
Application information: <br />
    Application domain: /LM/W3SVC/2/ROOT/QueryUIApp-1-129598789993721155 <br />
    Trust level: Full <br />
    Application Virtual Path: /QueryUIApp <br />
    Application Path: E:\QueryUI\QueryUIApp\ <br />
    Machine name: DNVDEVSAPINT2 <br />
 <br />
Process information: <br />
    Process ID: 3184 <br />
    Process name: w3wp.exe <br />
    Account name: NT AUTHORITY\NETWORK SERVICE <br />
 <br />
Request information: <br />
    Request URL: http://dnvdevsapint2:83/QueryUIApp/Login.aspx?ReturnUrl=Forms authentication failed for the request. Reason: The ticket supplied has expired.fQueryUIAppForms authentication failed for the request. Reason: The ticket supplied has expired.fSDAuditUI.aspx <br />
    Request path: /QueryUIApp/Login.aspx <br />
    User host address: 172.25.186.16 <br />
    User:  <br />
    Is authenticated: False <br />
    Authentication Type:  <br />
    Thread account name: NT AUTHORITY\NETWORK SERVICE <br />
 <br />
Name to authenticate:  <br />
 <br />
Custom event details:

解决方案

This could be related to machine config of the DEV server that you are using, the below discussion may provide more insight:

http://stackoverflow.com/questions/2686324/forms-authentication-failed-for-the-request-reason-the-ticket-supplied-has-expi[^]


I think this has something to do with machine config file on the dev server. Check the w3wp.exe is running as service account and check the processmodel element in machine config. Also make sure so check the Impersonation element in the machine config. Compare these with your QA machine/your machine, probably you will find the issue there itself.


这篇关于IIS7中的表单身份验证问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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