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: ASP.NET 3.5 Website Programming Problem Design Solution
This is the forum to discuss the Wrox book ASP.NET 3.5 Website Programming Problem Design Solution by Chris Love; ISBN: 978-0-470-18758-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 3.5 Website Programming Problem Design Solution 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
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old November 4th, 2009, 12:35 PM
Fed Fed is offline
Authorized User
 
Join Date: Oct 2009
Posts: 55
Thanks: 26
Thanked 0 Times in 0 Posts
Default Database problem

Hi,

When I do a Ctrl F5 on the default.aspx I get the following;


Server Error in '/BeerHouse35' Application.
--------------------------------------------------------------------------------

Cannot open database "TheBeerHouseVB" requested by the login. The login failed.
Login failed for user 'INFODOMI-8A4297\fxs'.
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: Cannot open database "TheBeerHouseVB" requested by the login. The login failed.
Login failed for user 'INFODOMI-8A4297\fxs'.

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): Cannot open database "TheBeerHouseVB" requested by the login. The login failed.
Login failed for user 'INFODOMI-8A4297\fxs'.]
System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection) +4846887
System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject stateObj) +194
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392
System.Data.SqlClient.SqlInternalConnectionTds.Com pleteLogin(Boolean enlistOK) +35
System.Data.SqlClient.SqlInternalConnectionTds.Att emptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +144
System.Data.SqlClient.SqlInternalConnectionTds.Log inNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +342
System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +221
System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +189
System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +185
System.Data.ProviderBase.DbConnectionFactory.Creat ePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +31
System.Data.ProviderBase.DbConnectionPool.CreateOb ject(DbConnection owningObject) +433
System.Data.ProviderBase.DbConnectionPool.UserCrea teRequest(DbConnection owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection owningObject) +499
System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection owningConnection) +65
System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117
System.Data.SqlClient.SqlConnection.Open() +122
System.Data.EntityClient.EntityConnection.OpenStor eConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) +47

[EntityException: The underlying provider failed on Open.]
System.Data.EntityClient.EntityConnection.OpenStor eConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) +168
System.Data.EntityClient.EntityConnection.Open() +96
System.Data.Objects.ObjectContext.EnsureConnection () +81
System.Data.Objects.ObjectQuery`1.GetResults(Nulla ble`1 forMergeOption) +46
System.Data.Objects.ObjectQuery`1.System.Collectio ns.Generic.IEnumerable<T>.GetEnumerator() +44
System.Linq.Enumerable.FirstOrDefault(IEnumerable` 1 source) +203
System.Data.Objects.ELinq.ObjectQueryProvider.<Get ElementFunction>b__1(IEnumerable`1 sequence) +40
System.Data.Objects.ELinq.ObjectQueryProvider.Exec uteSingle(IEnumerable`1 query, Expression queryRoot) +59
System.Data.Objects.ELinq.ObjectQueryProvider.Syst em.Linq.IQueryProvider.Execute(Expression expression) +109
System.Linq.Queryable.FirstOrDefault(IQueryable`1 source) +269
TheBeerHouse.BLL.SiteMapRepository.GetSiteMapInfoB yURL(String URL) in C:\Application Projects\BeerHouse\VB\TBHBLL\Navigation\SiteMapRep ository.vb:142
TheBeerHouse.URLRewrite.Rewrite(HttpApplication app) in C:\Application Projects\BeerHouse\VB\TBHBLL\Modules\URLRewrite.vb :59
TheBeerHouse.URLRewrite.BeginRequest(Object sender, EventArgs e) in C:\Application Projects\BeerHouse\VB\TBHBLL\Modules\URLRewrite.vb :38
System.Web.SyncEventExecutionStep.System.Web.HttpA pplication.IExecutionStep.Execute() +68
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously) +75




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.4028


When I try to open the database in Server Explorer I get this;

The database 'C:\BEERHOUSE35\APP_DATA\ASPNETDB.MDF' cannot be opened because it is version 655. This server supports version 612 and earlier. A downgrade path is not supported. Could not open new database 'C:\BEERHOUSE35\APP_DATA\ASPNETDB.MDF'. CREATE DATABASE is aborted. An attempt to attach an auto-named database for file C:\BeerHouse35\App_Data\ASPNETDB.MDF failed. A database with the same name exists, or specified fuile cannot be opened, or it is located on UNC share.

Can someone please help?

Thanks,

Fed


This is what I have installed;

Microsoft Visual Studio 2008
Version 9.0.30729.1 SP
Microsoft .NET Framework
Version 3.5 SP1

Installed Edition: Enterprise

Microsoft Visual Basic 2008 91899-270-8619344-60437
Microsoft Visual Basic 2008

Microsoft Visual C# 2008 91899-270-8619344-60437
Microsoft Visual C# 2008

Microsoft Visual C++ 2008 91899-270-8619344-60437
Microsoft Visual C++ 2008

Microsoft Visual Studio 2008 Tools for Office 91899-270-8619344-60437
Microsoft Visual Studio 2008 Tools for Office

Microsoft Visual Studio Team System 2008 Architecture Edition 91899-270-8619344-60437
Microsoft Visual Studio Team System 2008 Architecture Edition

Microsoft Visual Studio Team System 2008 Database Edition 91899-270-8619344-60437
Microsoft Visual Studio Team System 2008 Database Edition

Microsoft Visual Studio Team System 2008 Development Edition 91899-270-8619344-60437
Microsoft Visual Studio Team System 2008 Development Edition

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.


Microsoft Visual Studio Team System 2008 Test Edition 91899-270-8619344-60437
Microsoft Visual Studio Team System 2008 Test Edition

Microsoft Visual Studio Tools for Applications 2.0 91899-270-8619344-60437
Microsoft Visual Studio Tools for Applications 2.0

Microsoft Visual Web Developer 2008 91899-270-8619344-60437
Microsoft Visual Web Developer 2008

Crystal Reports AAJ60-G0MSA4K-68000CF
Crystal Reports Basic for Visual Studio 2008


Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB945282) KB945282
This hotfix is for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/945282.

Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB946040) KB946040
This hotfix is for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/946040.

Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB946308) KB946308
This hotfix is for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/946308.

Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB946344) KB946344
This hotfix is for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/946344.

Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB946581) KB946581
This hotfix is for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/946581.

Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB947173) KB947173
This hotfix is for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/947173.

Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB947540) KB947540
This hotfix is for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/947540.

Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB947789) KB947789
This hotfix is for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/947789.

Hotfix for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB944899) KB944899
This hotfix is for Microsoft Visual Studio Team System 2008 Team Suite - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/944899.

Hotfix for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB946673) KB946673
This hotfix is for Microsoft Visual Studio Team System 2008 Team Suite - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/946673.

Hotfix for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB947171) KB947171
This hotfix is for Microsoft Visual Studio Team System 2008 Team Suite - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/947171.

Hotfix for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB947180) KB947180
This hotfix is for Microsoft Visual Studio Team System 2008 Team Suite - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/947180.

Hotfix for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB948127) KB948127
This hotfix is for Microsoft Visual Studio Team System 2008 Team Suite - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/948127.

Hotfix for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB953256) KB953256
This hotfix is for Microsoft Visual Studio Team System 2008 Team Suite - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/953256.

Hotfix for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB971091) KB971091
This hotfix is for Microsoft Visual Studio Team System 2008 Team Suite - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/971091.

Hotfix for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB971092) KB971092
This hotfix is for Microsoft Visual Studio Team System 2008 Team Suite - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/971092.

Hotfix for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB973674) KB973674
This hotfix is for Microsoft Visual Studio Team System 2008 Team Suite - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/973674.

Microsoft Visual Studio Team System 2008 Team Suite - ENU Service Pack 1 (KB945140) KB945140
This service pack is for Microsoft Visual Studio Team System 2008 Team Suite - ENU.
If you later install a more recent service pack, this service pack will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/945140.

Microsoft Visual Studio Team System 2008 Team Suite - ENU Service Pack 1 (KB947888) KB947888
This service pack is for Microsoft Visual Studio Team System 2008 Team Suite - ENU.
If you later install a more recent service pack, this service pack will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/947888.

Microsoft Visual Studio Team System 2008 Team Suite - ENU Service Pack 1 (KB948484) KB948484
This service pack is for Microsoft Visual Studio Team System 2008 Team Suite - ENU.
If you later install a more recent service pack, this service pack will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/948484.

Microsoft Visual Studio Team System 2008 Team Suite - ENU Service Pack 1 (KB948560) KB948560
This service pack is for Microsoft Visual Studio Team System 2008 Team Suite - ENU.
If you later install a more recent service pack, this service pack will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/948560.

Security Update for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB972222) KB972222
This security update is for Microsoft Visual Studio Team System 2008 Team Suite - ENU.
If you later install a more recent service pack, this security update will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/972222.

Security Update for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB973675) KB973675
This security update is for Microsoft Visual Studio Team System 2008 Team Suite - ENU.
If you later install a more recent service pack, this security update will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/973675.

SQL Server Analysis Services
Microsoft SQL Server Analysis Services Designer
Version 10.0.2531.0

SQL Server Integration Services
Microsoft SQL Server Integration Services Designer
Version 10.0.2531.0 ((Katmai_PCU_Main).090329-1015 )

SQL Server Reporting Services
Microsoft SQL Server Reporting Services Designers
Version 10.0.2531.0

Update for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB956453) KB956453
This update is for Microsoft Visual Studio Team System 2008 Team Suite - ENU.
If you later install a more recent service pack, this update will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/956453.

Update for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB967143) KB967143
This update is for Microsoft Visual Studio Team System 2008 Team Suite - ENU.
If you later install a more recent service pack, this update will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/967143.

Update for Microsoft Visual Studio Team System 2008 Team Suite - ENU (KB972221) KB972221
This update is for Microsoft Visual Studio Team System 2008 Team Suite - ENU.
If you later install a more recent service pack, this update will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/972221.
Reply With Quote
  #2 (permalink)  
Old November 4th, 2009, 02:43 PM
Fed Fed is offline
Authorized User
 
Join Date: Oct 2009
Posts: 55
Thanks: 26
Thanked 0 Times in 0 Posts
Default

UPDATE: While I didn't find anything yet on the first issue "Ctrl F5" I did find something on the second issue "ASPNETDB.MDF cannot be opened in Server Explorer"'

First I found this possible solution that you can visit here in it's entirety, http://conceptdev.blogspot.com/2009/...use-it-is.html

That basically says to do this; To fix the problem, go to Tools → Options... → Database Tools → Data Connections and change the SQL Server Instance Name from whatever it was (probably a SQL Server 2005 instance) to your SQL Server 2008 instance, hit OK and you should be fine!

Which I did and then got a msg saying I neede to enable remote connection to the server over tcp/ip which I did following these instructions; http://www.linglom.com/2009/03/28/en...-2008-express/

Now I get this error when trying to open the DB in Server Explorer; Connections to SQL Server files(*.mdf) require SQL Server Express 2005 to function properly. Please verify the installation of the component or download from the URL....

I don't understand, I have Visual Studio 2008 and SQL Server 2008 Developer edition why do I need SQL Server Express 2005?

Please, please help I'm about to cry...
Reply With Quote
  #3 (permalink)  
Old November 5th, 2009, 07:09 AM
Authorized User
 
Join Date: Jul 2008
Location: , , .
Posts: 29
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via MSN to docluv
Default

You setup integrated security for your database and did not give access to the user account being used by WebDev, which in this case looks to be your own. You need to configure the user account access in SQL Server Mgt Studio.
__________________
http://Professionalaspnet.com
Reply With Quote
  #4 (permalink)  
Old November 6th, 2009, 01:43 PM
Fed Fed is offline
Authorized User
 
Join Date: Oct 2009
Posts: 55
Thanks: 26
Thanked 0 Times in 0 Posts
Default

Ok thanks I'll look into that
Reply With Quote
  #5 (permalink)  
Old August 27th, 2011, 06:35 PM
Registered User
Points: 65, Level: 1
Points: 65, Level: 1 Points: 65, Level: 1 Points: 65, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2011
Posts: 4
Thanks: 2
Thanked 0 Times in 0 Posts
Thumbs up BeerHouse

You actually got BearHouse35 working? Me and many others could not! I really wanted to do that application but the book would not work... different edition? did you do it in vb or c#? Very interested... although I already took the book back and got my $50 before Borders books closed. ;)

By the way, is there a way to delete a post in here if it doesn't come out right? Yesterday I posted a question with code. I didn't see the text "Does your post include code? Use the
Code:
 and
tags before and after code to format it properly
" across the top of the reply box. I did it like that anyway but it came out formatted very hard to read. Wanted to delete it and do again... Or I should I have just edited it like this one? I haven't posted in here much yet.

Last edited by 4Wheels; August 27th, 2011 at 06:46 PM. Reason: forgot to add the question at the bottom about deleting... should that part be in a different forum?
Reply With Quote
  #6 (permalink)  
Old August 28th, 2011, 09:08 AM
Registered User
Points: 6, Level: 1
Points: 6, Level: 1 Points: 6, Level: 1 Points: 6, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Hi

I think there is a permission error in it. if all the permissions are granted then have a look at the configuration files.
Reply With Quote
Reply


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
Problem to restore database in C#2005 database acmuralee MySQL 0 March 25th, 2008 04:42 AM
Database Problem kanoorani Beginning VB 6 3 April 27th, 2006 02:16 AM
database problem prasadp Oracle 1 September 10th, 2004 02:07 AM
database problem? hosefo81 PHP Databases 4 January 9th, 2004 08:00 AM
problem for the database rachelwang All Other Wrox Books 2 August 4th, 2003 02:55 AM



All times are GMT -4. The time now is 11:01 PM.


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