Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | 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 Display Modes
  #1 (permalink)  
Old January 5th, 2007, 05:42 PM
Authorized User
Points: 174, Level: 3
Points: 174, Level: 3 Points: 174, Level: 3 Points: 174, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2006
Location: , , .
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQL SERVER 2005 STANDARD (not express)

ok, I've tried to get the full website running on 2 different windows xp sp2 machines. Both machines have VS 2005 Professional and SQL server 2005 standard

I've attached aspnetdb and wroxunited databases to sql server studio and changed the owner for each to 'sa'.

In VS, I opened the wroxunited website at c:\websites\wroxunited. Then in vs, I changed the connection info for each data connection (in Server Explorer) to use Microsoft SQL Server (SqlClient)data source, and sql server Authentication - the Test connection is successful for both aspnetdb and wroxunited.

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: 25 - Connection string is not valid)"

When I run on IIS on my laptop, I get this:
ERROR: 400.100 Bad Request
HResult: 0x80004005
Source: Microsoft SQL isapi extension
Description: Query not specified

System.Data.SqlClient.SqlException was unhandled by user code
  Class=20
  ErrorCode=-2146232060
  LineNumber=0
  Message="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: 25 - Connection string is not valid)"
  Number=87
  Server=""
  Source=".Net SqlClient Data Provider"
  State=0
  StackTrace:
       at System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject stateObj)
       at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup)
       at System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
       at System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
       at System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
       at System.Data.ProviderBase.DbConnectionFactory.Creat ePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
       at System.Data.ProviderBase.DbConnectionPool.CreateOb ject(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionPool.UserCrea teRequest(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection owningConnection)
       at System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
       at System.Data.SqlClient.SqlConnection.Open()
       at System.Web.DataAccess.SqlConnectionHolder.Open(Htt pContext context, Boolean revertImpersonate)
       at System.Web.DataAccess.SqlConnectionHelper.GetConne ction(String connectionString, Boolean revertImpersonation)
       at System.Web.Profile.SqlProfileProvider.GetPropertyV aluesFromDatabase(String userName, SettingsPropertyValueCollection svc)
       at System.Web.Profile.SqlProfileProvider.GetPropertyV alues(SettingsContext sc, SettingsPropertyCollection properties)
       at System.Configuration.SettingsBase.GetPropertiesFro mProvider(SettingsProvider provider)
       at System.Configuration.SettingsBase.GetPropertyValue ByName(String propertyName)
       at System.Configuration.SettingsBase.get_Item(String propertyName)
       at System.Web.Profile.ProfileBase.GetInternal(String propertyName)
       at System.Web.Profile.ProfileBase.get_Item(String propertyName)
       at System.Web.Profile.ProfileBase.GetPropertyValue(St ring propertyName)
       at ProfileCommon.get_Theme() in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET Files\wroxunited\2112705c\14c1a696\App_Code.ladly7 gj.6.vb:line 114
       at Wrox.Web.GlobalEvents.ThemeModule.app_PreRequestHa ndlerExecute(Object Sender, EventArgs E) in C:\Websites\WroxUnited\App_Code\ThemeModule.vb:lin e 30
       at System.Web.HttpApplication.SyncEventExecutionStep. System.Web.HttpApplication.IExecutionStep.Execute( )
       at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously)


Sincerely,
Brian
__________________
Sincerely,
Brian
  #2 (permalink)  
Old January 5th, 2007, 06:06 PM
Imar's Avatar
Wrox Author
Points: 71,768, Level: 100
Points: 71,768, Level: 100 Points: 71,768, Level: 100 Points: 71,768, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,031
Thanks: 80
Thanked 1,580 Times in 1,557 Posts
Default

Quote:
quote:provider: SQL Network Interfaces, error: 25 - Connection string is not valid
This seems to suggest there's something wrong with the connection string. How does it look?

And how does your SQL statement look like? Did you try a simple SELECT statement?

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.
  #3 (permalink)  
Old January 5th, 2007, 06:38 PM
Authorized User
Points: 174, Level: 3
Points: 174, Level: 3 Points: 174, Level: 3 Points: 174, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2006
Location: , , .
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by Imar
 
Quote:
quote:provider: SQL Network Interfaces, error: 25 - Connection string is not valid
This seems to suggest there's something wrong with the connection string. How does it look?

And how does your SQL statement look like? Did you try a simple SELECT statement?

Imar
Imar, Thanks.

I was getting frustrated, but I finally got it figured out for Cassini on my laptop. I realized with trial and error that I could choose advanced and set the properties THEN copy the connection string that is auto-built in the advanced window. So now it looks like this:

Data Source=MYLAPTOP;Initial Catalog=WROXUNITED.MDF;Persist Security Info=True;User ID=sa;Password=mypassword;Network Library=dbmssocn

I had to specifically use the TCP as well because I was getting a named pipes error (it thinks for some reason that pipes aren't open on the SQL end, but I do have them configured that way.

Also, I found there is no need to comment out the call to themes from Web.config now that the connection info is good, as was suggested somewhere in Lightwaver's thread. I'm using a modification of Lightwaver's connection string, as posted previously...

I'm such a newb! lol... here's my connection string to replace in web.config for others that may have the same problem using SQL server 2005 STANDARD

    <connectionStrings>
        <remove name="LocalSqlServer"/>
        <add name="LocalSqlServer" connectionString="Data Source=MYLAPTOP;Initial Catalog=G:\BEGASPNET2\FINALAPPLICATION\WROXUNITED\ APP_DATA\ASPNETDB.MDF;Persist Security Info=True;User ID=sa;Password=mypassword;Network Library=dbmssocn"/>
        <add name="WroxUnited" connectionString="Data Source=MYLAPTOP;Initial Catalog=WROXUNITED.MDF;Persist Security Info=True;User ID=sa;Password=mypassword;Network Library=dbmssocn" />
    </connectionStrings>


Sincerely,
Brian
  #4 (permalink)  
Old January 5th, 2007, 06:43 PM
Imar's Avatar
Wrox Author
Points: 71,768, Level: 100
Points: 71,768, Level: 100 Points: 71,768, Level: 100 Points: 71,768, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,031
Thanks: 80
Thanked 1,580 Times in 1,557 Posts
Default

Glad it's working.

For a lot more information about having SQL Server and ASP.NET play nice together, you can also take a look here: http://Imar.Spaanjaars.Com/QuickDocId.aspx?quickdoc=395

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.
  #5 (permalink)  
Old January 5th, 2007, 06:58 PM
Authorized User
Points: 174, Level: 3
Points: 174, Level: 3 Points: 174, Level: 3 Points: 174, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2006
Location: , , .
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks, I'll check out the site. Mayber there's some info there on working with IIS??? I keep getting this error:
ERROR: 400.100 Bad Request
HResult: 0x80004005
Source: Microsoft SQL isapi extension
Description: Query not specified


Sincerely,
Brian
  #6 (permalink)  
Old January 5th, 2007, 07:00 PM
Imar's Avatar
Wrox Author
Points: 71,768, Level: 100
Points: 71,768, Level: 100 Points: 71,768, Level: 100 Points: 71,768, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,031
Thanks: 80
Thanked 1,580 Times in 1,557 Posts
Default

0x80004005 errors are almost always related to security problems. However, that's hard to tell without seeing your code as the error message also suggests there's something wrong with your query.

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.
  #7 (permalink)  
Old January 5th, 2007, 07:04 PM
Authorized User
Points: 174, Level: 3
Points: 174, Level: 3 Points: 174, Level: 3 Points: 174, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2006
Location: , , .
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default

it's the WroxUnited application.

Sincerely,
Brian
  #8 (permalink)  
Old January 6th, 2007, 09:21 AM
Imar's Avatar
Wrox Author
Points: 71,768, Level: 100
Points: 71,768, Level: 100 Points: 71,768, Level: 100 Points: 71,768, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,031
Thanks: 80
Thanked 1,580 Times in 1,557 Posts
Default

I don't have the book, so I don't know what code you're talking about... ;)

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
While typing this post, I was listening to: Sporen by Opgezwolle (Track 1 from the album: Vloeistof) What's This?
  #9 (permalink)  
Old January 8th, 2007, 07:55 PM
Authorized User
Points: 174, Level: 3
Points: 174, Level: 3 Points: 174, Level: 3 Points: 174, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2006
Location: , , .
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Imar,

that isapi error appears to be related to using SQLXML 3.0 Virtual Dir Management in connection with SQL "Standard". When I had SQL Express installed, the SQLXML 3.0 virt tool worked well, but not so well with SQL Standard (2005). From what I can glean, it appears SQL 2005 Standard has SQLXML 4.0 built in. Perhaps the Express SQL didn't have any version of SQLXML built in, that's why the version 3.0 works with SQL Express.

Anyhoo, thank you so much for your help!!

Oh, I get to these forums via the link from the page for "Beginning ASP.NET 2.0", and it is this book that goes through the WroxUnited application. I mistakenly assumed you got here through the same route :)


Sincerely,
Brian
 


Thread Tools
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
Remoting and SQL Server 2005 Express Bob Bedell C# 2005 15 January 3rd, 2008 12:52 AM
.NET Remoting and SQL Server 2005 express Bob Bedell SQL Server 2005 1 December 21st, 2007 09:37 AM
Wrox with VS Pro and SQL Server 2005 Standard danjpohl BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 38 June 8th, 2006 03:44 PM
SQL Server 2005 Express Problem asped_man BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 3 November 29th, 2005 04:07 AM



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


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