I uploaded my site on godaddy shared host. I can access this database from my management studio. I can\'t access this database from my site
I have wasted 1.5 working days on this error and in the end a coworker solved the issue by replacing User Id by Uid and password by Pwd. The updated connection string for .Net was the error for me
I was getting this exception, fixed it by adding throwIfV1Schema: false
to my DbContext constructor:
public class AppDb : IdentityDbContext<User>
{
public AppDb()
: base("DefaultConnection", throwIfV1Schema: false)
{
}
}
If you're using EF and Publish Profiles, you could have a blank connection string entry in your publish profile. Annoying but entirely possible.
My issue was that my web.config file kept a reference to a deleted entity model connection so check there are not any outdated connection strings.
An unwanted single quote was my problem. Checking the connection string from the location of the index mentioned in the error string helped me spot the issue.
My fix was suprisingly simple and another one of those obvious when you realise what you've done. I was manually building the configuration using .NET Core/Standard in the following fashion:
var configurationBuilder = new ConfigurationBuilder();
var root = configurationBuilder.Build();
and had forgotten to include the appsettings.json file that had my configuration settings in it
configurationBuilder.AddJsonFile("appsettings.json", false);
Once added, all started working once more.