Publishing to IIS

When you are testing your application locally on your development machine, IIS Express is adequate. It also has the advantage of being tightly-integrated with Visual Studio.

However, if you want to access a test version of your application from a system other than your development system, such as from a mobile device, then you must publish your test application to IIS running on your development machine.

Note: Alternatively, you can stage your application to the ePortal platform and deploy your application on the ePortal platform; however, some ePortal developers may not have administrative access to the ePortal platform. Refer to Staging a Presentation Project for more information.

Procedure 1 – Preparing to Publish

Note: Perform this procedure once on your development system.

   Install IIS onto your development system:

  1. From Control Panel, click Programs.

  2. Click Turn Windows features on or off and click Continue on the User Account Control dialog if necessary.

  3. Click on the checkbox for Internet Information Services.

  4. Expand Internet Information Services.

  5. Expand Web management Tools, expand IIS <version> Management Compatibility, and then select the IIS Metabase and IIS <version> configuration compatibility check box. The options required for Web application development are automatically selected.

    Where, <version> is the version number of the IIS management compatibility.

  6. Expand World Wide Web Services, expand Application Development Features, and then select the required ASP.NET version. The options required for Web application development are automatically selected. 

  7. Expand World Wide Web Services, expand Security, and then select the Windows Authentication check box. To enable Visual Studio to debug applications, you must configure IIS with the Windows Authentication module. By default, the module is not configured as part of IIS.

  8. Click OK to start the installation.

   Configure IIS:

  1. From the Control Panel, click System and Security, and then click Administrative Tools.

  2. Double-click Internet Information Service (IIS) Manager.

  3. In the IIS Manager left pane, expand the machine name and click Application Pools.

  4. In the right pane, right-click DefaultAppPool, and select Advanced Settings....

  5. In the Advanced Settings dialog, set Enable 32-Bit Applications to True, and click OK.

  6. In the Advanced Settings dialog, verify that .NET Framework Version (or .NET CLR Version) is correct. If your presentation project is targeting .NET framework 4.0 or later, you must use version 4.0. If your presentation project is targeting .NET framework 3.5, then you must use version 2.0.

  7. Click OK on the Advanced Settings dialog box.

  8. Close IIS Manager.

Procedure 2 – Publishing to IIS

Note: Perform this procedure whenever you want to test an updated version of your presentation project.

Before you publish a particular presentation application for the first time, perform the following setup steps:

  1. In Solution Explorer, right-click the presentation project and select Properties.

  2. Click the Package/Publish Web tab.

  3. Under Items to deploy (applies to all deployment methods), select All files in this project folder.

  4. Click the Save All button in Visual Studio, to save the property changes.

To publish the presentation application:

  1. In Solution Explorer, right-click the presentation project, and click Publish….

  2. Select a profile from the list, or create a new profile, and click Next.

  3. For the Publish Method, select Web Deploy

  4. For Server, enter localhost.

  5. For Site Name, specify Default Web Site/<Web-app-name>, where <I> is a name that is meaningful to you.

  6. For Destination URL, enter http://localhost/<Web-app-name>, where <I> is the name that you specified in step 5.

  7. Click Next.

  8. For Configuration, select Debug.

  9. Expand File Publish Options and select Remove additional files at destination.

  10. Click Publish to build your project and publish it to IIS.

  11. Check the output window to verify that no errors occurred.

    Note: If you encounter the error "The process cannot access the file because it is being used by another process. Publish failed to deploy," then you must restart the World Wide Web Publishing Service and publish the application again.