0
votes

I have a small wpf application using Entity Framework attached with Local DB. Development machine no issue it works fine. But when I deploy run or try to run other machine it crashes.

Following is error message.
Problem Event Name: CLR20r3
Problem Signature 01: ena-wixomwindowapplication.exe
Problem Signature 02: 1.0.0.0
Problem Signature 03: 53fc8435
Problem Signature 04: System.Data
Problem Signature 05: 4.0.30319.18047
Problem Signature 06: 51553556
Problem Signature 07: 2592
Problem Signature 08: 27
Problem Signature 09: System.Data.Entity.Core.Entity
OS Version: 6.1.7601.2.1.0.256.4
Locale ID: 1033
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
C:\WINDOWS\system32\en-US\erofflps.txt

1
That's too bad. What is your question? Do you have problems with anything you tried to mitigate this?nvoigt
Does production machine also need to have LocalDb installed? Is there any clue from error message? I mean indicating anything what could be the problem. Thanks.Bal Sharma

1 Answers

0
votes

LocalDB is a special version of Microsoft SQL Server Express that is automatically installed with Visual Studio (since version 2012). The main thing about LocalDB is that it automatically shuts down when it isn't used, thus it does not consume any resources while your developing (only during your test runs).

If you want to run your application on another machine that does not have a version of Visual Studio installed, you have to manually install another DB Server, e.g. SQL Server Express. After you've done this you have to change your Database Connection String within your App.config file to accommodate the change.

If you have any further questions, please feel free to ask.

Update after Bal Sharma's answer: Of course you can install a stand-alone version of LocalDB on your target machine - just type 'LocalDB download' into your favorite search engine. But the following problem will remain: LocalDB shuts down when it isn't used. This is of course done on a per-user basis. That means that a LocalDB instance only runs in the context of the user currently logged in, which implies that if another user logs in, he or she will get another instance of LocalDB with the previously used database(s) not present.

Now I don't know your production environment, but usually this is not what you want. Use SQL Server (Express) or any other DB server you're familiar with (maybe Oracle) that can run in the service context.

Read the following for more information: Is it normal to use LocalDb in production? http://blogs.msdn.com/b/sqlexpress/archive/2011/12/09/using-localdb-with-full-iis-part-1-user-profile.aspx http://blogs.msdn.com/b/sqlexpress/archive/2011/12/09/using-localdb-with-full-iis-part-2-instance-ownership.aspx