Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 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 August 7th, 2006, 04:21 PM
Authorized User
 
Join Date: Aug 2006
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to abel714 Send a message via Yahoo to abel714
Default

Ok, I'm a little more confused now.

I kept getting the message "there are build errors....", and I always clicked "NO" to not continue, and that's when I posted my errors.

However, this time when I clicked the green play arrow, I selected "YES", just to see where it would go so I could hopefully post more information about the errors I am getting.

Only, the pages all come up and appear to work, despite the error messages I receive.

I am going to fiddle a little more and see if I can post data and see if it holds, and then check the event logs and all other areas that may tell me what is going on, and hopefully I will be able to uncover more information as to what is going on.



 
Old August 7th, 2006, 04:26 PM
Authorized User
 
Join Date: Aug 2006
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to abel714 Send a message via Yahoo to abel714
Default

I am able to run the CMS website just fine under VSE 2005, which opens IE on its own port, and that works just fine.

However, when I run the website under normal conditions within the web browser, I get the following error message:

Server Error in '/Cms' Application.
An attempt to attach an auto-named database for file D:\inetpub\wwwroot\Cms\App_Data\Cms.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
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 attempt to attach an auto-named database for file D:\inetpub\wwwroot\Cms\App_Data\Cms.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

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 attempt to attach an auto-named database for file D:\inetpub\wwwroot\Cms\App_Data\Cms.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.]
   System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection) +734979
   System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject stateObj) +188
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838
   System.Data.SqlClient.SqlInternalConnectionTds.Com pleteLogin(Boolean enlistOK) +33
   System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628
   System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170
   System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359
   System.Data.ProviderBase.DbConnectionFactory.Creat ePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
   System.Data.ProviderBase.DbConnectionPool.CreateOb ject(DbConnection owningObject) +424
   System.Data.ProviderBase.DbConnectionPool.UserCrea teRequest(DbConnection owningObject) +66
   System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection owningObject) +496
   System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection owningConnection) +82
   System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
   System.Data.SqlClient.SqlConnection.Open() +111
   System.Data.Common.DbDataAdapter.FillInternal(Data Set dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83
   System.Web.UI.WebControls.SqlDataSourceView.Execut eSelect(DataSourceSelectArguments arguments) +1770
   System.Web.UI.WebControls.Repeater.GetData() +50
   System.Web.UI.WebControls.Repeater.CreateControlHi erarchy(Boolean useDataSource) +232
   System.Web.UI.WebControls.Repeater.OnDataBinding(E ventArgs e) +53
   System.Web.UI.WebControls.Repeater.DataBind() +72
   System.Web.UI.WebControls.Repeater.EnsureDataBound () +55
   System.Web.UI.WebControls.Repeater.OnPreRender(Eve ntArgs e) +12
   System.Web.UI.Control.PreRenderRecursiveInternal() +77
   System.Web.UI.Control.PreRenderRecursiveInternal() +161
   System.Web.UI.Control.PreRenderRecursiveInternal() +161
   System.Web.UI.Control.PreRenderRecursiveInternal() +161
   System.Web.UI.Control.PreRenderRecursiveInternal() +161
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360


Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

I thought it made no difference between the browser being in VSE 2005 and the regular browser, but I guess it does.

I'm thoroghly confused now.

 
Old August 7th, 2006, 04:26 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi abel (correct??),

If you click my name in the left column of each of my messages, you can send me an e-mail. I'll reply so you know my e-mail and then you can send me some screen shots or other relevant files.

It's midnight here so it may take some time...

Imar
---------------------------------------
Imar Spaanjaars
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.
 
Old August 7th, 2006, 04:28 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Does the ASPNET account on your machine have full access to the App_Data folder of the website at D:\inetpub\wwwroot\Cms\App_Data??

Imar
---------------------------------------
Imar Spaanjaars
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.
 
Old August 19th, 2006, 07:41 AM
Authorized User
 
Join Date: Aug 2006
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to abel714 Send a message via Yahoo to abel714
Default

Yes, FULL ACCESS.

 
Old August 19th, 2006, 07:47 AM
Authorized User
 
Join Date: Aug 2006
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to abel714 Send a message via Yahoo to abel714
Default

I am getting erros in my logs that reflect that the program is trying write a new SQL database file if one doesn't already exist, and even though one DOES exist, it still tries to write.

Here is that error message in its entirety, below:

(please keep in mind that the directions for manually installing the blog were followed verbatim from the book):

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 8/19/2006 5:42:38 AM
Event time (UTC): 8/19/2006 12:42:38 PM
Event ID: e3157f772e934bb392d3f42f45f65a3c
Event sequence: 4
Event occurrence: 1
Event detail code: 0

Application information:
    Application domain: /LM/W3SVC/1/Root/blog-1-128004649408281250
    Trust level: Full
    Application Virtual Path: /blog
    Application Path: d:\www\blog\
    Machine name: N01

Process information:
    Process ID: 3928
    Process name: aspnet_wp.exe
    Account name: N01\ASPNET

Exception information:
    Exception type: SqlException
    Exception message: An attempt to attach an auto-named database for file d:\www\blog\App_Data\Blog.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

Request information:
    Request URL: http://localhost/blog/Default.aspx
    Request path: /blog/Default.aspx
    User host address: 127.0.0.1
    User:
    Is authenticated: False
    Authentication Type:
    Thread account name: N01\ASPNET

Thread information:
    Thread ID: 1
    Thread account name: N01\ASPNET
    Is impersonating: False
    Stack trace: 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.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlInternalConnectionTds.Com pleteLogin(Boolean enlistOK)
   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 BlogManagerDB.GetCategories() in d:\www\blog\App_Code\DataAccess\BlogManagerDB.vb:l ine 233
   at BlogManager.GetCategories() in d:\www\blog\App_Code\BusinessLogic\BlogManager.vb: line 79
   at BlogEntriesFilter.Page_Load(Object sender, EventArgs e) in d:\www\blog\Controls\BlogEntriesFilter.ascx.vb:lin e 30
   at System.Web.UI.Control.OnLoad(EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


Custom event details:

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Mike

 
Old August 19th, 2006, 07:53 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
quote:(please keep in mind that the directions for manually installing the blog were followed verbatim from the book):
Were they? Then where does the d:\www\blog\ folder come from?

I am a bit confused and not sure what to say. It looks like you already attached a copy of the Blog database to SQL Server and so it doesn't allow you to attach another one.

Do you have a copy of the express edition of the management studio for SQL Server? You can download a copy here: http://msdn.microsoft.com/vstudio/express/sql/

You can also take a look at sseutil: http://www.microsoft.com/downloads/d...DisplayLang=en It allows you to see what databases have been attached to SQL Express.

Maybe these tools can shed some light on what's going on?

Imar
---------------------------------------
Imar Spaanjaars
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: Mony Mony by Billy Idol (Track 6 from the album: 11 Of The Best) What's This?
 
Old August 19th, 2006, 08:57 AM
Authorized User
 
Join Date: Aug 2006
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to abel714 Send a message via Yahoo to abel714
Default

I am confused as to your reply.

I have Visual Studio Express 2005, which includes SQL Server 2005 Expresss.

I have the website installed at d:\www\blog

Everything works within VSE as far as the blog page coming up, but when I use it outside of that, I get the db error from SQL.

So, you're saying you don't know why I'm getting this error? I'm sorry, I don't understand your last reply.

 
Old August 19th, 2006, 09:04 AM
Authorized User
 
Join Date: Aug 2006
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to abel714 Send a message via Yahoo to abel714
Default

I am heading out to take my kid to a Dr. appmt, but will try to remain connected when I get the chance to connect via my cell phone, which will be significantly slower, but I will be watching this thread to see your reply.

I am also going to rename my blog dir to d:\www\blog_bak and use the installation utility, update using the updated zip, and see if there are any differences in files, permissions, etc, and post the results back, if any.

If you could please bare with me on this and try to understand that I am not fluent with any of this, and am doing my best to work with you on finding a solution to this.

I explained what I had installed, and have my IIS setup correctly, as I have a little intranet that I frequently use and update, as I am studying to be in this field, so ASP.NET 2.0 is my main focus for learning new tech, and your book is what I started with.

However, I am not fluent to many things, but do understand the typical things, as I am MCSE+Internet, just to give you an idea of my experience and understanding. I do not, however, understand what's going on, but plan to try and find out as much as I can, and help you help me.

Thank you for understanding, and being patient.

Mike

 
Old August 19th, 2006, 09:07 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

What was it in my previous message that you didn't understand?

I linked you to two tools that you can help diagnose the problem. I may be easy to fix if I was sitting next to you, but remotely things are a bit more difficult. With the tools I linked to you can take a look at SQL Server's attached databases and see if the error message you get is correct. Doesn't that sound useful?

The "express edition of the management studio for SQL Server" is not the same as SQL Server Express. Instead, these are tools to manage your database, similar to the commercial version.

Imar
---------------------------------------
Imar Spaanjaars
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.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Application.exit() fails to terminate application. saumya General .NET 1 January 4th, 2008 09:50 AM
Web Application OR Windows Application adesilva .NET Framework 2.0 2 May 4th, 2007 07:12 AM
Merging blog application into existing web Insel Haber BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 4 October 26th, 2006 02:11 PM
Console application and web application nsrujan ASP.NET 1.0 and 1.1 Basics 1 April 16th, 2005 10:35 PM
Web application Vs Windows Application Ned .NET Web Services 2 January 20th, 2004 01:27 PM





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