Click here to Skip to main content
15,885,869 members
Articles / Web Development / ASP.NET

ASP.NET MVC3 Forms Authentication

Rate me:
Please Sign up or sign in to vote.
4.75/5 (8 votes)
28 Aug 2011CPOL5 min read 69.2K   3.1K   50  
In this article, I want to change the default ASP.NET MVC Forms Authentication code to reflect my thoughts on how the code should be organized.

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo.Web", "Demo.Web\Demo.Web.csproj", "{B99FE3A5-975A-40F6-941D-671FC2249E95}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo.Web.Tests", "Demo.Web.Tests\Demo.Web.Tests.csproj", "{DBBE4FE8-CBC2-4530-94B1-D6C60827C0B9}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Library", "Library", "{B4582806-0FAC-4E9A-B326-1D9BAF0EF6DC}"
	ProjectSection(SolutionItems) = preProject
		Library\Microsoft.Practices.ServiceLocation.dll = Library\Microsoft.Practices.ServiceLocation.dll
		Library\Microsoft.Practices.Unity.Configuration.dll = Library\Microsoft.Practices.Unity.Configuration.dll
		Library\Microsoft.Practices.Unity.dll = Library\Microsoft.Practices.Unity.dll
		Library\Microsoft.Practices.Unity.Interception.Configuration.dll = Library\Microsoft.Practices.Unity.Interception.Configuration.dll
		Library\Microsoft.Practices.Unity.Interception.dll = Library\Microsoft.Practices.Unity.Interception.dll
	EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo.Web.Security", "Demo.Web.Security\Demo.Web.Security.csproj", "{04F1C363-EE2D-40DB-999C-AE9BDB5F04D6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo.Base", "Demo.Base\Demo.Base.csproj", "{04A870F3-EF64-4B17-ADEB-DE24ACC2B014}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{B99FE3A5-975A-40F6-941D-671FC2249E95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{B99FE3A5-975A-40F6-941D-671FC2249E95}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{B99FE3A5-975A-40F6-941D-671FC2249E95}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{B99FE3A5-975A-40F6-941D-671FC2249E95}.Release|Any CPU.Build.0 = Release|Any CPU
		{DBBE4FE8-CBC2-4530-94B1-D6C60827C0B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{DBBE4FE8-CBC2-4530-94B1-D6C60827C0B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{DBBE4FE8-CBC2-4530-94B1-D6C60827C0B9}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{DBBE4FE8-CBC2-4530-94B1-D6C60827C0B9}.Release|Any CPU.Build.0 = Release|Any CPU
		{04F1C363-EE2D-40DB-999C-AE9BDB5F04D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{04F1C363-EE2D-40DB-999C-AE9BDB5F04D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{04F1C363-EE2D-40DB-999C-AE9BDB5F04D6}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{04F1C363-EE2D-40DB-999C-AE9BDB5F04D6}.Release|Any CPU.Build.0 = Release|Any CPU
		{04A870F3-EF64-4B17-ADEB-DE24ACC2B014}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{04A870F3-EF64-4B17-ADEB-DE24ACC2B014}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{04A870F3-EF64-4B17-ADEB-DE24ACC2B014}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{04A870F3-EF64-4B17-ADEB-DE24ACC2B014}.Release|Any CPU.Build.0 = Release|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
Senior Software Developer from New Jersey, USA

Have 15+ years experience on enterprise application development with various technologies.

Comments and Discussions