Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uninstall OWIN and Identity packages

Several months ago I created an ASP.NET MVC project and I created it with the default authentification option: "Individual User Account", not on purpose.

My project runs well now but I don't need any authentification methods and so I don't need the Identity and OWIN packages.

Is there a clean way to delete all of those? Those packages are not needed by any other features right?

Thx!

like image 738
Papa doc Avatar asked Sep 03 '15 13:09

Papa doc


People also ask

How do I remove Owin from my project?

To disable OWIN startup discovery add the appSetting owin:AutomaticAppStartup with a value of "false" in the web. config file.

What is Owin identity?

OWIN includes middleware components for authentication, including support for log-ins using external identity providers (like Microsoft Accounts, Facebook, Google, Twitter), and log-ins using organizational accounts from on-premises Active Directory or Azure Active Directory.


1 Answers

It is simple just some uninstalling an removing some files. First uninstall following package in package manage console:

PM> uninstall-Package Microsoft.Owin.Security.Facebook
PM> uninstall-Package Microsoft.Owin.Security.Google
PM> uninstall-Package Microsoft.Owin.Security.MicrosoftAccount
PM> uninstall-Package Microsoft.Owin.Security.Twitter
PM> uninstall-Package Microsoft.Owin.Host.SystemWeb
PM> uninstall-Package Microsoft.AspNet.Identity.EntityFramework
PM> uninstall-Package Microsoft.AspNet.Identity.Owin

If everything goes right your project must clean up with following packeges:

Microsoft.AspNet.Identity.Core
Microsoft.AspNet.Identity.EntityFramework
Microsoft.AspNet.Identity.Owin
Microsoft.Owin
Microsoft.Owin.Host.SystemWeb
Microsoft.Owin.Security
Microsoft.Owin.Security.Cookies
Microsoft.Owin.Security.Facebook
Microsoft.Owin.Security.Google
Microsoft.Owin.Security.MicrosoftAccount
Microsoft.Owin.Security.OAuth
Microsoft.Owin.Security.Twitter
Owin

So if anyone still exist simply uninstall them also.

Now you could remove following files from your project:

App_Start\IdentityConfig.cs
App_Start\Startup.Auth.cs
Models\IdentityModels.cs
Startup.cs
like image 57
Sam FarajpourGhamari Avatar answered Oct 19 '22 09:10

Sam FarajpourGhamari