Reputation: 121
I am deploying a web service on AZURE. In AZURE, i have a MYSQL db and i have fed its connection string to the web.config file. Its all working fine in the local environment. But when i deploy it to AZURE, controller don't work. Here are the screenshots of local and remote working scenarios. Also i have traced the remote log file of that request in the screenshot.
Here is the log file of this error (500)
While surfing through the internet, i came across a lot of solutions like using identity, to change authorization to none and so on. I am very confused right now as its been 2 days and i am still stuck in it. Right guidance will be highly appreciated.
Upvotes: 2
Views: 707
Reputation: 121
I have found a solution to this problem. The problem was simple. As i added the reference of mysql.data.dll in the project, i forgot to add it inside my bin folder (by checking copylocal=true).
After that i updated the web.config file by adding these markups in the <system.web></system.web>
Tags.
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.8.3, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
I also enabled custom errors="off"
, in this way i was able to get production level errors on the deployed code. `
Upvotes: 0