Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Using the Security section of ASP.NET Configuration in Visual Studio 2008

Reply
Thread Tools

Using the Security section of ASP.NET Configuration in Visual Studio 2008

 
 
Nathan Sokalski
Guest
Posts: n/a
 
      01-12-2009
I am using the Membership feature of ASP.NET 3.5 in Visual Studio 2008 with
SQL Server 2005 Developer Edition. I have created the database in SQL Server
2005 (which is located on my local machine) and run aspnet_regsql to create
the appropriate database objects. However, when I go to Project -> ASP.NET
Configuration in Visual Studio 2008 and go to the Security section, I
recieve the following error message:


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.


I am not sure why I am recieving this error. I think my connection string in
my Web.config is correct, but I am not sure how to find out for sure. I am
not extremely experienced in database administration, can someone please
help me figure out what I am doing wrong? Thanks.
--
Nathan Sokalski
http://www.velocityreviews.com/forums/(E-Mail Removed)
http://www.nathansokalski.com/


 
Reply With Quote
 
 
 
 
Uri Dimant
Guest
Posts: n/a
 
      01-12-2009
Hi
Did you configure SQL Server to accept remote connections?
Can you show us the exact error message taken from ERROR.LOG?


"Nathan Sokalski" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I am using the Membership feature of ASP.NET 3.5 in Visual Studio 2008 with
>SQL Server 2005 Developer Edition. I have created the database in SQL
>Server 2005 (which is located on my local machine) and run aspnet_regsql to
>create the appropriate database objects. However, when I go to Project ->
>ASP.NET Configuration in Visual Studio 2008 and go to the Security section,
>I recieve the following error message:
>
>
> 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.
>
>
> I am not sure why I am recieving this error. I think my connection string
> in my Web.config is correct, but I am not sure how to find out for sure. I
> am not extremely experienced in database administration, can someone
> please help me figure out what I am doing wrong? Thanks.
> --
> Nathan Sokalski
> (E-Mail Removed)
> http://www.nathansokalski.com/
>



 
Reply With Quote
 
 
 
 
SURFThru.com
Guest
Posts: n/a
 
      01-29-2009
I have this same issue. I am using VS 2008, SQL 2005 and SQL is set to allow
remote connections. I ran aspnet_regsql.exe to create the data store.

When I go back into the Web Site Administration Tool I still get the
following:

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.

 
Reply With Quote
 
SURFThru.com
Guest
Posts: n/a
 
      01-29-2009
I found the issue, but what I did to make this work is not right.

1. Look at the machine.config you will see the following connectoin string.
<add name="LocalSqlServer" connectionString="data
source=.\SQLEXPRESS;Integrated
Security=SSPI;AttachDBFilename=|DataDirectory|aspn etdb.mdf;User
Instance=true" providerName="System.Data.SqlClient"/>

This is what The Config Wizard uses to connect. I have SQL 2005 on my
machine so the connection fails.

2. I changed the connection string to:

<add name="LocalSqlServer" connectionString="Data Source=MYLOCALSERVER;
initial catalog=MYDB_TEST;Integrated Security=True"
providerName="System.Data.SqlClient"/>

And now.... the wizard works... but this is not right. Change the web.config
each time so that you can connect using this tool, ah, something is missing
here.
 
Reply With Quote
 
SURFThru.com
Guest
Posts: n/a
 
      01-29-2009
#2 should have read "Change the connection string in the machine.config each
time for this tool to connect is not right..."

If it was a web.config setting that would be a different story.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VWD 2008 express and Visual Studio 2008 Chen ASP .Net 4 10-11-2009 01:18 AM
Visual studio 2008 remote debugger SP1 on Windows Server 2008 Julien ASP .Net 1 05-18-2009 05:38 PM
Enabling browser back button for GridView Paging and Sorting in Ajax1.1 and 3.5 (using Visual Studio 2005/ Visual studio 2008) anil reddy ASP .Net 0 02-11-2009 04:22 PM
Using the Security section of ASP.NET Configuration in Visual Studio 2008 Nathan Sokalski ASP .Net 4 01-29-2009 01:43 AM
Visual Web Express 2008 X Visual Studio Pro 2008 HRsoft Informática ASP .Net 3 06-09-2008 02:07 PM



Advertisments