473,387 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Membership database problems

Hi there,

I have a web application that works fine on my local dev machine. However
I'm having less success on my hosting environment.

When I detach the database for this site, copy it to my hosting environment
and attach it through their interface, I can connect to the database in my
hosting environment through the SQL Management studio, see all stored procs,
functions, tables, and the data in the tables I had entered on my local dev
machine. It looks like it should be all good.

However when I attempt to programmatically access members and roles it's
like the data in the tables isn't there

i.e. going through the ASP.NET membership api for example
Membership.GetAllUsers().Count and Roles.GetAllRoles().Length return 0 and
attempting to login under any of the existing accounts fails.

I've checked the SQL User I'm using to connect to the database and it does
have all the aspnet_Membership roles selected. I've checked that it is
connecting to my database (if I change the connection string I get
sqlexception login failure).

Any suggestions?

TIA

Michael

Jul 19 '07 #1
3 1997
Did you change the application name in the database when you moved it?

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"Michael Lang" <micklang at gmail.comwrote in message
news:OS*************@TK2MSFTNGP06.phx.gbl...
Hi there,

I have a web application that works fine on my local dev machine. However
I'm having less success on my hosting environment.

When I detach the database for this site, copy it to my hosting
environment and attach it through their interface, I can connect to the
database in my hosting environment through the SQL Management studio, see
all stored procs, functions, tables, and the data in the tables I had
entered on my local dev machine. It looks like it should be all good.

However when I attempt to programmatically access members and roles it's
like the data in the tables isn't there

i.e. going through the ASP.NET membership api for example
Membership.GetAllUsers().Count and Roles.GetAllRoles().Length return 0
and attempting to login under any of the existing accounts fails.

I've checked the SQL User I'm using to connect to the database and it does
have all the aspnet_Membership roles selected. I've checked that it is
connecting to my database (if I change the connection string I get
sqlexception login failure).

Any suggestions?

TIA

Michael

Jul 19 '07 #2
I didn't, change it. But I never specified it. Thanks for the clue... it
lead to this post from Scott gu...

http://weblogs.asp.net/scottgu/archi...Providers.aspx

As I never specified the applicationName in the config it defaulted to the
vroot path of my dev application which of course is different to the vroot
on my hosting environment.

Solution: I added the applicationName attribute for my membership and
roleprovider and now it's all good.

Cheers

Michael
"Kevin Spencer" <un**********@nothinks.comwrote in message
news:e2**************@TK2MSFTNGP04.phx.gbl...
Did you change the application name in the database when you moved it?

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"Michael Lang" <micklang at gmail.comwrote in message
news:OS*************@TK2MSFTNGP06.phx.gbl...
>Hi there,

I have a web application that works fine on my local dev machine.
However I'm having less success on my hosting environment.

When I detach the database for this site, copy it to my hosting
environment and attach it through their interface, I can connect to the
database in my hosting environment through the SQL Management studio, see
all stored procs, functions, tables, and the data in the tables I had
entered on my local dev machine. It looks like it should be all good.

However when I attempt to programmatically access members and roles it's
like the data in the tables isn't there

i.e. going through the ASP.NET membership api for example
Membership.GetAllUsers().Count and Roles.GetAllRoles().Length return 0
and attempting to login under any of the existing accounts fails.

I've checked the SQL User I'm using to connect to the database and it
does have all the aspnet_Membership roles selected. I've checked that it
is connecting to my database (if I change the connection string I get
sqlexception login failure).

Any suggestions?

TIA

Michael


Jul 19 '07 #3
That one burned me too a while back. and I found the same ScottGuthrie
post.
"Michael Lang" <micklang at gmail.comwrote in message
news:OZ**************@TK2MSFTNGP04.phx.gbl...
>I didn't, change it. But I never specified it. Thanks for the clue... it
lead to this post from Scott gu...

http://weblogs.asp.net/scottgu/archi...Providers.aspx

As I never specified the applicationName in the config it defaulted to the
vroot path of my dev application which of course is different to the vroot
on my hosting environment.

Solution: I added the applicationName attribute for my membership and
roleprovider and now it's all good.

Cheers

Michael
"Kevin Spencer" <un**********@nothinks.comwrote in message
news:e2**************@TK2MSFTNGP04.phx.gbl...
>Did you change the application name in the database when you moved it?

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"Michael Lang" <micklang at gmail.comwrote in message
news:OS*************@TK2MSFTNGP06.phx.gbl...
>>Hi there,

I have a web application that works fine on my local dev machine.
However I'm having less success on my hosting environment.

When I detach the database for this site, copy it to my hosting
environment and attach it through their interface, I can connect to the
database in my hosting environment through the SQL Management studio,
see all stored procs, functions, tables, and the data in the tables I
had entered on my local dev machine. It looks like it should be all
good.

However when I attempt to programmatically access members and roles it's
like the data in the tables isn't there

i.e. going through the ASP.NET membership api for example
Membership.GetAllUsers().Count and Roles.GetAllRoles().Length return 0
and attempting to login under any of the existing accounts fails.

I've checked the SQL User I'm using to connect to the database and it
does have all the aspnet_Membership roles selected. I've checked that
it is connecting to my database (if I change the connection string I get
sqlexception login failure).

Any suggestions?

TIA

Michael



Jul 19 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Nate Hekman | last post by:
I'm trying to set up a Membership/Role Provider for an ASP.NET 2.0 beta 2 site using SqlMembershipProvider, and am having problems configuring SQL Server. I'm comfortable with ASP.NET but very...
2
by: Josh Collins | last post by:
Here is my configuration: ASP.Net 2 running on IIS6/Win2k3 Developing on WindowsXP-Pro iwth Visual Studio 2005. I am trying to utilize the Membership functionality in an ASP.net website. I...
9
by: Paul Keegstra | last post by:
Hi, I am currently working on an asp.net 2.0 web site that is a replacement of a classic asp web site. The current web site uses a Commerce Server 2002 database for storing user information. ...
0
by: Andy | last post by:
Hi, I've created a .net 2.0 web app that uses Sql Server 2005 express as its backend. I used microsoft's database tool to create all of the membership, roles, etc. need for my website. Everything...
4
by: =?Utf-8?B?Q2hyaXMgQ2Fw?= | last post by:
I have been having some trouble with implementing a custom Membership Provider. We have a custom data store and business logic that pulls user information. I need some level of functionality...
4
by: =?Utf-8?B?U2FsYW1FbGlhcw==?= | last post by:
Hi, I am trying to play with the Survey manager application provided gracefully by Microsoft at "http://msdn.microsoft.com/vstudio/express/sql/samples/" VB team(so many thanks), compiled the win...
1
by: =?Utf-8?B?ZVByaW50?= | last post by:
Asp.Net v2.0 I have created a web application and I am using it from a single website and database. The web application has different ‘portals’ – each independent and I am using the...
1
by: =?Utf-8?B?ZVByaW50?= | last post by:
Asp.Net v2.0 I have created a web application and I am using it from a single website and database. The web application has different ‘portals’ – each independent and I am using the...
6
by: Jonathan Wood | last post by:
Although this will be a challenge at my level of ASP.NET knowledge, I'm thinking I should implement my own membership provider class. Looking over the methods I must implement, a number of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.