0

I have a MVC project (download from here). I can run this without any error from Visual Studio. But if I hosted the project into IIS using a tool (code from here). If I launch the page from web browser, it shows error as "Local Database Runtime error occurred" like below screenshot.

Local Database Runtime error

Mathivanan KP
  • 1,979
  • 16
  • 25

1 Answers1

0

Edit the applicationHost.config file by adding the below child element into the appPool fixed the issue for me.

<processModel identityType="ApplicationPoolIdentity" loadUserProfile="true" setProfileEnvironment="true" />

File location: C:\Windows\System32\inetsrv\config\applicationHost.config

Example:

<add name="SampleAppPool">
     <processModel identityType="ApplicationPoolIdentity" loadUserProfile="true" setProfileEnvironment="true" />
</add>
Mathivanan KP
  • 1,979
  • 16
  • 25
  • Note that if you want to edit this file make sure you use a 64 bit text editor like notepad. If you use a 32 bit one like Notepad++ it will automatically edit a different copy of the file in SysWOW64 instead. – Dipen Dedania Mar 20 '17 at 12:45