Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8
This is the forum to discuss the Wrox book Beginning ASP.NET 2.0 by Chris Hart, John Kauffman, David Sussman, Chris Ullman; ISBN: 9780764588501
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 16th, 2006, 02:03 PM
Registered User
 
Join Date: Sep 2006
Location: baton rouge, LA, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Database Problem /Chapter 03 Wrox United Example

I am trying to do the examples from Chapter 03 with the Wrox United files but when i go to run the site I am getting this error message.

Server Error in '/WroxUnited' Application.
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)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: 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)

Source Error:

Line 112: Public Overridable Property Theme() As String
Line 113: Get
Line 114: Return CType(Me.GetPropertyValue("Theme"),String)
Line 115: End Get
Line 116: Set


Source File: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET Files\wroxunited\23e58e6c\d0079918\App_Code.1lwpdy o2.5.vb Line: 114

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. OnError(SqlException exception, Boolean breakConnection) +117
System.Data.SqlClient.TdsParser.ThrowExcepti onAndWarning(TdsParserStateObject stateObj) +346
System.Data.SqlClient.TdsParser.Connect(Bool ean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup) +1091
System.Data.SqlClient.SqlInternalConnectionT ds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +1083
System.Data.SqlClient.SqlInternalConnectionT ds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +272
System.Data.SqlClient.SqlConnectionFactory.C reateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +351
System.Data.ProviderBase.DbConnectionFactory .CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +82
System.Data.ProviderBase.DbConnectionPool.Cr eateObject(DbConnection owningObject) +558
System.Data.ProviderBase.DbConnectionPool.Us erCreateRequest(DbConnection owningObject) +126
System.Data.ProviderBase.DbConnectionPool.Ge tConnection(DbConnection owningObject) +651
System.Data.ProviderBase.DbConnectionFactory .GetConnection(DbConnection owningConnection) +160
System.Data.ProviderBase.DbConnectionClosed. OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +122
System.Data.SqlClient.SqlConnection.Open() +229
System.Web.DataAccess.SqlConnectionHolder.Op en(HttpContext context, Boolean revertImpersonate) +114
System.Web.DataAccess.SqlConnectionHelper.Ge tConnection(String connectionString, Boolean revertImpersonation) +225
System.Web.Profile.SqlProfileProvider.GetPro pertyValuesFromDatabase(String userName, SettingsPropertyValueCollection svc) +1005
System.Web.Profile.SqlProfileProvider.GetPro pertyValues(SettingsContext sc, SettingsPropertyCollection properties) +467
System.Configuration.SettingsBase.GetPropert iesFromProvider(SettingsProvider provider) +325
System.Configuration.SettingsBase.GetPropert yValueByName(String propertyName) +372
System.Configuration.SettingsBase.get_Item(S tring propertyName) +142
System.Web.Profile.ProfileBase.GetInternal(S tring propertyName) +52
System.Web.Profile.ProfileBase.get_Item(Stri ng propertyName) +91
System.Web.Profile.ProfileBase.GetPropertyVa lue(String propertyName) +29
ProfileCommon.get_Theme() in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET Files\wroxunited\23e58e6c\d0079918\App_Code.1lwpdy o2.5.vb:114
Wrox.Web.GlobalEvents.ThemeModule.app_PreReq uestHandlerExecute(Object Sender, EventArgs E) in C:\BegASPNET2\Chapters\Begin\Chapter03\WroxUnited\ App_Code\ThemeModule.vb:30
System.Web.SyncEventExecutionStep.System.Web .HttpApplication.IExecutionStep.Execute() +167
System.Web.HttpApplication.ExecuteStep(IExec utionStep step, Boolean& completedSynchronously) +117
  #2 (permalink)  
Old September 25th, 2006, 12:25 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Banbury, , United Kingdom.
Posts: 105
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to DanM
Default

Hi there,

It looks like you're having trouble hooking up your site to the database. Can I check with you that you have both Visual Web Developer Express and SQL Server Express installed and running?

If so, then can you try the following

- Go to the download for Chapter 3 you got from the wrox website.
- Unzip it into a new directory
- Open VWD, and click File | Open Website
- Navigate to the new WroxUnited directory you created when you unzipped the download and hit OK.
- When the website has been loaded in VWD, press F5 to run the website.
- The site should load correctly.

I've verified this works with both the Chapter 3 single download and the code for chapter 3 in the full book download. You can get both at
http://www.wrox.com/WileyCDA/WroxTit...load_code.html

If it's still not working, please let me know and we'll go from there.

Thanks, Dan
  #3 (permalink)  
Old January 17th, 2007, 01:13 AM
Registered User
 
Join Date: Jan 2007
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am having the same problem as Dynamicarray is, same exact error. My question is I don't know how to tell if SQL Server Express is running or not, or if it is configured correctly. When I press Start and All Programs, I see Microsoft SQL Server 2005, and then I press that icon, and I get the Configuration tools folder with the following items: SQL Server Configuration Manager, Error and Usage Reporting, and Surface Area Configuration. Does that mean Microsoft SQL 2005 Express Edition is set up? Do I have to change anything with the Configuration tools? Should there be an executable for Microsoft SQL 2005 Express Edition that I should click on. I checked in the Visual Basic 2005 Express Edition, and the icon is there for the SQL Database in Add New Item under Program. The problem I'm having with chapter 3 of Visual Basic 2005 Express Edition is knowing how to tell if everything is set up correctly for the SQL Database, or as I mentioned before do I have to configure anything with the configuration tools. This Wrox Press book doesn't give enough information about Microsoft SQL 2005 Express Edition setup or configuration. I have sat here for hours tring to figure how to bring up this database which shouldn't have taken more than a couple of minutes. Usually, I like Wrox materials, but I wouldn't give this to a beginning programmer, unless I hated that person.

Jim Bagby



  #4 (permalink)  
Old February 12th, 2007, 09:24 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Banbury, , United Kingdom.
Posts: 105
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to DanM
Default

Hi Jim,

The easiest way to tell if SQL Express is running is go to Start Menu>Control Panel>Administrative Tools>Services and see if you can find SQL Express in that listing and that it is 'started' and start it if not.

If you're running SQL Express on the same machine as your website, then no you shouldn't need to do anything else because SQL Express should pick up the database files from your websites app_data file automatically and make them available to the site.

If you're comfortable with SQL and command line utilities, the best way to make sure a SQl Express database is working as expected is to use the sseutil app available here - http://www.microsoft.com/downloads/d...DisplayLang=en. There's a rundown of useful commands for it here. http://weblogs.asp.net/scottgu/archi...15/433284.aspx

The idea behind using SQL Express was that you just install it as part of VWD and it works out of the box. The issue is that its a bit of a black box if it starts not to work. Ah well. Just mail back here or check in the SQL Server forums here on wrox.com if you need more help.

Dan

Dan Maharry
Read the feed at http://feeds.feedburner.com/dansarchive
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wrox United - Database Connection Prob Martin Rushton BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 5 December 26th, 2012 08:22 AM
Wrox United - chapter 14 - error SqlDependency tom_10000001 BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 1 November 10th, 2006 06:22 AM
Wrox United chapter 4 diango BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 4 December 29th, 2005 12:47 PM



All times are GMT -4. The time now is 12:58 PM.


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