Click here to Skip to main content
13,450,958 members (57,338 online)
Rate this:
Please Sign up or sign in to vote.
See more:
When i was creating Web Site Administration (WSA) Tool, i was not able to connect to sql server database.

i was creating role based user membership application. clicking on option website-> configuration, it took me to WSA. and when i clicked on security tab, error occured.

Home --- Security --- Application --- Provider

There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.

The following message may help in diagnosing the problem: Unable to connect to SQL Server database.

When i click on Choose Data Store this page opens and shows like this...

Use this page to configure how Web site management data such as membership is stored. You can use a single provider for all the management data for your site or you can specify a different provider for each feature.

Your application is currently configured to use the provider: AspNetSqlProvider

Select a single provider for all site management data
Select a different provider for each feature (advanced)

When i click on first link, it appears as,

Use this page to select a provider for storing site management data.

AspNetSqlProvider Test

The fact is that i con not connect application to the database.

Help me to resolve this.
Posted 4-Jan-13 23:12pm
Updated 6-Jan-13 23:01pm
onurag19 5-Jan-13 5:36am
please explain more what do you want to do .
Bobyv 5-Jan-13 5:41am
i was creating role based user membership application. clicking on option website-> configuration, it took me to WSA. and when i clicked on security tab, error occured
OriginalGriff 5-Jan-13 5:40am
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Use the "Improve question" widget to edit your question and provide better information.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

To use role based membership
you need SQL server installed, either separate server or part of Visual Studio installation on your machine.( SQLExpress is free download).

Then you need to create a database. Blank one.

Now you need to setup the aspnet security services in the new database using the tool:

"To launch the aspnet_regsql.exe tool, go to the start menu and choose Run. Enter %WINDIR%\Microsoft.Net\Framework\v2.0.50727\aspnet_regsql.exe into the textbox and click OK. Alternatively, you can use Windows Explorer to drill down to the appropriate folder and double-click the aspnet_regsql.exe file. Either approach will net the same results."

Add the connection string to this new database in web.config.

Change the authentication section in web.config to mode="Forms".

Inside system.web section add

<rolemanager enabled="true">
        <clear />
        <add applicationname="/">
             type="System.Web.Security.SqlRoleProvider" />
    <membership userisonlinetimewindow="20">
        <clear />
        <add name="AspNetSqlMembershipProvider">

Now try WSA Tool.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02-2016 | 2.8.180318.3 | Last Updated 9 Jan 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100