Click here to Skip to main content
Click here to Skip to main content
Articles » Web Development » ASP.NET » General » Downloads
 
Add your own
alternative version
Go to top

ASP.NET MVC3 Forms Authentication

, 28 Aug 2011
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.
MVCFormAuthentication_src.zip
MVCFormAuthentication
Demo.Base
bin
Debug
Release
obj
Debug
DesignTimeResolveAssemblyReferencesInput.cache
TempPE
Properties
Demo.Web.Security
bin
Debug
Release
obj
Debug
DesignTimeResolveAssemblyReferencesInput.cache
TempPE
Properties
Demo.Web.Tests
bin
Debug
Controllers
obj
Debug
DesignTimeResolveAssemblyReferencesInput.cache
TempPE
Properties
Demo.Web
App_Data
bin
Demo.Web.Security.dll
Content
themes
base
images
ui-bg_flat_0_aaaaaa_40x100.png
ui-bg_flat_75_ffffff_40x100.png
ui-bg_glass_55_fbf9ee_1x400.png
ui-bg_glass_65_ffffff_1x400.png
ui-bg_glass_75_dadada_1x400.png
ui-bg_glass_75_e6e6e6_1x400.png
ui-bg_glass_95_fef1ec_1x400.png
ui-bg_highlight-soft_75_cccccc_1x100.png
ui-icons_222222_256x240.png
ui-icons_2e83ff_256x240.png
ui-icons_454545_256x240.png
ui-icons_888888_256x240.png
ui-icons_cd0a0a_256x240.png
Controllers
Demo.Web.cd
Demo.Web.csproj.user
Global.asax
obj
Debug
DesignTimeResolveAssemblyReferencesInput.cache
TempPE
Properties
Scripts
ServiceInterfaces
Utilities
ViewModels
Views
Account
Home
Shared
Library
Microsoft.Practices.ServiceLocation.dll
Microsoft.Practices.Unity.Configuration.dll
Microsoft.Practices.Unity.dll
Microsoft.Practices.Unity.Interception.Configuration.dll
Microsoft.Practices.Unity.Interception.dll
MVCFormAuthentication.suo
TestResults
Henry_LAPTOP 2011-08-27 09_55_30.trx
Henry_LAPTOP 2011-08-27 09_55_30
Out
Demo.Base.dll
Demo.Base.pdb
Demo.Web.dll
Demo.Web.pdb
demo.web.tests.dll
Demo.Web.Tests.pdb
Microsoft.Practices.ServiceLocation.dll
Microsoft.Practices.Unity.Configuration.dll
Microsoft.Practices.Unity.dll
<?xml version="1.0"?>

<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->

<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  <!--
    In the example below, the "SetAttributes" transform will change the value of 
    "connectionString" to use "ReleaseSQLServer" only when the "Match" locator 
    finds an atrribute "name" that has a value of "MyDB".
    
    <connectionStrings>
      <add name="MyDB" 
        connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True" 
        xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
    </connectionStrings>
  -->
  <system.web>
    <!--
      In the example below, the "Replace" transform will replace the entire 
      <customErrors> section of your web.config file.
      Note that because there is only one customErrors section under the 
      <system.web> node, there is no need to use the "xdt:Locator" attribute.
      
      <customErrors defaultRedirect="GenericError.htm"
        mode="RemoteOnly" xdt:Transform="Replace">
        <error statusCode="500" redirect="InternalError.htm"/>
      </customErrors>
    -->
  </system.web>
</configuration>

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)

Share

About the Author

Henry He
Software Developer (Senior)
United States United States
Senior Software Developer from New Jersey, USA

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

| Advertise | Privacy | Mobile
Web04 | 2.8.140916.1 | Last Updated 28 Aug 2011
Article Copyright 2011 by Henry He
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid