Wrox Programmer Forums
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 May 6th, 2006, 07:27 AM
Authorized User
Join Date: Jun 2003
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Deployment problems

Hi all,
I've made a website using most of the code found in the Wrox website.
ANd i've tried uploading it to my own website.
I'm having big problems with the login control.
It seems to use it's own database which is fair enough, but I can't find the connection string for it anywhere.

Upshot of this is that I copied all the files accross to my webiste, the front page works fine, but when I try and log in I get the following error

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SqlException (0x80131904): An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)]
   System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection) +734995
   System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject stateObj) +188
.. >

My webhosts say that I would need to create the database on the webserver blah blah blah. All fine with me but the main issue is that I can't see where in the login control you can point it to this new database.

Any help would be very much appreciated. I am loathe to have to write my own login manager when one is provided, but if i can't get it to work on a real website, what use is it.

IF i sound negative it's because i've been banging my head against a brick wall with the website support people.

Many thanks.
Old May 8th, 2006, 01:50 PM
Friend of Wrox
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts

You have to look into membership providers. These are stored in the web.config. You will have to create them in the web.config to use them. There are lots of examples in the VS help.

Old May 9th, 2006, 04:15 AM
Authorized User
Join Date: Jun 2003
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts

Well I think the easiest solution that I've found is to run aspreg_sql.exe (not sure of it's name off the top of my head) and select a database that you are already using. This program will add all the relevant tables to the one you are using. Since most web hosts limit the number of databases you can have, this seems like a good solution to me.
And then of course as you say, you must change the setting in the web.config file. I think it's a shame that this wasn't covered in the book. Anyone who wanted to deploy the website following the book would experience problems. A lot of people probably wouldn't ask or search the web for an answer.
Thanks for responding.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Permission Problems on Deployment Hank_Marietta BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 3 August 22nd, 2007 12:29 PM
Deployment Problems rssimmons BOOK: Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter ISBN: 978-0-7645-8807-5 1 August 12th, 2007 10:05 PM
deployment p2pMember ASP.NET 2.0 Basics 0 June 7th, 2007 01:12 AM
Deployment sen22 .NET Framework 2.0 1 April 17th, 2007 02:38 PM
Deployment regbnvl BOOK: Professional VB 2005 ISBN: 0-7645-7536-8 0 May 7th, 2006 04:44 PM

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