Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > ASP.NET 4 General Discussion
ASP.NET 4 General Discussion For ASP.NET 4 discussions not relating to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 4 General Discussion 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 April 23rd, 2013, 10:37 PM
Authorized User
Join Date: Dec 2011
Posts: 26
Thanks: 1
Thanked 4 Times in 3 Posts
Default Need deployment cheatsheet AND no Connection string for aspnetdb?

I am trying to figure out how to deploy my site to production.

They talk about connection strings and changing it for production. However, my web config connection strings look like this
      <add name="JamestownDatabaseEntities" connectionString="metadata=res://*/App_Code.Model.csdl|res://*/App_Code.Model.ssdl|res://*/App_Code.Model.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=.\SQLEXPRESS;attachdbfilename=|DataDirectory|\JamestownDatabase.mdf;integrated security=True;user instance=True;multipleactiveresultsets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
It has just the one connection string, but my aspnetdb works fine even though there is no connection string for it. What do I do to get my aspnetdb working in prod? Do I need to add a connection string for it in my web.config?

Ok. I found the http://www.asp.net/web-forms/tutoria...ing-options-cs pages. So, I guess I will just look through that stuff for now. So, I deleted the novel I had in here. However, if someone can help me with the above question about aspnetdb connection string, that'd be great.

Last edited by Notso; April 23rd, 2013 at 10:50 PM..
Old April 24th, 2013, 02:44 AM
Imar's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

Hi there,

Good to see you figured out most of this ;-) You may also find this interesting: http://msdn.microsoft.com/en-us/libr.../hh420322.aspx

For the connection string, check out Chapter 19 and Appendix B of my book as they deal with deployment. In particular page 725 (recreating the database) and further and Page 771 - Configuring Application Services) explain how this works. In short: .NET has a default connection string called LocalSqlServer that is used. You can override that connection string to point to your own database or you can reconfigure the various providers to point to your connection string (page 771 and further).

Hope this helps,

Imar Spaanjaars
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!

Similar Threads
Thread Thread Starter Forum Replies Last Post
connection string Sheraz Khan ASP.NET 2.0 Basics 3 July 5th, 2007 08:33 AM
Connection String aadz5 JSP Basics 1 January 24th, 2005 04:36 AM
Connection String JsonTerre1 BOOK: ASP.NET Website Programming Problem-Design-Solution 5 November 1st, 2004 02:06 AM
Connection string tlamazares SQL Server ASP 1 March 29th, 2004 05:16 PM
Connection String phungleon Dreamweaver (all versions) 1 February 11th, 2004 05:14 AM

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