Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Users (and roles) on SQL Server not seen in application's ASP.NET Configuration

Posted on 2007-12-06
13
Medium Priority
?
261 Views
Last Modified: 2012-06-21
Greetings

I have encountered something rather strange. I have a number of roles, users, etc setup for my application. This evening, I went into the ASP.NEt Configuration tool, to make some changes. Guess what - nothing!!. There are no users and no roles!!!

Not wanting to panic, I checked the tables in my database - I can see all the users!

HELP!!! ANY IDEAS WHAT HAS HAPPENEND? WHAT TO DO??
0
Comment
Question by:allanmark
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 5
13 Comments
 
LVL 27

Expert Comment

by:Sammy Ageil
ID: 20421731
first of all try to test the connection using the Asp.net configuration tool itself
then check your web.config for any changes

ASP.NET Configuration tool is one of the most unreliable tools out there.

0
 

Author Comment

by:allanmark
ID: 20422203
Went to the Provider tab of ASP.Net Configuration and tested - Membership Provider and Role Provider - both  make a successful connection the database.

I can create a user - both through the Confugration tool and also through my application  - both of these users are visible to the ASP.Net Configuration tool.

Next step?
0
 
LVL 12

Expert Comment

by:AGBrown
ID: 20427815
Possibly a stupid question, but have you changed any settings - in particular has the ApplicationName setting changed? If you check the aspnet_Applications table is there just one entry, and if not which entries correspond to which users? Just as easy to check - did the two users you created that showed up have different applicationId values in the aspnet_Users and aspnet_Membership table to the original users?

Andy
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:allanmark
ID: 20429167

Opened the aspnet_applications folder and have this:

/                         /                            24d00cee-d39f-4c94-aa70-f589274213a0      NULL
SAchoolKeeper      sachoolkeeper      ede05983-d5fc-4d67-9943-48029bca2d3a      NULL
SchoolKeeper        schoolkeeper    9394a145-4815-4d11-ac14-c0fc53f0cb24         NULL
NULL                   NULL                   NULL                                                       NULL

The users I created:

  - Do not see them in aspnet_Users
  - Do not see them in aspnet_Membership
 

Yet, I can see those usres in teh Configuration tool and my application!!!
0
 
LVL 12

Expert Comment

by:AGBrown
ID: 20429214
It sounds like the configuration tool is using a different database - is that possible?

What are the connectionString and membershipProvider settings in your application (don't recommend posting sensitive details here - you might want to sanitise them a bit).
0
 

Author Comment

by:allanmark
ID: 20429273
Bit clueless on the sanitsiing - so I emailed them.
0
 
LVL 12

Expert Comment

by:AGBrown
ID: 20429309
No problem - you are using SQL Express, which is fine. I'm guessing you have the database in your App_Data folder in the web site project? Is that the database you checked to see if the users existed?

Andy
0
 

Author Comment

by:allanmark
ID: 20429412
Aha!!

In the App_Data folder what I have is the ASPNETDB.MDF

In the applications table is:

/      /      12bf6a02-64ef-44b4-8837-87fa25b86098      NULL
NULL      NULL      NULL                                   NULL

In the Users and Membership  are the two users that I created (ASP.Net COnfig and application).

0
 
LVL 12

Accepted Solution

by:
AGBrown earned 1600 total points
ID: 20430115
Good start - now you need to find out where the other database you have loaded and are examining is, and swap the two around to get your users back.
0
 

Author Comment

by:allanmark
ID: 20430202
WHat is interesting is that I never put the MDF there (at least, not intentionally).

Can I not delete it and then right-click AppData and say "Add existing item" and go and select the database (which is somehwere under C:\Program Files\Microsoft\SQL Server \...\...") ??
0
 
LVL 12

Expert Comment

by:AGBrown
ID: 20430962
Yup, that you can do. I would suggest this would be an opportune time to take a backup of the one you want as well.

The configuration tool will create a database if it doesn't find one.
0
 

Author Comment

by:allanmark
ID: 20431226
0
 

Author Comment

by:allanmark
ID: 20431381
SORTED !!!

I deleted my web.config file (after backing up!!) and then re-applied the necessary changes!!
0

Featured Post

How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question