Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > Visual Web Developer 2005
|
Visual Web Developer 2005 Discuss creating ASP.NET 2.0 sites with Microsoft's Visual Web Developer 2005. If your question is more specific to a piece of code than the Visual tool, see the ASP.NEt 2.0 forums instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Web Developer 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 23rd, 2006, 02:11 AM
Registered User
 
Join Date: Mar 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Prob with Web Admin Tool - Provider

Hi,

I have finally manage to successfully run aspnet_regsql and there are no connection error. However when I tried to set up a Provider using ASP.net Web Site Administration Tool and tested AspNetSqlProvider, it gives the following error:

"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."

Please advise.

Thanks.
 
Old June 5th, 2006, 01:06 PM
Registered User
 
Join Date: Jun 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here are the steps I took to get it to work correctly, hope it helps you.

1.) Created & Configured the "aspnetdb" database on the SQL Server:


a.) Confirmed SQL server was running, from the command line "sqlcmd -S./SQLEXPRESS" and get the "1>" prompt, type "exit" to exit sqlcmd prompt.
or use Services MMC, the Service may be named something like 'SQL Server(InstanceName)', or "SQl Server (SQLEXPRESS)"

b.) Ran the command line utility aspnet_regsql, which initiated the GUI Wizard, accepted all defaults for the database creation.
Confirmed the database "aspnetdb" was created.

c.) Used the SQL Server Configuration Manger to set the Network & Client Protocal settings
Disabled "Share Memeory" Protocal, another web site tip had indicated the the "Share Memory" protocal was problematic. In case you

Client Protocals "TCP/IP" & "Named Pipes" set to enabled

Moved Client Protocals order to 1 for "TCP/IP"

d.) Added and gave full acces to "NETWORK SERVICE" & "ASPNET" SQL logins to the "aspnetdb" database that was created by the aspent_regsql utility

e.) Enabled/Started the SQL Browser service.

    Restarted SQL Server service.

2.)

Edited the Web.config file

Web.config snippet
----------------------------
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    <appSettings/>
    <connectionStrings>
  <remove name="LocalSqlServer" />
  <add name="LocalSqlServer" connectionString="data source=MySQLServerName\MySQLSvrInstanceName;Integr ated Security=True;Database=aspnetdb;"
   providerName="System.Data.SqlClient" />
----------------------------

Specifically
connectionString="data source=MySQLServerName\MySQLSvrInstanceName;Integr ated Security=True;Database=aspnetdb;"

If you do not have multiple SQL instance installed on you machine, then "MySQLServerName\MySQLSvrInstanceName" would not apply
could be server possibilities like "./SQLEXPRESS", "(local)", , "ServerName" or "."

3.) Used the Internet Information Services MMC

a.) Open the properties for the Web application and on the "ASP.NET" tab confirmed ASP.NET version set to 2.0

b.) Restarted IIS

b.) Restart IIS.

4.) Opened the website project with VS 2005, and selected "ASP.NET Configuration" from Website menu.

Confimed website connectivity to database by going to the "Provider Configuation" in the ASP.NET Web Site Administration Tool,
selecting "Select a single provider for all site management data" and then click the "Test" link and getting
the "Successfully established a connection to the database." confirmation.
 
Old February 1st, 2007, 12:52 AM
Registered User
 
Join Date: Feb 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to MarioCPSI Send a message via MSN to MarioCPSI Send a message via Yahoo to MarioCPSI
Default

This really helped me a lot..

i hope to find simple postings like this one here.

love the quick Tutorials.:D

 
Old February 14th, 2007, 12:53 PM
Registered User
 
Join Date: Feb 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the fix me up, i've spent hours trying to sort this problem out, your post is the all in 1 solution. Thanks again...

 
Old March 4th, 2007, 09:03 PM
Registered User
 
Join Date: Feb 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, this article really helped a lot! I did all the steps and it worked perfectly on my local. However, I would now like the web admin tool to connect to a remote server. I just changed my connectionString to this:

<connectionStrings>
    <remove name="LocalSqlServer"/>
    <add name="LocalSqlServer" connectionString="Data Source=ServerName;Initial Catalog=aspnetdb;Integrated Security=SPPI; User ID= UserName; Password= Password" providerName="System.Data.SqlClient"/>

</connectionStrings>

Is there something wrong with my code? Do I still need to do something elese? By the way, I'm going to connect to a remote server that uses SQL 2005. I've already setup the aspnetdb on the remote server. Can somebody PLEASE help me? :( PLEASE HELP!






Similar Threads
Thread Thread Starter Forum Replies Last Post
Web Site Admin Tool SQL Problem PeteC BOOK: Beginning ASP.NET 2.0 AJAX ISBN: 978-0-470-11283-0 1 July 29th, 2008 12:48 PM
Web Site Admin Tool Rich57 ASP.NET 2.0 Basics 0 October 25th, 2007 03:31 AM
Web Admin Tool - Intended Use? rrflore2 ASP.NET 2.0 Basics 0 February 26th, 2007 10:34 AM
Problem loading Web Admin Tool from within VWD Insel Haber ASP.NET 2.0 Basics 5 December 13th, 2006 02:05 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.