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

February 15th, 2012, 12:36 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

February 15th, 2012, 12:40 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

February 15th, 2012, 12:43 PM
|
|
Authorized User
|
|
Join Date: Dec 2011
Posts: 43
Thanks: 11
Thanked 0 Times in 0 Posts
|
|
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
|
|

February 15th, 2012, 12:47 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
|
|

February 15th, 2012, 12:47 PM
|
|
Authorized User
|
|
Join Date: Dec 2011
Posts: 43
Thanks: 11
Thanked 0 Times in 0 Posts
|
|
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
|
|

February 15th, 2012, 04:12 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Good to hear. Hopefully this now also fixes your original problem with the Manage PhotoAlbum page....
Cheers,
Imar
|
|

February 22nd, 2012, 12:10 PM
|
|
Authorized User
|
|
Join Date: Dec 2011
Posts: 43
Thanks: 11
Thanked 0 Times in 0 Posts
|
|
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
|
|

February 22nd, 2012, 02:03 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
|
|

February 24th, 2012, 01:19 AM
|
|
|
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:
|
|
|

February 26th, 2012, 10:29 AM
|
|
Authorized User
|
|
Join Date: Dec 2011
Posts: 43
Thanks: 11
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by Imar
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
|
|
 |
|