ASP.NET MVC 3: Intranet Application template

 

ASP.NET MVC 3 Tools Update introduced new project template called Intranet Application.  The main difference between internet and intranet application templates is the way how users are authenticated. In this posting I will talk about Intranet Application template and compare it to Internet Application template. Also I will give you references to guides that help you configure your intranet application.

Creating new intranet application is easy. Just create new ASP.NET MVC 3 web application and select Intranet Application as template.

ASP.NET MVC 3 Tools Update: Create new intranet application

Intranet application is practically empty web application with home controller and support for Windows authentication. As Windows authentication is optional choice when configuring web application you should do some manual configuring to get intranet application run.

ASP.NET MVC 3 Tools Update: Intranet application in action

As intranet application uses Windows authentication it doesn’t need sign-in, registering and password reminder forms. Also it does not need model classes for authentication. By all other parts the intranet application is the same as internet application.

Enabling Windows authentication

ASP.NET MVC 3 Tools Update: Configure Windows authenticationIf you are using IIS Express then follow these steps:

  1. Right click on the project in Visual Studio and select Use IIS Express.
  2. Click on your project in the Solution Explorer to select the project.
  3. If the Properties pane is not open, make sure to open it (F4).
  4. In the Properties pane for your project:
    1. Set "Anonymous Authentication" to "Disabled".
    2. Set "Windows Authentication" to "Enabled".

Now try to run your application to see if you are correctly authenticated.

If you have other server than IIS Express then take a look at the following MSDN library page: How to Create an Intranet Site Using ASP.NET MVC.

2 Comments

  • Thanks for question, Vincent!

    To achieve better user experience you should enable also anonymous access and notify users that they need domain account to access the system.

  • Is there any way to create an installer for an intranet web application that will allow a user to run a.msi file which will install an intranet app?

Comments have been disabled for this content.