M
Mke HammerFish
Guest
Hello,
I’m trying out a .NET Core MVC app using EF, and unable to get past a login failure.
Microsoft Visual Studio Community 2019 - Version : 16.4.0
Install-Package Microsoft.EntityFrameworkCore.SqlServer -Version 3.0.1
Install-Package Microsoft.EntityFrameworkCore.Sqlite
I then…
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
namespace ProtoMvcCoreAuthWindows.Models
{
public class Status
{
[Key]
public virtual Int64 StatusId { get; set; }
[StringLength(64)]
public virtual string StatusName { get; set; }
public virtual bool LogicalDelete { get; set; }
}
}
Ok, time to run the project.
Browser asks for my credentials
SqlException: Cannot open database "ProtoMvcCoreAuthWindowsContext-5c96112b-eb8e-48df-8207-fa7aaa28ae54" requested by the login. The login failed. Login failed for user 'WINNETKA\JoeDeveloper'.
My questions are…
Thank you for any information you might have, it will be greatly appreciated.
Richard Loba
Continue reading...
I’m trying out a .NET Core MVC app using EF, and unable to get past a login failure.
Microsoft Visual Studio Community 2019 - Version : 16.4.0
- Loaded in the following: (Note I have tried other versions and no change, same issues).
Install-Package Microsoft.EntityFrameworkCore.SqlServer -Version 3.0.1
Install-Package Microsoft.EntityFrameworkCore.Sqlite
- I build a .NET Core MVC app, using Windows Auth.
- Compile the app
- Run the app, which prompts me for my credentials.
- The web site comes up just fine.
I then…
- Add a Model called Status, nothing special.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
namespace ProtoMvcCoreAuthWindows.Models
{
public class Status
{
[Key]
public virtual Int64 StatusId { get; set; }
[StringLength(64)]
public virtual string StatusName { get; set; }
public virtual bool LogicalDelete { get; set; }
}
}
- And then create a controller, just the default settings.
- Compile the project with no errors.
Ok, time to run the project.
Browser asks for my credentials
- The web site comes up
- I hit the site calling the Status stuff - https://localhost:44357/Status, and I get the following error.
SqlException: Cannot open database "ProtoMvcCoreAuthWindowsContext-5c96112b-eb8e-48df-8207-fa7aaa28ae54" requested by the login. The login failed. Login failed for user 'WINNETKA\JoeDeveloper'.
- Note: I am an admin on the SQL Server, able to run all of my other non-core MVC apps with no problems, etc.
- I have tried different MVC core prototypes, using different EF versions, different authentication methods, and always get some form of a login failure.
- I have tried all of the examples found on various sites, and none of them work.
My questions are…
- Where am I supposed to check to find out why my program is failing on with a SQL login?
- Any ideas on possible next steps?
- Is there a pointer to a complete MVC Core EF example that I can download and run that will work without any additional modifications. As I have said before, I haven’t been able to find one that is able to just compile and run.
Thank you for any information you might have, it will be greatly appreciated.
Richard Loba
Continue reading...