How to get detail information for a 500 error on the server

Category: visual studio lshtml


Andoni Arroyo on Mon, 25 Mar 2013 21:18:17


we are getting a 500 error in our HTML LightSwitch application. How can we get/enable a trace, or disable custom errors?


Please mark posts as answers/helpful if it answers your question


ADefwebserver on Tue, 26 Mar 2013 01:12:57

I use the F12 tools in Internet Explorer and then go to the Network tab and click on Start Capturing. This allows me to see most errors. If you have a server side error that wont show you can use this:

Tracing: Debugging Your LightSwitch Application In Production

Andoni Arroyo on Tue, 26 Mar 2013 18:22:27

Thank you for your response.

I did it but no error detail appears.

I have also enabled the traces but no infomation appears related with the error.

No one entity is retrieved so I'm supposing that the connection string with the database has any problem but I don't have any information about why is the problem.

I've reviewing the configuration file of the server and I've realise that we have two connection string:

_IntrinsicDat ((I don't know exactly for what purposes)

another one with a GUID () to connect with the databsae but doesn't looks like an EF connectionString (doesn't have) the providerName.

Any clue to view where can be my problem?

Thanks in advance

ADefwebserver on Tue, 26 Mar 2013 18:39:52

When I have a 500 error something should show in the F12 when you are tracing network. Otherwise I am at a loss.

Brian Moore - Microsoft on Thu, 28 Mar 2013 22:26:07

Andoni - you can try to enable tracing there are some steps for that here:

Also, fiddler is a good tool for debug as well:

Huy Nguyen MSFT on Fri, 29 Mar 2013 16:24:48

Hi Andoni,

Under your LightSwitch Project Application.Server folder, there's a web.config file. This web.config files contains the connection strings to your data sources.

  • The _IntrinsicData connection string is used for the application's intrinsic database, which is created when you create Entities / Relationships through LightSwitch. It's also used for Forms Authentication.
  • The rest of the connection strings belong to the data sources that you attach (add) to the project. For security reason, these are stored with a GUID in the source.

When you build / F5 the applicaiton, this web.config file will be built into Application\Bin\Debug|Release folder.

  • At this point the GUIDs of attached connection strings should be replaced by the real name of the data sources that you see in Solution Explorer.

When you publish the application.

  • If you application do use an Intrinsic database, the _IntrinsicData connection string is updated to your real deployment SQL server.
  • Same thing with the attached data sources. The real names are updated.

It is a problem if the connection string stays as a GUID on your server, because then the application cannot find the required connection string to load data. Did you make any manual change to the application, or change the data source? Maybe try publishing the application again?

Hope this helps. Best regards.
Huy Nguyen