I’ve a website that works fine in local mode with local SqlExpress. When I publish and put the final server connection string, I keep getting the helpless 500 - Internal server error.
I tried to use the final server connection string in local debug mode, but even then it uses local SqlExpress instance, I don’t know why! So again it is of no use. Here’s the connection string:
<add name="MainDbContext" connectionString="Data Source=rose.arvixe.com;Initial Catalog=mydb;Persist Security Info=True;User ID=myuser;Password=mypassword" providerName="System.Data.SqlClient" />
I use these infos to connect to the server with Management Studio and it works fine.
Is it possible to at least get a clear error message?
After 7 hours on this problem, I beg for help.
EDIT: If I remove all data acces from the page, it works. As soon as I’m creating a context, the error occurs.
If what you’re wanting is to see some helpful debug info instead of just “server 500”, you need to a) turn off custom errors (so IIS will serve up a technical description of the error) and b) turn on tracing.
Save the file
Navigate to the page that’s giving you the server 500 error. Hopefully you’ll see some more detailed info now.
Navigate to [your web URL]/trace.axd and click one of the traces. This should give you even more information about what’s going on in your page.