Click here to Skip to main content
15,888,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.

HTML
<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>


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

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


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?
Posted
Updated 12-Sep-11 0:32am
v2

1 solution

Have you found any solution?
Dirk
 
Share this answer
 
Comments
Pankaj Chamria 12-Sep-11 5:42am    
Not yet :(

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900