Click here to Skip to main content
15,886,783 members
Articles / Security

Manage security and redirection for non authorized access in MVC

Rate me:
Please Sign up or sign in to vote.
4.50/5 (7 votes)
18 Jul 2012CPOL2 min read 56.4K   1.4K   26  
How to apply security and redirection to a view when a user cannot access a controller or a controller action in MVC

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MvcSecurityApplication", "MvcSecurityApplication\MvcSecurityApplication.csproj", "{2FB0DA32-C689-4526-8BC9-7B91CBCA871B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A80C9C75-F730-4E38-B34C-3C2E27081028}"
EndProject
Global
	GlobalSection(TeamFoundationVersionControl) = preSolution
		SccNumberOfProjects = 2
		SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
		SccTeamFoundationServer = http://lgc-vm005:8080/tfs/projetspfizer
		SccLocalPath0 = .
		SccProjectUniqueName1 = MvcSecurityApplication\\MvcSecurityApplication.csproj
		SccProjectName1 = MvcSecurityApplication
		SccLocalPath1 = MvcSecurityApplication
	EndGlobalSection
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{2FB0DA32-C689-4526-8BC9-7B91CBCA871B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{2FB0DA32-C689-4526-8BC9-7B91CBCA871B}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{2FB0DA32-C689-4526-8BC9-7B91CBCA871B}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{2FB0DA32-C689-4526-8BC9-7B91CBCA871B}.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
Architect CGI
Canada Canada
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions