locked
WCF authenticate WebForms RRS feed

  • Question

  • User-392731 posted

    Hi. I have a website with authenticate with web forms.

    My webConfig for site:

    <authentication mode="Forms">
          <forms loginUrl="~/Account/Login" timeout="2880" />
    </authentication>
    <roleManager enabled="true">
          <providers>
            <clear />
            <add connectionStringName="DefaultConnection" applicationName="/" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" />
            <add applicationName="/" name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" />
          </providers>
        </roleManager>


    Now I want add WCF service to my site. This service wil be used in mobile apps. How can I add method to my service for authentication? for example I do something like

    MyService.Login("username","password");

    and then I want use my service only if user authenticated

    Tuesday, July 2, 2013 10:54 AM

Answers