 |
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 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
|
|
|
|
|

September 21st, 2006, 12:45 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 105
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Hi Harry,
The SQl Protocols team blog also have a few good posts on SQl Express connection problems. Try running through these and see if they help at all.
Hope that helps,
Dan
|
|

February 10th, 2007, 10:06 PM
|
|
Authorized User
|
|
Join Date: Feb 2007
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I keep getting this error. I'm using VS 2005 std edition. I need help.
The user instance login flag is not supported on this version of SQL Server. The connection will be closed.
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: The user instance login flag is not supported on this version of SQL Server. The connection will be closed.
Source Error:
Line 109: public virtual string Theme {
Line 110: get {
Line 111: return ((string)(this.GetPropertyValue("Theme")));
Line 112: }
Line 113: set {
Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET Files\wroxunited\fa445607\abe8c60a\App_Code.07voer qo.7.cs Line: 111
Stack Trace:
[SqlException (0x80131904): The user instance login flag is not supported on this version of SQL Server. The connection will be closed.]
System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection) +115
System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject stateObj) +346
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +3244
System.Data.SqlClient.SqlInternalConnectionTds.Com pleteLogin(Boolean enlistOK) +56
System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +1083
System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +272
System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +351
System.Data.ProviderBase.DbConnectionFactory.Creat ePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +82
System.Data.ProviderBase.DbConnectionPool.CreateOb ject(DbConnection owningObject) +558
System.Data.ProviderBase.DbConnectionPool.UserCrea teRequest(DbConnection owningObject) +126
System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection owningObject) +651
System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection owningConnection) +160
System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +122
System.Data.SqlClient.SqlConnection.Open() +229
System.Web.DataAccess.SqlConnectionHolder.Open(Htt pContext context, Boolean revertImpersonate) +114
System.Web.DataAccess.SqlConnectionHelper.GetConne ction(String connectionString, Boolean revertImpersonation) +225
System.Web.Profile.SqlProfileProvider.GetPropertyV aluesFromDatabase(String userName, SettingsPropertyValueCollection svc) +1005
System.Web.Profile.SqlProfileProvider.GetPropertyV alues(SettingsContext sc, SettingsPropertyCollection properties) +467
System.Configuration.SettingsBase.GetPropertiesFro mProvider(SettingsProvider provider) +325
System.Configuration.SettingsBase.GetPropertyValue ByName(String propertyName) +372
System.Configuration.SettingsBase.get_Item(String propertyName) +142
System.Web.Profile.ProfileBase.GetInternal(String propertyName) +52
System.Web.Profile.ProfileBase.get_Item(String propertyName) +91
System.Web.Profile.ProfileBase.GetPropertyValue(St ring propertyName) +29
ProfileCommon.get_Theme() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET Files\wroxunited\fa445607\abe8c60a\App_Code.07voer qo.7.cs:111
Wrox.Web.GlobalEvents.ThemeModule.app_PreRequestHa ndlerExecute(Object Sender, EventArgs E) in c:\WroxUnited\app_Code\ThemeModule.cs:20
System.Web.SyncEventExecutionStep.System.Web.HttpA pplication.IExecutionStep.Execute() +167
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously) +117
|
|

February 11th, 2007, 05:40 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Did you read the thread before you posted this?
The answer is in the previous posts in this thread. You need to remove User Instance=True from your connection string as that only applies to SQL Server Express 2005.
Cheers,
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.
|
|

February 11th, 2007, 02:41 PM
|
|
Authorized User
|
|
Join Date: Feb 2007
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Yes, I read that. I also searched all forums and found no answeres.
|
|

February 11th, 2007, 04:02 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
But did you remove the User Instance=True attribute from your connection string? If so, did it help?
If not, can you provide more details?
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.
|
|

February 11th, 2007, 04:24 PM
|
|
Authorized User
|
|
Join Date: Feb 2007
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Like what I said, I searched and did everything related to this issue. Yes, I remove that. It did not help.
The only thing I did was copy the finished product Wrox United which and place it on c:\wroxunited. It's working fine on Visual
Web Express. When I open the website on VS 2005 Std, (open, website, c:\wroxunited) then wroxunited.mdf, aspnetdb.mdf are not connected. So I modified the connection string. Now they're connected. I can view their tables, data everything but when I press F5 it gives me the mentioned error. I already spent 6 hours trying to figure this out. Hopefully you can help me.
Thanks in advance.
|
|

February 11th, 2007, 04:30 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Can you post your connection string?
Also, are you using the Express edition of SQL Server 2005? And do you have the databases still in App_Data? Or dod you connect them to SQL Server using tools like Management Studio?
Finally, did you grant permissions for your web server account to the App_Code folder?
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.
|
|

February 11th, 2007, 04:52 PM
|
|
Authorized User
|
|
Join Date: Feb 2007
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Can you post your connection string?
<connectionStrings>
<add name="WroxUnited"
connectionString="Data Source=seven\sqlexpress;Initial Catalog=WroxUnited;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
Also, are you using the Express edition of SQL Server 2005?
This is one thing I'm not sure of. There was a time in my confusion, I installed SQL 2005 express edition on top of VS 2005 std (NOT SURE) but let me know how can i find that out
And do you have the databases still in App_Data?
Yes, wroxunited.mdf and aspnetdb.mdf are both on c:\wroxunited\app_data
Or dod you connect them to SQL Server using tools like Management Studio?
I tried this one also and did not have a problem.
I notice just now when I open the wroxunited website. I see something like these:
aspnetdb.mdf
seven\sqlexpress.aspnetdb.mdf.dbo
seven\sqlexpress.wroxunited.mdf.dbo
wroxunited.mdf
seven is the computer name or localhost
It seems to me that it doesn't recognize my connection.
Permissions on the webserver account to the app_code folder?
I don't understand this. Can you give details?
Thanks again.
|
|

February 11th, 2007, 05:02 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Basically, when you attached databases to SQL Express, you may want to detach them first. SQL Server has problems attaching databases on the fly in your code when they are already attached. Use Management Studio again to detach them.
Next, make sure the webserver has permissions to write to App_Data. Normally, when you run the site from within VWD, *your* account is used. However, when you run the site under IIS, a special web server account is used. Refer to these two FAQs to find out the proper account and how to configure the security for App_Data.
Once you have done these two things, you should be able to make it work again.
http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=287
http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=290
(For SQL Server Express, you need the first part of the second article, not the second).
If you're using the full version of SQL Server, you may also want to take a look here:
http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=395
Cheers,
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: Airbag by Rjd2 (Track 3 from the album: Exit Music Songs With Radio Heads) What's This?
|
|

February 11th, 2007, 08:37 PM
|
|
Authorized User
|
|
Join Date: Feb 2007
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Following your first link 287, I don't see any security tab on the folder when I right-click.
Can we just do this offline?
|
|
 |