Utilisez-vous basicHttpBinding? et sont l'application sl et svc sur le même domaine?
J'ai (je pense) une configuration similaire - silverlight 3.0/wcf hébergé sur https en utilisant l'authentification par formulaire. Je vais copier dans toutes mes configs connexes, au cas où vous manquez quelque chose.
ServiceReferences.ClientConfig (a dû enlever l'étiquette de 'configuration', sinon le bloc entier disparaît):
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_PassportService" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"
textEncoding="utf-8">
<security mode="Transport">
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="https://domain/service.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_PassportService"
contract="PassportService.PassportService" name="BasicHttpBinding_PassportService" />
</client>
</system.serviceModel>
ServiceModel dans web.config:
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="ProjectPassport.Web.PassportServiceBehavior">
<serviceMetadata httpGetEnabled="true" httpGetUrl="http://domain/service.svc" />
<serviceDebug includeExceptionDetailInFaults="true" />
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="basicHttpsBinding">
<security mode="Transport">
<transport clientCredentialType="None"/>
</security>
</binding>
</basicHttpBinding>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
<services>
<service behaviorConfiguration="ProjectPassport.Web.PassportServiceBehavior"
name="ProjectPassport.Web.PassportService">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="basicHttpsBinding"
contract="ProjectPassport.Web.PassportService" />
</service>
</services>
</system.serviceModel>
et mon authentification/autorisation/configuration d'appartenance:
<authentication mode="Forms">
<forms loginUrl="Home.aspx" protection="All" timeout="80" name="AppName" path="/" requireSSL="false" slidingExpiration="true" defaultUrl="Manage.aspx" cookieless="UseCookies" enableCrossAppRedirects="false"/>
</authentication>
<authorization>
<deny users="?"/>
<!---->
<allow users="*"/>
</authorization>
<membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="15">
<providers>
<clear/>
<add name="SqlProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="LocalSqlServer" applicationName="MyApplication" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" passwordFormat="Clear" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="4" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="50" passwordStrengthRegularExpression=""/>
</providers>
</membership>
également, n'oubliez pas que js/clientBi Les emplacements de service n/wcf devraient être autorisés. ajouter des balises de localisation:
<location path="ClientBin">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
<location path="service.svc">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
etc ...
Edit: ce lien, vous faites référence à est ciblé à WinForms. Si je ne me trompe pas, vous construisez une application Silverlight 3. un coup d'oeil à ces lieu:
http://msdn.microsoft.com/en-us/library/dd560704%28VS.95%29.aspx
http://www.eggheadcafe.com/tutorials/aspnet/7cc2760f-50f2-492d-9d62-48ad5c7f70b4/aspnet-membership-and-ro.aspx
Pourriez-vous s'il vous plaît poster vos liaisons nœud de votre web.config. Nous pouvons donc voir comment basicHttpBinding est configuré? - Merci – DaveB