登录弹出问题-Silverlight + WCF应用程序(启用Windows身份验证) [英] Login Pop-up issue - Silverlight + WCF App (Windows authentication enabled)

查看:62
本文介绍了登录弹出问题-Silverlight + WCF应用程序(启用Windows身份验证)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Silverlight应用程序,该应用程序从Windows服务下托管的WCF服务中获取数据.我已使用以下App.config中的以下功能对此WCF服务启用了Windows身份验证.

I have a silverlight application which fetches data from a WCF Service hosted under a Windows Service. I have enabled Windows Authentication on this WCF service using the below in my App.config.

<system.servicemodel> 
<behaviors> 
  <endpointbehaviors> 
    <behavior name="webHttpBehavior"> 
      <webhttp /> 
    </behavior> 
  </endpointbehaviors> 
  <servicebehaviors> 
    <behavior name="defaultServiceBehavior"> 
      <servicemetadata httpgetenabled="true" /> 
      <servicedebug includeexceptiondetailinfaults="true" /> 
    </behavior> 
  </servicebehaviors> 
</behaviors> 
<bindings>            
  <basichttpbinding> 
    <binding name="winAuthBasicHttpBinding" opentimeout="05:00" sendtimeout="05:00"> 
      <security mode="TransportCredentialOnly"> 
        <transport clientcredentialtype="Windows" /> 
      </security> 
    </binding> 
  </basichttpbinding> 
</bindings> 
<servicehostingenvironment aspnetcompatibilityenabled="true" multiplesitebindingsenabled="true" /> 
<services> 
  <service behaviorconfiguration="defaultServiceBehavior" name="DataService.CrossDomainService"> 
    <endpoint address="" behaviorconfiguration="webHttpBehavior" binding="webHttpBinding" contract="DataService.ICrossDomainService"> 
      <identity> 
        <dns value="107.0.0.12" /> 
      </identity> 
    </endpoint> 
    <host> 
      <baseAddresses> 
        <add baseaddress="http://107.0.0.12:2035/" /> 
      </baseAddresses> 
    </host> 
  </service> 
  <service behaviorconfiguration="defaultServiceBehavior" name="DataService.NewDataService">         
    <endpoint address="" binding="basicHttpBinding" bindingconfiguration="winAuthBasicHttpBinding" contract="DataService.INewDataService"> 
      <identity> 
        <dns value="107.0.0.12" /> 
      </identity> 
    </endpoint> 
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> 
    <host> 
      <baseAddresses> 
        <add baseaddress="http://107.0.0.12:2035/DataService/" /> 
      </baseAddresses> 
    </host> 
  </service> 
</services> 
 
</system.servicemodel>



另外,我还在Web.config中启用了Windows身份验证,如下所示:



Also I have enabled windows authentication in my Web.config as below:

<system.web>
    <authentication mode="Windows" />
    <identity impersonate="true" />
</system.web>



在IIS中,我的网站在ASP.NET Classic应用程序池下运行.在身份验证下,启用了模拟(已认证用户)和Windows身份验证.


现在的问题是,当我使用IE8或Chrome浏览器访问此Silverlight应用程序时,会出现一个登录弹出窗口,询问用户名/密码.即使输入了详细信息并选择了记住我的凭据"选项,它也会再次第二次弹出.第二次输入详细信息后,我的应用程序打开并运行良好.但是,一旦我关闭浏览器,然后再次将其打开&现在尝试再次访问我的网站,此弹出窗口再次出现两次.

因此,当前每次打开网站时,我们都必须处理两次登录弹出窗口,然后才能使用该应用程序.

有任何想法吗?



In IIS my website is running under the ASP.NET Classic App Pool. Under authentication Impersonation(Authenticated User) and Windows Authentication are enabled.


Now the problem is that when I access this Silverlight app using IE8 or Chrome, then I get a Login popup asking for username/ password. Even after entering the details and selecting the "Remember my Credentials" option it popups up again the second time. After entering the details 2nd time, my app opens up and works fine. But once I close the browser and open it again & now try to access my website again, this popup comes up again twice.

So currently every time we open the website we have to deal with the login popup twice before we can use the application.

Any ideas?

推荐答案

您找到任何解决方案了吗?
德克
Have you found any solution?
Dirk


这篇关于登录弹出问题-Silverlight + WCF应用程序(启用Windows身份验证)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆