Wrong applicationName returned by Membership.Provider.ApplicationN

T

Thomas

I'm running into a bizzare sitution with the SqlMembershipProvider. I am
using a SqlMembershipProvider and SqlRoleProvider. The are each set to a
different applicationName. like so:

<roleManager defaultProvider="MyRoleProvider"
enabled="true"
cacheRolesInCookie="true"
cookieName=".OURSPIFFYROLES"
cookieTimeout="30"
cookiePath="/"
cookieRequireSSL="false"
cookieSlidingExpiration="true"
cookieProtection="All"
createPersistentCookie="false"
maxCachedResults="10">
<providers>
<clear />
<add name="MyRoleProvider"
connectionStringName="Common"
applicationName="MyApplication"
type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</roleManager>

<membership defaultProvider="CustomerProvider">
<providers>
<clear />
<add name="CustomerProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="Common"
applicationName="/"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="false"
requiresUniqueEmail="true"
passwordFormat="Hashed"
maxInvalidPasswordAttempts="5"
passwordAttemptWindow="10"
minRequiredPasswordLength="8"
minRequiredNonalphanumericCharacters="0"
passwordStrengthRegularExpression="" />
</providers>
</membership>


The problem is that Membership.Provider.ApplicationName returns
"MyApplication" and not "/".
 
J

Juan T. Llibre

re:
!> The problem is that Membership.Provider.ApplicationName returns "MyApplication" and not "/".

If a value is not specified for the applicationName attribute in the configuration file for the Web application,
then the profile providers included with the .NET Framework use the ApplicationVirtualPath property value
for ASP.NET applications.

http://msdn.microsoft.com/en-us/library/system.web.profile.profilemanager.applicationname.aspx




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top