25 asp.net impersonation web-config
我impersonate
在Asp.net 4.0网站的web.config中使用标签.
下面是我的Web.Config代码:
<system.web>
<authentication mode="Windows">
<identity impersonate="true"
userName="Administrator"
password="LALLA$26526"/>
</authentication>
</system.web>
Run Code Online (Sandbox Code Playgroud)
当我在Visual Studio中运行应用程序时,我收到此错误:
Parser Error Message: Unrecognized element 'identity'.
Run Code Online (Sandbox Code Playgroud)
来源错误:
Line 50: <system.web>
Line 51: <authentication mode="Windows">
Line 52: <identity impersonate="true"
Line 53: userName="Administrator"
Line 54: password="LALLA$26526"/>
Run Code Online (Sandbox Code Playgroud)
我哪里错了?
Jac*_*cob 76
该identity
部分属于该system.web
部分,而不是在authentication
:
<system.web>
<authentication mode="Windows"/>
<identity impersonate="true" userName="foo" password="bar"/>
</system.web>
Run Code Online (Sandbox Code Playgroud)
您将identity
节点作为节点的子authentication
节点.那就是问题所在.如在上面的例子中,authentication
和identity
节点必须是儿童system.web
节点
归档时间: |
|
查看次数: |
120512 次 |
最近记录: |