I have created an MVC 4 application using the standard Internet Application template. I have added some other controllers, views, model and a connection to my own sql database which is working correctly.
When i publish this to a file location to access via my IIS8 on my windows 2012 server the application works except for when i click on logon or register links.
I have not made any changes to the registration or logon parts of the application and as such the Account controller and model have remained the same as has the DefaultConnection string in the webconfig file see below
enter <add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-mvcdev-20131010105728;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnet-mvcdev-20131010105728.mdf" providerName="System.Data.SqlClient" />
I have a couple of registered members and have some views and controllers that require an authorised user to run correctly.
The error i get when i try to access the Account/Logon or Account/Register is:-
Server Error in '/' Application.
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. Cannot create an automatic instance. See the Windows Application event log for error details. )
The 2 event logs are
Unexpected error occurred while trying to access the LocalDB instance registry configuration. See the Windows Application event log for error details.
and
Cannot get a local application data path. Most probably a user profile is not loaded. If LocalDB is executed under IIS, make sure that profile loading is enabled for the current user.
Has anyone else come across this or have any links to some helpful resolutions?
The application was published to a folder in the Public Documents of my windows server and is being accessed currently of machines on the same LAN