冒充标签Web.Config中的ASP.NET [英] Impersonate tag in Web.Config in ASP.NET
本文介绍了冒充标签Web.Config中的ASP.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我用模仿
标记在我的Asp.net 4.0网站的web.config。
I'm using impersonate
tag in my web.config in Asp.net 4.0 website.
下面是我的web.config code:
<system.web>
<authentication mode="Windows">
<identity impersonate="true"
userName="Administrator"
password="LALLA$26526"/>
</authentication>
</system.web>
当我运行在Visual Studio应用程序,我得到这个错误:
When I run app in Visual Studio I get this error:
Parser Error Message: Unrecognized element 'identity'.
源错误:
Line 50: <system.web>
Line 51: <authentication mode="Windows">
Line 52: <identity impersonate="true"
Line 53: userName="Administrator"
Line 54: password="LALLA$26526"/>
我在哪里去了?
推荐答案
的身份
节将在的System.Web
部分,而不是在验证
:
The identity
section goes under the system.web
section, not under authentication
:
<system.web>
<authentication mode="Windows"/>
<identity impersonate="true" userName="foo" password="bar"/>
</system.web>
这篇关于冒充标签Web.Config中的ASP.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文