S
siddharthkhare
Hi All,
can some one please help me with this.......
As soon as i start my application ASP.net throws and error while
reading the providers from config file.
I am trying to add a sql and a AD provider.
If i comment out the AD provider part all works fine.
<?xml version="1.0"?>
<configuration>
<connectionStrings>
<add name="SqlServices" providerName="System.Data.SqlClient"
connectionString="workstation id='Some work Station';packet
size=4096;user id=SomeUser;data source=SOME;persist security
info=True;initial catalog=SOME;password=SOME"/>
<add name="ADConnectionString" connectionString="LDAP://SomeLDAP
PAth" />
</connectionStrings>
<appSettings/>
<!-- <connectionStrings/> -->
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true">
</compilation>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows" />
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly"
defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<roleManager defaultProvider="SqlProvider1"
enabled="true"
cacheRolesInCookie="true"
cookieName=".ASPROLES"
cookieTimeout="30"
cookiePath="/"
cookieRequireSSL="false"
cookieSlidingExpiration="true"
cookieProtection="All" >
<providers>
<add
name="SqlProvider1"
type="System.Web.Security.SqlRoleProvider"
connectionStringName="SqlServices"
applicationName="SampleApplication" />
</providers>
</roleManager>
<membership defaultProvider="SqlProvider1"
userIsOnlineTimeWindow="15">
<providers>
<clear />
<add
name="SqlProvider1"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="SqlServices"
applicationName="MyApplication"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="false"
requiresUniqueEmail="false"
passwordFormat="Hashed"
minRequiredPasswordLength="3"
minRequiredNonalphanumericCharacters="0"/>
<add name="MyADMembershipProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider,
System.Web, Version=2.0.0.0,Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="ADConnectionString"
connectionUsername="SomeUserName" connectionPassword="SomePassword"/
</providers>
</membership>
<profile defaultProvider="SqlProvider1">
<providers>
<clear />
<add name="SqlProvider"
type="System.Web.Profile.SqlProfileProvider"
connectionStringName="SqlServices"
applicationName="SampleApplication"
description="SqlProfileProvider for SampleApplication" /</providers>
</profile>
</system.web>
</configuration>
Thanks
Siddharth
can some one please help me with this.......
As soon as i start my application ASP.net throws and error while
reading the providers from config file.
I am trying to add a sql and a AD provider.
If i comment out the AD provider part all works fine.
<?xml version="1.0"?>
<configuration>
<connectionStrings>
<add name="SqlServices" providerName="System.Data.SqlClient"
connectionString="workstation id='Some work Station';packet
size=4096;user id=SomeUser;data source=SOME;persist security
info=True;initial catalog=SOME;password=SOME"/>
<add name="ADConnectionString" connectionString="LDAP://SomeLDAP
PAth" />
</connectionStrings>
<appSettings/>
<!-- <connectionStrings/> -->
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true">
</compilation>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows" />
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly"
defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<roleManager defaultProvider="SqlProvider1"
enabled="true"
cacheRolesInCookie="true"
cookieName=".ASPROLES"
cookieTimeout="30"
cookiePath="/"
cookieRequireSSL="false"
cookieSlidingExpiration="true"
cookieProtection="All" >
<providers>
<add
name="SqlProvider1"
type="System.Web.Security.SqlRoleProvider"
connectionStringName="SqlServices"
applicationName="SampleApplication" />
</providers>
</roleManager>
<membership defaultProvider="SqlProvider1"
userIsOnlineTimeWindow="15">
<providers>
<clear />
<add
name="SqlProvider1"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="SqlServices"
applicationName="MyApplication"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="false"
requiresUniqueEmail="false"
passwordFormat="Hashed"
minRequiredPasswordLength="3"
minRequiredNonalphanumericCharacters="0"/>
<add name="MyADMembershipProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider,
System.Web, Version=2.0.0.0,Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="ADConnectionString"
connectionUsername="SomeUserName" connectionPassword="SomePassword"/
</providers>
</membership>
<profile defaultProvider="SqlProvider1">
<providers>
<clear />
<add name="SqlProvider"
type="System.Web.Profile.SqlProfileProvider"
connectionStringName="SqlServices"
applicationName="SampleApplication"
description="SqlProfileProvider for SampleApplication" /</providers>
</profile>
</system.web>
</configuration>
Thanks
Siddharth