Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB 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
  #21 (permalink)  
Old February 15th, 2012, 12:36 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I don't understand it. It all looks good and exactly as it should. Your EF model uses a connection string that points to .\SqlExpress which in turn you can access. I really have no idea why this doesn't work.

Maybe removing the EF model (and the associated connection string from the web.config file) and the adding them again sheds some light?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
  #22 (permalink)  
Old February 15th, 2012, 12:40 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
but in the list of databases the PlanetWrox.mdf isnt there if that means anything?
Yeah, that makes sense and is expected. Using AttachDbFilename in the connection string the database is atatched on the fly and doesn't appear in SQL Server's database list.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
  #23 (permalink)  
Old February 15th, 2012, 12:43 PM
Authorized User
Points: 170, Level: 3
Points: 170, Level: 3 Points: 170, Level: 3 Points: 170, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Posts: 43
Thanks: 11
Thanked 0 Times in 0 Posts
Default

Sorry for the confusion but I dont think I log in using SQL Server. When I was in the sql server management I could see any databases there and PlanetWrox.mdf wasnt there. Now I tried to modify the database connection in VWD, used sql server authentication and enter the details and go but it didnt let me log in.

Thanks for all the help Imar,

Nick
  #24 (permalink)  
Old February 15th, 2012, 12:47 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
used sql server authentication and enter the details and go but it didnt let me log in.
And what details did you enter? No need to post the actual user name or password, but wondering how you got hold of this account. Notmally, Express uses Windows Authentication by default.

Did you use the same sql server account to log into Management Studio?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
Nick Makin (February 15th, 2012)
  #25 (permalink)  
Old February 15th, 2012, 12:47 PM
Authorized User
Points: 170, Level: 3
Points: 170, Level: 3 Points: 170, Level: 3 Points: 170, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Posts: 43
Thanks: 11
Thanked 0 Times in 0 Posts
Smile

Wow, ive removed the connection and completely re-done it and its connected! I dont have a clue why it wasnt working before because none of its details like the address was changed, or it should of worked when I tried to re-do it previously. Im totally suprised that its working now!

I can now expand the database and can see the Genre and Review tables.

Thanks for the help Imar, so pleased I can now move on after all this.

Cant thank you enough,

Nick
  #26 (permalink)  
Old February 15th, 2012, 04:12 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Good to hear. Hopefully this now also fixes your original problem with the Manage PhotoAlbum page....

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
  #27 (permalink)  
Old February 22nd, 2012, 12:10 PM
Authorized User
Points: 170, Level: 3
Points: 170, Level: 3 Points: 170, Level: 3 Points: 170, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Posts: 43
Thanks: 11
Thanked 0 Times in 0 Posts
Question

No still got the same problems but theyve got worse. I think modifying my database connection was a bad idea because know i cant find the orginal database file that i have been working with. My PlanetWrox.edmx reflects the database i had but i cant find the database for some reason which had all of my reviews and genres in, so with the PlanetWrox.edmx i can make a database from the relationships and do it that way.

Also then ill have to change the PlanetWroxEntities and PlanetWroxConnectionString1

Once all that is changed do you think that my project should be working again or do you think by doing this im just messing more things up because at the moment its all just really confusing me and want to get back on track.

Thanks,

Nick
  #28 (permalink)  
Old February 22nd, 2012, 02:03 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Not sure how to answer that. Yes, it should fix all your problems once you configured everything correctly. But since I am a bit confused about what's not working, I can't recommend how to fix it.

Losing the database sounds bad, but I can't really recommend a way to get it back ;-) You can always grab the code and database from the previous chapter and use that as a starting point....

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
Nick Makin (February 26th, 2012)
  #29 (permalink)  
Old February 24th, 2012, 01:19 AM
natsuto
Guest
 
Posts: n/a
Default

See what happens when you try to re-create them. You can also log on to SQL Server Management Kodak 10 Studio?
The Following User Says Thank You to For This Useful Post:
Nick Makin (February 26th, 2012)
  #30 (permalink)  
Old February 26th, 2012, 10:29 AM
Authorized User
Points: 170, Level: 3
Points: 170, Level: 3 Points: 170, Level: 3 Points: 170, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Posts: 43
Thanks: 11
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Imar View Post
Not sure how to answer that. Yes, it should fix all your problems once you configured everything correctly. But since I am a bit confused about what's not working, I can't recommend how to fix it.

Losing the database sounds bad, but I can't really recommend a way to get it back ;-) You can always grab the code and database from the previous chapter and use that as a starting point....

Imar
Ever since I found out my database was gone I have been using the databases from the source code, but every time I log into VWD I have to modify the connection to the database again. Ill try and re-do the connection strings to another database and see what happens,

Nick




Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in Chapter 14 scrappy1871 BOOK: Beginning ASP.NET 4 : in C# and VB 3 September 4th, 2011 02:49 PM
Problem : Sketcher in chapter 14 chang82 BOOK: Ivor Horton's Beginning Visual C++ 2005 1 September 8th, 2008 02:29 AM
Chapter 14 - use of CObject problem jabuck BOOK: Ivor Horton's Beginning Visual C++ 2005 0 February 15th, 2007 02:25 PM
Problem with code on Chapter 14 aargyri BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 3 June 6th, 2006 03:37 PM
chapter 14 Try It Out problem - update Jams30 BOOK: Beginning ASP 3.0 1 March 22nd, 2004 12:59 PM





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