I have a web app in ms visual studio 2022 (ASP.NET MVC C# with Entity Framework) that I need to change the authorization settings from "no authorization" to "individual user accounts". Is there a way to do this without having to create a new app and copy everything over? I have alot of stuff I really don't want to have to transfer over. Surely there's an easier way to change that setting on an existing file?
Asked
Active
Viewed 270 times
0
-
Created or started? You can always change your code. There's no reason to create a new app. You can't even change settings in a running web app without restarting it. `Individual user accounts` creates a new empty web app project with the code you need to use authentication using a database for storage. You can copy that code to your old application – Panagiotis Kanavos Aug 23 '22 at 12:17
-
I've already created it and am fairly close to finished with it other than some styling stuff. The last thing I have to do is set up the user login and access and realized I need to have that setting changed. – Kip M. Aug 23 '22 at 12:24
-
This may be a dumb question, but I'm pretty new to asp.net mvc and still learning the ins and outs, but how do I make sure I get the right code I need from the new new app to copy to my old one? – Kip M. Aug 23 '22 at 12:26
-
I think https://stackoverflow.com/questions/51773602/asp-net-mvc-change-from-no-authentication-to-individual-user-accounts-on-ex might help you. – Abdul Haseeb Aug 23 '22 at 12:41
-
It won't, at least not without some changes - things have changed a lot since 2018, including the move from `Startup.cs` to configuration inside `Program.cs` in ASP.NET Core 6. The login pages were bundled into a library and only need to be added to a project if they need to be customized. A quick way to find what needs to change *now*, is to create two web apps, one without authentication and one with individual accounts, and check the differences in the code and project files. – Panagiotis Kanavos Aug 23 '22 at 14:31