在<assemblies> <clear> </clear> </assemblies>之后,Windows.UserIdentity.Name为空

时间:2012-04-13 02:32:24

标签: asp.net web-config windows-authentication

我在一个嘈杂的内部网应用程序中有一个虚拟目录 - 我需要从父网站的web.config继承各种appSettings等 - 我想解耦运行时依赖项; esp,如果将程序集添加到主站点,我不想打破每个子应用程序

所以我在web.config中添加'clear'继承的程序集(处理程序和模块),如下所示......

<compilation debug="true">
    <assemblies>
        <clear/>

..等等

但是HttpContext.Current.User.Identity.Name现在为空(IsAuthenticated = false,Name =“”)。

Windows用户似乎可以通过IIS进行身份验证,如下所示:

<system.web>
    <authentication mode="Windows"/>
    <authorization>
      <deny users="?"/>
    </authorization>   

任何想法?

0 个答案:

没有答案