【问题标题】:Windows Authentication not working with IIS - SilverlightWindows 身份验证不适用于 IIS - Silverlight
【发布时间】:2013-06-18 18:26:21
【问题描述】:

我的 silverlight 应用程序在 Cassini 上运行时运行良好,但它仅在 IIS Windows 身份验证上不起作用。以下是我到目前为止所采取的步骤。 在 web.config 中添加了以下节点

 <identity impersonate="true" />
<roleManager enabled="true" defaultProvider="AspNetWindowsTokenRoleProvider"/>

<profile enabled="false"/>

在 IIS 中启用 Windows 身份验证方法。

但似乎没有帮助。我得到空的用户对象。 但同样的代码同样适用于 Visual Studio 的本地服务器/。请帮忙;

【问题讨论】:

    标签: silverlight iis-7 windows-authentication


    【解决方案1】:

    我不得不通过代码使用提升的权限。和宾果游戏效果很好。

     using (HostingEnvironment.Impersonate()) // this line did the magic.
            {//rest of my code. }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-10-21
      • 1970-01-01
      • 2010-11-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多