New Posts New Posts RSS Feed: Aspnet Authentication is not settin @ApplicationName
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Aspnet Authentication is not settin @ApplicationName

 Post Reply Post Reply
Author
pponzano View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Apr-2011
Location: Italy
Posts: 165
Post Options Post Options   Quote pponzano Quote  Post ReplyReply Direct Link To This Post Topic: Aspnet Authentication is not settin @ApplicationName
    Posted: 24-May-2012 at 6:49am
Hello,
I'm trying to validate using AspAuthenticatingLoginManager but when I call the ValidateUserCore

I got this executed

exec dbo.aspnet_Membership_GetPasswordWithFormat @ApplicationName=N'/',@UserName=N'test7',@UpdateLastLoginActivityDate=1,@CurrentTimeUtc='2012-05-24 13:43:00.780'

why it set the @ApplicationName to N'/'??

In my loginviewmodel I've

var loginCredential = new IFLoginCredential(username, password, "App123");


My connectionstring is

<remove name="LocalSqlServer" />

   <add name="LocalSqlServer" connectionString="data source=myconnection;initial catalog=myCatalog;user id=if;password=if;App=App123;Application Name=App123" providerName="System.Data.SqlClient" />


What am I doing wrong?
Thanks
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 24-May-2012 at 12:19pm
Hi Paolo.
I'm investivating and will follow up shortly.
Silvio.
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 24-May-2012 at 12:49pm
Paolo,
 
You must make sure you properly set ApplicationName for the membership provider in <Membership>:
 
<system.web>
  <membership>
    <providers>
      <clear/>
      <add name="AspNetSqlMembershipProvider"
           type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
           connectionStringName="LocalSqlServer"
           enablePasswordRetrieval="false"
           enablePasswordReset="true"
           requiresQuestionAndAnswer="true"
           requiresUniqueEmail="false"
           passwordFormat="Hashed"
           maxInvalidPasswordAttempts="5"
           minRequiredPasswordLength="7"
           minRequiredNonalphanumericCharacters="1"
           passwordAttemptWindow="10"
           passwordStrengthRegularExpression=""
           applicationName="/App123" />
    </providers>
  </membership>
 
 
Regards,
   Silvio.
 


Edited by sbelini - 24-May-2012 at 12:58pm
Back to Top
pponzano View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Apr-2011
Location: Italy
Posts: 165
Post Options Post Options   Quote pponzano Quote  Post ReplyReply Direct Link To This Post Posted: 24-May-2012 at 11:19pm
Hello again Silvio,
yesterday I tried but ointing to Version 4.0.0.0 .....I resolved setting the ApplicationName directly to the loginmanager class...btw I try your solution... thanks
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down