English 中文(简体)
在我的ASP.NET应用程序中,模拟身份验证屏幕不断弹出。
原标题:After impersonation authentication screen keeps popping up in my ASP.NET Application

我正在开发一个程序,需要在服务器上归档(压缩并删除文件和文件夹)。托管应用程序(ASP.NET MVC)的服务器和保存文件的服务器是两个不同的服务器。当我不使用模拟身份验证和默认的 Web 配置运行该应用程序时,一切正常。该程序的凭据为:NT AUTHORITYNETWORK SERVICE。当我通过在 web.config 中添加以下一行进行模拟身份验证时,< authentication mode="Windows"/>,该程序可以使用匿名登录正常运行。但是,当我通过将以下代码添加到 web.config 来防止匿名登录时,每次访问文件或文件夹时都会弹出身份验证屏幕。

问题是什么?

<authentication mode="Windows"/>
<identity impersonate="true"/>
<authorization>
  <deny users="?"/>
  <allow users="*"/>
</authorization>
问题回答

要使它工作,您需要在IIS中禁用匿名身份验证并启用Windows身份验证,否则它就没有可模拟传递的身份。

这是如何做到的 :)





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签