Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

System.Web.Security in Console application

I want to generate HashPasswordForStoringInConfigFile in console application. It is done using the following class in web application

System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(str_value, "md5")

But System.Web.Security class is not available in console application Can anybody tell me an alternative method to this Or Is it possible to import System.Web.Security class in console application Any help would be appreciated

Thank You Suvidha

like image 331
Suvidha Avatar asked Oct 20 '22 03:10

Suvidha


1 Answers

Include the System.Web Reference.

Right-click "References" in the Solution Explorer under your project and click "Add Reference."

Then under Assemblies --> Framework, select System.Web and click OK.

like image 181
CaptainCrypto Avatar answered Oct 23 '22 00:10

CaptainCrypto