Wrox Programmer Forums
|
BOOK: Silverlight 4 Problem - Design - Solution
This is the forum to discuss the Wrox book Silverlight 4 Problem - Design - Solution by Nick Lecrenski; ISBN: 9780470534045
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Silverlight 4 Problem - Design - Solution 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 September 1st, 2010, 11:15 AM
Authorized User
 
Join Date: Sep 2009
Posts: 34
Thanks: 4
Thanked 1 Time in 1 Post
Default The program doesn't access the database

Hi,

When I try to singnup a new user, I get the following error message:

"{"Unable to open the physical file \"E:\\VS2010 Projects\\Silverlight 4\\MyProject\\FitnessTrackerPlus\\FitnessTrackerPl us.Web\\App_Data\\FitnessTrackerPlus.mdf\". Operating system error 5: \"5(Access denied.)\".\r\nAn attempt to attach an auto-named database for file E:\\VS2010 Projects\\Silverlight 4\\MyProject\\FitnessTrackerPlus\\FitnessTrackerPl us.Web\\App_Data\\FitnessTrackerPlus.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."} System.Exception {System.Data.SqlClient.SqlException}"

In the server explorer I can connect to the database, but after running, the program can't access it.

Does anybody can help me, how to diagnose the cause?

Thanks in advance

Gabor

Last edited by Gabor66; September 2nd, 2010 at 12:34 AM..
 
Old September 1st, 2010, 09:29 PM
Authorized User
 
Join Date: Sep 2009
Posts: 34
Thanks: 4
Thanked 1 Time in 1 Post
Default

Answer my own question:

On the basis of this forum:

http://social.msdn.microsoft.com/for...-c1ce6982d4b3/

I changed the User Instance = False to UserInstance = True in web.config and now everything working as expected.

Thanks for read that post

Gabor

Last edited by Gabor66; September 2nd, 2010 at 12:33 AM..
 
Old September 3rd, 2010, 10:03 AM
Wrox Author
 
Join Date: May 2009
Posts: 13
Thanks: 0
Thanked 2 Times in 2 Posts
Default

The UserInstance = False seems to be a new requirement for SQL Express 2008 R2, True should work for all other previous versions of SQL Express
 
Old September 4th, 2010, 01:29 AM
Authorized User
 
Join Date: Sep 2009
Posts: 34
Thanks: 4
Thanked 1 Time in 1 Post
Default

It is strange, because I'm using SQL Express 2008 R2
 
Old October 2nd, 2010, 11:48 AM
Registered User
 
Join Date: Sep 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Not able to register user

I am not able to register a new user. I receive a Domain Exception was unhandled by user code error. The CreateUser method is not working. I did set the UserInstance to true in the web.config file. I am using SQL Express 2008 R2. All of the tables Nick created are visible, but I can not add any updates to get a new user. I really like the design ideas presented by Nick.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone can help me in a JDBC and access program? tawrid BOOK: Beginning Java 2, JDK 5 Edition 0 June 3rd, 2006 01:12 AM
How use two different database in one java program [email protected] Java Databases 2 October 3rd, 2005 01:07 PM
Installing a access database program in VBA MDrumm Access 4 August 22nd, 2005 02:48 AM
load Database into program memory... sumsin C++ Programming 0 March 10th, 2005 12:57 PM





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