MVC 5 UserManager.FindAsync throwing error when deployed on azure

416 views Asked by At

I have an ASP.NET MVC 5 website that connects to a remote sql database.

The website works fine when it's running from the visual studio iis express.

However, when i deploy the website on azurewebsites and attach the debugger on the login function, i see that the UserManager.FindAsync function redirects me to the general error view page.

This is where the UserManager checks if user exists:

var user = await UserManager.FindAsync(model.UserName, model.Password);

And this is the web.config connection string:

<add name="DefaultConnection" connectionString="Data Source=87.87.87.87,1433;Initial Catalog=dbname;Integrated Security=False; User Id=username; password=password" providerName="System.Data.SqlClient" />

This website works when it's deployed elsewhere as well.

The problem occurs when it's deployed on azurewebsites.

0

There are 0 answers