login fails on production system

D

David Thielen

Hi;

My system runs fine on my test system. On the production system it runs fine
if I use windows authentication. But when I switch to the
AspNetSqlMembershipProvider system for authentication/authorization I get
"Your login attempt was not successful. Please try again."

I copied App_Data/ASPNETDB.MDF from my system to the production system and I
installed SqlExpress 2005 on the production system. Is there anything else I
need to do?
 
P

PeterKellner

Hi;

My system runs fine on my test system. On the production system it runs fine
if I use windows authentication. But when I switch to the
AspNetSqlMembershipProvider system for authentication/authorization I get
"Your login attempt was not successful. Please try again."

I copied App_Data/ASPNETDB.MDF from my system to the production system and I
installed SqlExpress 2005 on the production system. Is there anything else I
need to do?

It's hard to know exactly why it's failing but a common problem when
moving from test to production is the ApplicationName is not set in
the web.config.

Here is an example web.config section that includes a real
ApplicationName.

<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="LocalSqlServer" enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="true" applicationName="/MyAppName"
requiresUniqueEmail="true"
minRequiredPasswordLength="1"
minRequiredNonalphanumericCharacters="0"
passwordFormat="Hashed"
maxInvalidPasswordAttempts="8" passwordAttemptWindow="10"
passwordStrengthRegularExpression=""/>
</providers>
</membership>
<roleManager enabled="true"/>
Peter Kellner
http://peterkellner.net
 
D

David Thielen

Is this the cause - that SSPI doesn't work on the system copied to because
that system is running as a different user. My dev system is running under VS
2005 with me as the user while on the production system it's IIS running as
NETWORK_SERVICE or something liek that.
 
P

PeterKellner

Is this the cause - that SSPI doesn't work on the system copied to because
that system is running as a different user. My dev system is running under VS
2005 with me as the user while on the production system it's IIS running as
NETWORK_SERVICE or something liek that.

I don't think that would matter. I'm curious if you can add new users
on your production IIS. If so, check the aspnetdb database and see if
there is a difference in the members table. Sorry I don't have
anything better to offer. I usually use sqlserver2005 so don't have a
lot of experience with express.
Peter Kellner
http://peterkellner.net
 
L

Luke Zhang [MSFT]

Hello Dave,

How is it going now? Can you post the <membership> element in the
web.config file, so we can get more information about the issue?

Thanks,

Luke Zhang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
D

David Thielen

Here you go:

<roleManager enabled="true"/>
<authentication mode="Forms">
<forms loginUrl="login.aspx"/>
</authentication>
<authorization>
<allow roles="Windward Users"/>
<deny users="*"/>
</authorization>
<membership defaultProvider="AspNetSqlMembershipProvider"/>
 
L

Luke Zhang [MSFT]

Hello Dave,

How about the connection string? It is possible that the application didn't
connect to the right database so that the login failed. And, is the config
exactly same as that you use on the development computer? I didn't see you
set any property for the member ship provider, like connection string.

regards,

Luke Zhang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
L

Luke Zhang [MSFT]

Then you may open the IIS manager, right click the virtual folder, select
Properties. On the Tab "ASP.NET", click Edit Configuration. On the
"Authentication" tab, click "Manage Provider" and you see what is the
connection string your provider used; Then in the "General" tab, you can
check what is the actual database for the connectionstring.

Regards,

Luke Zhang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

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

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,146
Latest member
Vinay KumarNevatia_
Top