skipper
skipper

Reputation: 461

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.

Thanks

Upvotes: 0

Views: 9124

Answers (2)

Rahul
Rahul

Reputation: 77876

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

Upvotes: 1

Steven Brookes
Steven Brookes

Reputation: 894

They are used by SignalR and OAuth as classes to attach their implementations to the request pipeline through OWIN. If you are not using with of these, then you should be OK, as far as I am aware.

Upvotes: 0

Related Questions