开发者

WCF AuthenticationService.IsLoggedIn problem

I use separate WCF AuthenticationService for auth routines. Methods: ValidateUser,Login return true, so it seems that all work properly, but when I call IsLoggedIn() after consume Login() method, it returns false.

AuthService settings:

 <?xml version="1.0"?>
 <configuration>




    <connectionStrings>
     <clear />
    <add name="LocalMySqlServer" connectionString="server=192.168.0.7;Database=clients;       uid=clients;pwd=fetisova;persist security info=True;CharSet=utf8;         Use Procedure Bodies =false;" providerName="MySql.Data.MySqlClient" />
     </connectionStrings>


<system.web>
<machineKey validation="SHA1" />
<compilation debug="true" targetFramework="4.0" />
<authentication mode="Forms" >
  <forms cookieless="UseCookies" />
</authentication>

<membership defaultProvider="MySQLMembershipProvider">
    <providers>
      <clear />
      <add name="MySQLMembershipProvider" 
           type="MySql.Web.Security.MySQLMembershipProvider, MySql.Web, Version=6.1.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" 
           connectionStringName="LocalMySqlServer" 
           enablePasswordRetrieval="false" 
           enablePasswordReset="true" 
           requiresQuestionAndAnswer="false" 
           applicationName="Clients" 
           requiresUniqueEmail="false" 
           passwordFormat="Hashed" 
           maxInvalidPasswordAttempts="500" 
           minRequiredPasswordLength="3" 
           minRequiredNonalphanumericCharacters="0" 
           passwordAttemptWindow="10" 
           passwordStrengthRegularExpression="" />
    </providers>
  </membership>
  <roleManager defaultProvider="MySQLRoleProvider" enabled="true">
    <providers>
      <clear />
      <add name="MySQLRoleProvider" 
           connectionStringName="LocalMySqlServer" 
           applicationName="Clients" 
           type="MySql.Web.Security.MySQLRoleProvider, MySql.Web, Version=6.1.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
    </providers>
  </roleManager>
    </system.web>
   <system.web.extensions>
<scripting>
  <webServices>
    <authenticationService enabled="true"/>
  </webServices>
</scripting>
 </system.web.extensions>
 <system.serviceModel>
<services>
  <service name="System.Web.ApplicationServices.Authentica开发者_运维技巧tionService"
      behaviorConfiguration="AuthenticationServiceTypeBehaviors">
    <endpoint contract=
    "System.Web.ApplicationServices.AuthenticationService"
      binding="basicHttpBinding"
      bindingConfiguration="userHttps"
      bindingNamespace="http://asp.net/ApplicationServices/v200"/>
  </service>
</services>
<bindings>
  <basicHttpBinding>
    <binding name="userHttps">
      <security mode="None" />
    </binding>
  </basicHttpBinding>
</bindings>
<behaviors>
  <serviceBehaviors>
    <behavior name="AuthenticationServiceTypeBehaviors">
      <serviceMetadata httpGetEnabled="true" />
      <serviceDebug
        httpHelpPageEnabled="true"
        includeExceptionDetailInFaults="true"
      />

    </behavior>
  </serviceBehaviors>
</behaviors>
<serviceHostingEnvironment
  aspNetCompatibilityEnabled="true"/>

So what's wrong? Can youe help me?


I should setup allowCookie="true" at client

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜