i was developping a web application with asp.net authentication model for a client.
every thing went well but certainly client asked for a desktop version with of course authroization and authentication. both applications were hitting to same database so same authentication model was required for desktop application was required
so by just adding the following configurations in app.config of my desktop application it was possible to use Membership of asp.net authentications in windows appliation
<membership>
<providers>
<remove name="AspNetSqlMembershipProvider"/>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="MedBillUtility.Properties.Settings.AFileStorageDBConnectionString" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="3" minRequiredPasswordLength="4" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression=""/>
</providers>
</membership>
but then i realized thought authentication is done but i m still unable to authorization because role manger is not available so to enable role manger so i had to add following section in my app.config as well under System.web
<roleManager enabled="true">
<providers>
<remove name="AspNetSqlRoleProvider"/>
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web,
Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="MedBillUtility.Properties.Settings.AFileStorageDBConnectionString" applicationName="/"/>
</providers>
</roleManager>
and all worked .
every thing went well but certainly client asked for a desktop version with of course authroization and authentication. both applications were hitting to same database so same authentication model was required for desktop application was required
so by just adding the following configurations in app.config of my desktop application it was possible to use Membership of asp.net authentications in windows appliation
<membership>
<providers>
<remove name="AspNetSqlMembershipProvider"/>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="MedBillUtility.Properties.Settings.AFileStorageDBConnectionString" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="3" minRequiredPasswordLength="4" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression=""/>
</providers>
</membership>
but then i realized thought authentication is done but i m still unable to authorization because role manger is not available so to enable role manger so i had to add following section in my app.config as well under System.web
<roleManager enabled="true">
<providers>
<remove name="AspNetSqlRoleProvider"/>
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web,
Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="MedBillUtility.Properties.Settings.AFileStorageDBConnectionString" applicationName="/"/>
</providers>
</roleManager>
and all worked .