ASP.NET Configureation - can NOT connect to SQL server

Z

Zilla

Please tell me if there's a more appropriate NG for this topic.

I've googled answers to no avail.

I installed SQL 2008 Express in my machine, then MS Visual Web Developer
2008 Express.
I'm created a web project, with access to a db. When I go to
Website->ASP.NET configuration,
then go to Providers tab on the resulting browser, Select Single Provider,
then click Test, I get

Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site
Administration tool, use the aspnet_regsql command-line utility to create
and configure the database, and then return to this tool to set the
provider.

I have created the database, and have ran aspnet_regsql with same results.
SQL Services ARE running, with TCP/IP and Pipe protocols enabled.

Any pointers?
 
Z

Zilla

Zilla said:
Please tell me if there's a more appropriate NG for this topic.

I've googled answers to no avail.

I installed SQL 2008 Express in my machine, then MS Visual Web Developer
2008 Express.
I'm created a web project, with access to a db. When I go to
Website->ASP.NET configuration,
then go to Providers tab on the resulting browser, Select Single Provider,
then click Test, I get

Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site
Administration tool, use the aspnet_regsql command-line utility to create
and configure the database, and then return to this tool to set the
provider.

I have created the database, and have ran aspnet_regsql with same results.
SQL Services ARE running, with TCP/IP and Pipe protocols enabled.

Any pointers?

BTW, this is on a Vista Premium 32 machine.
 
Z

Zilla

I solved this issue my modifying the connectionString block of the
web.config file.
However, I consider this a SUCKY way to do it. Since web.config is a
"generated"
file, why was it NOT modified when I connected to my DB?
 
J

Juan T. Llibre

re:
!> Since web.config is a "generated" file,
!> why was it NOT modified when I connected to my DB?

Not all configurations are auto-saved to web.config.
In fact, most are not.

Web.config is not a "generated" file, mostly.
Web.config is, mostly, a user-modifiable file.
 
Z

Zilla

Juan T. Llibre said:
re:
!> Since web.config is a "generated" file,
!> why was it NOT modified when I connected to my DB?

Exactly my sentiments - non-consistency.
Not all configurations are auto-saved to web.config.
In fact, most are not.

Web.config is not a "generated" file, mostly.
Web.config is, mostly, a user-modifiable file.

It was "generated" for me when I started my project!
 
J

Juan T. Llibre

re:
!> It was "generated" for me when I started my project!

Indeed, but it will not be auto-edited except for the ASP.NET configuration tool.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
=========================
 

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,768
Messages
2,569,575
Members
45,054
Latest member
LucyCarper

Latest Threads

Top