skipper skipper - 1 year ago 179
ASP.NET (C#) Question

What are Startup.Auth.cs and Startup.cs used for in ASP .NET MVC 5?

Im making an application in MVC 5, and I've commented out all the code in Startup.Auth.cs and Startup.cs because I felt that I dont need them and Visual Studio seems to be ok with it. Im thinking about deleting them completely but I just want to make sure that they aren't necessary.


Answer Source

Looks like you don't need any authentication in your application and in that case you can get rid of those files. Those are added part of your creating the MVC application. Yes, Startup.Auth.cs comes to support OWIN authentication. While creating the application, by default Individual User Account will be selected and hence you get those files. if you want no authentication then while creating new project under Configure Authentication button select No Authentication