Views: 28.1K
Replies: 7
Archived
|
Patterns In Action throws exception when logging inHi: I just downloaded the framework (.NET 4.0) and started the 'Patterns In Action' project. Regardless of which presentation layer I use it throws an exception when I try to do the Login required by the program. It crashes in file "ActionService.cs" in method "Login", line 81: if (!Membership.ValidateUser(request.UserName, request.Password)) The exception is: System.Data.SqlClient.SqlException was unhandled by user code
Does anyone know what the problem might be? Thanx, PS - I also get an exception "System.Data.EntityException was unhandled by user code" when doing a search on the website. Again, I haven't yet "logged in". Mark Horowitz, Aug 03, 2011
|
|
Reply 1I found the problem:
I had to delete directory C:\Documents and Settings\USERNAME\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS. Remember to replace USERNAME with your username. See http://blog.laksha.net/2009/02/sql-express-error-failed-to-generate.html Cheers, Mark Mark Horowitz, Aug 08, 2011
REALLY looking forward to this. I'd love to see a sample "real world" application being built from zero applying design patterns
Nov 10, 2011
I am eagerly waiting for the videos.
Mar 04, 2011
|
|
Reply 2Please see the image SQL-Server-Config-Manager, enclosed. I just hope it's readable!
Regards, Mark Mark Horowitz, Aug 08, 2011
|
|
Reply 3Hmm, this is turning into a real problem.
- According to the "Sql Server Configuration Manager", SQL Server Services tab, I see "SQL Server (SQLEXPRESS). So I assume that that is my InstanceID. IS THIS THE TOOL, AND INSTANCE-ID, THAT YOU MEAN??? - In Tools -> Options -> Database Tools -> Data Connections I see "SQLEXPRESS" - In the "web.config" file, I see the key "<add key="ConnectionStringName" value="EntityFramework.SqlExpress"/>" so that meets your spec. Still, I get the exception! I'm really sorry to be a pain in the butt and yes I'm a newbie to your tools but this must somehow work. I humbly ask for more help. I have googled the issue but nothing really helped. Regards, Mark Mark Horowitz, Aug 05, 2011
|
|
Reply 4Check your web.config in the Hosting Layer (default should still be "<add key="ConnectionStringName" value="EntityFramework.SqlExpress"/>". Also make sure the version of Sql Express 2008 still has the InstanceID of SQLEXPRESS. I doubt it does since you already had SqlExpress 2005 and that is probabaly most definitely has the InstanceID of SqlExpress. Find out the instanceID and once you do you have to go to within Visual Studio - Tools, Options and once options comes up drop down Database Tools then go to Data Connections and change "Sql Server Instance Name (blank for default):" That should do it.I had the exact same issue. Once you do that double click on the .mdf files just to make sure you can open them and then start the solution. Worked for me.
Thanks Dennis Tucker, Aug 05, 2011
|
|
Reply 5Um, sorry, that's not the answer. I de-installed SQL Express 2008, and also the 2005 Version which I didn't realize was there. Then I re-installed, fresh, SQL Express 2008. For testing, I turned off the Windows Firewall.The exception, which occurs on exactly the same line as stated above (L. 81) is:
System.Data.SqlClient.SqlException was unhandled by user code Message=Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed. Source=.Net SqlClient Data Provider ErrorCode=-2146232060 Class=14 LineNumber=65536 Number=15372 Procedure="" Server=.\SQLEXPRESS State=1 StackTrace: Regards, Mark Mark Horowitz, Aug 05, 2011
|
|
Reply 6Install SQL Express 2008. First uninstall the previous version or you will have to do some configuration in the project to look at whatever InstanceID you give the 2008 install.
Dennis Tucker, Aug 04, 2011
|
|
Reply 7Hello Mark:
I am sorry for the trouble. I believe the exception shows what the issue is. It states: " ASPNETDB.MDF cannot be opened because it is version 655. This server supports version 611 and earlier. A downgrade path is not supported." Basically, this means you have an old version of SQL Express installed. And it does not know how to deal with a more recent data file format. I suggest you uninstall SQL Express from your machine and re-install a more recent SQL Express version. That should do the trick. Hope this helps. Dan Dan McMillan, Aug 03, 2011
Great news! Looking forward to this.
Mar 08, 2011
Awesome! I would love to see all the most comon patterns that get used in ASP.NET, Silverlight & WCF development.
(factory, services, mvvm etc). Do you have a price structure in place ?
Mar 04, 2011
|