locked
Set Application Name In Web.config RRS feed

  • Question

  • User-341994687 posted

    Hi,

    I am a bit stuck. I have an application I created and it works fine locally and when on the demo server. However, when placed on the test production server users are unable to login. I think this is to do with the application name not being set in the web.config. But the aspnet_Applications table in the database is empty. I can get the application_id from the dbo.Applications and the dbo.Memberships table. But when I try to manually add the applicationname to the database and reference it in the web.config, I cannot login locally. 

    The ApplicationId is "99E92642-4CB1-474C-9E11-E2588382C4EC". 

    So I added that to the aspnet_Applications table along with the applicationName as "/ReadyXXX" and loweredApplicationName as "/readyxxx". These are just sample application names. But when I update the web.config to use that application name I cannot login. 

    <add name="DefaultProfileProvider" type="System.Web.Providers.DefaultProfileProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/readyxxx" />

    Any help would be appreciated. 

    Best regards, 

        Seamus

    Monday, August 11, 2014 10:29 AM

All replies

  • User-734925760 posted

    Hi,

    So far as I know, you need to make sure your Membership, Profile, RoleManager, etc all have the applicationName property set to match the value in the ApplicationName field in the aspnet_Applications table for the application you are trying to use data for.

    <membership defaultProvider="DefaultProfileProvider">
      <providers>
        <add name="DefaultProfileProvider" 
              type="System.Web.Providers.DefaultProfileProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" 
              connectionStringName="DefaultConnection" 
              enablePasswordRetrieval="false" 
              enablePasswordReset="true" 
              requiresQuestionAndAnswer="false" 
              applicationName="readyxxx" 
              requiresUniqueEmail="true" 
              passwordFormat="Hashed" 
              minRequiredPasswordLength="5" 
              minRequiredNonalphanumericCharacters="0" 
              passwordStrengthRegularExpression=""/>
      </providers>
    </membership>

    The same time you should make sure the applicationName exists in the aspnet_Applications table.

    Hope it's useful for you.

    Best Regards,

    Michelle Ge

    Tuesday, August 12, 2014 1:41 AM
  • User-341994687 posted

    Hi Michelle,

    I did that and it does not seem to work. The aspnet_Applications table was empty so I used the id of the application in the other tables and assigned an application name to it within the aspnet_Applications table. I don't know if I am unable to do this, although I cannot think logically why not?

    Best regards,     

          Seamus 

    Tuesday, August 12, 2014 3:55 AM