Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics 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 September 14th, 2007, 11:24 AM
Registered User
 
Join Date: Jun 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default HELP NEEDED: Trouble Connecting with SQL Server

I need help regarding connection of my asp.net application with sql server 2005 developer edition by the instance of SQLSERVERDEV.

I have freshly installed my pc installed Visual Studio after SQL SERVER installation. When I run the ASP.NET Configuration. I click on Security to define roles and users but it doesn't connect to database and send me to the provider page. When I click on the Test in front of AspNetSqlProvider It gives me 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.


I ran the aspnet_regsql wizard also and it configured the aspnetdb database in SQL Server 2005 but still I am getting the same error. Please somebody help me I am stuck here!

Thanks a million in advance.

 
Old September 17th, 2007, 01:17 PM
Friend of Wrox
 
Join Date: Jun 2007
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
Default

Since you have a fresh installation, it probably literally does not have the aspnetdb.mdf file that it's looking for. It's created the first time you add a user. If I remember we got around this by making a Create user page for the application. Then ran it locally, and created one user. That initiated all of the database building for the application.

-------------------------

Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.
 
Old September 17th, 2007, 01:21 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

When the database gets generated automatically, it means you're using a local SQL Server Express edition, not the Developer edition.

Did you also configure web.config to talk to the new database instead?

Imar

---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004





Similar Threads
Thread Thread Starter Forum Replies Last Post
Connecting to SQL Server ahying Visual Studio 2005 0 April 30th, 2008 04:03 AM
URGENT:Connecting SQL server through Proxy server abhowal Pro VB Databases 2 January 9th, 2006 01:47 PM
URGENT:Connecting SQL server through Proxy server abhowal SQL Server 2000 3 November 30th, 2005 04:22 AM
Trouble connecting to MySQL server (CH3) mrouse BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 October 20th, 2005 01:44 PM
URGENT:Connecting SQL server through Proxy server sankar SQL Server 2000 0 August 26th, 2003 03:50 AM





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