Over a million developers have joined DZone.

ASP.NET MVC 3: Intranet Application Template

DZone's Guide to

ASP.NET MVC 3: Intranet Application Template

· ·
Free Resource

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.



Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}