 |
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
 | This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 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
|
|
|
|

June 7th, 2007, 01:11 PM
|
Registered User
|
|
Join Date: Jun 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Chpt 3 - Connect to SQL Server 2000 Database
I'm trying to run the Chat Server on a production machine that uses SQL Server 2000 rather than SQL Server 2005 Express. The connection string in the web.config file reads:
---------------------
</appSettings>
<connectionStrings>
<add name="ConnectionString"
connectionString="Data Source=(local)\SqlExpress;AttachDbFilename=|DataDi rectory|\ChatServerDB.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
--------------
This does not work using a SQL Server 2000 database. I've tried using:
--------------
connectionString="Data Source=___;Database=___;User Id=___;Password=___"/>
--------------
but this does not work. I would appreciate any suggestions.
|

June 7th, 2007, 01:54 PM
|
Registered User
|
|
Join Date: Jun 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
This is the error message I get after I enter my email address and click the "Continue..." button:
---------
Parser Error Message: The entry 'ConnectionString' has already been added.
Source Error:
Line 19:
Line 20: <connectionStrings>
Line 21: <add name="ConnectionString"
Line 22:
Line 23: connectionString="Data Source=127.0.0.1;Initial Catalog=ChatServerDB.mdf;Persist Security Info=True;User ID=___;Password=___"/>
Source File: D:\ndcr_chat\web.config Line: 21
|

June 7th, 2007, 02:19 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
That' an odd error if you only have 1 connection string in your web.config file.
Make sure there's only one connection string called ConnectonString in your web.config. Also, make sure your web site is not inheriting settings from a higher level folder.
Otherwise, try adding a <clear /> element right after the opening <connectionStrings> element.
Hope this helps,
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
Want to be my colleague? Then check out this post.
|

June 7th, 2007, 02:32 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Forgot to mention that you may want to take a look here: http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=395 for some details about connections to SQL Server 2000 / 2005 from an ASP.NET application.
Cheers,
Imar
|

June 7th, 2007, 03:08 PM
|
Registered User
|
|
Join Date: Jun 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Imar, Thanks for the reading/reference link. I'm learning that trying to develop with VWD 2005 Express and deploying to a SQL Server 2000 is quite challenging. I think it may be easier to find a host that hosts SQL Server 2005 (or SQL Server 2005 Express). Do you have any recommendations? I'm looking for a dedicated server the provides SQL Server 2005; I know I can install and use SQL Server 2005 Express on the dedicated server for free, but I would prefer to use the full-blown SQL Server 2005 so as to take advantage of the Enterprise Manager tools.
|

June 7th, 2007, 03:17 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Sorry, no, no recommendations.
I think you'll find that most hosts offer 2000 or 2005 full versions. I don't think there are many hosts offering the Express edition, so I think you'll find the article useful again when you need to move your application to your host.
Were you able to make it work locally?
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
Want to be my colleague? Then check out this post.
|

June 7th, 2007, 03:30 PM
|
Registered User
|
|
Join Date: Jun 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I am able to get it to work locally, but that is because I have SQL Server 2005 Express installed locally. I guess I'll shop around for a SQL Server 2005 host.
|
|
 |