The Official Microsoft App-V Team Blog

Your official source for all the latest news and tech tips for Microsoft Application Virtualization (App-V).

Guide to configuring Microsoft App-V to both publish and stream via HTTP

Guide to configuring Microsoft App-V to both publish and stream via HTTP

  • Comments 7
  • Likes

BooksThis post explains how to configure Microsoft Application Virtualization (App-V) to both publish and stream applications using HTTP. For the purpose of this document we will be setting up a brand new Windows 2008 R2 server to offer these functions and utilize a Windows 7 App-V client.

When choosing HTTP as your choice for streaming, we are gaining the performance offered by an optimized protocol like HTTP. On the other hand, when we choose HTTP as our protocol of choice to publish an app, it doesn't rely on the App-V server so there are a couple manual tasks that we have to approach. HTTP publishing is driven by a PUBLISHING.ASPX file that presents the App-V client with a list of applications available. This document (PUBLISHING.ASPX) is the heart of your HTTP publishing system and will need careful attention. On that note, let’s get started.

Setting-up IIS

Enable the following Web Server (IIS) Role Services on the IIS server that will serve for your HTTP Publishing and Streaming Services. Configure it as follows:




Creating the Virtual Directory in IIS:

For the purpose of this post we are going to create a virtual directory in IIS that points to a local folder called content, which is the App-V content folder. Create a folder on C:\ called C:\Content. After creating the virtual directory, we will enable Directory Browsing and enable Windows Authentication:

Open IIS Manager.


Once the CONTENT Virtual Directory has been created, enable Directory Browsing for the CONTENT Virtual Directory:


On the Authentication section for the CONTENT Virtual Directory, enable Windows Authentication and Anonymous Authentication:


In the Request Filtering section for the CONTENT Virtual Directory, delete the .cs rule that is by default set to FALSE, and re-create a new rule that will ALLOW .cs files to be run:


Mime Types:

There are 3 MIME-types that needs to be added to IIS in order to stream App-V packages. They needed to be added to the content Virtual Directory. They are:

File Extension










Brief Test 1:

At this point, you can do a brief test by opening Internet Explorer on the IIS Server and navigate to http://servername/content, and you should see directory browsing enabled:


Publishing Document:

There are 2 methods we can use to build a publishing document. Either we can have a C# script build the XML for the publishing document automatically, or we can manually build the publishing document. For the purpose of this post we will be leveraging the C# script.

Copy the code below into a file called publishing.aspx and put it into the root of the content folder:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="publishing.aspx.cs" Inherits="appv_publishing_service.publishing" ContentType="text/xml" %>










<%this.generate_app_xml(); %>



Make sure the 1st line is 100% correct. Then we need to have a second file, located in the root of the content folder, called publishing.aspx.cs. This is the C# script that will propagate the manifest information into the publishing file. Copy the code and save it into the file publishing.aspx.cs:

// CodeBehind File: publishing.aspx.cs

using System;

using System.Xml;

using System.IO;

namespace appv_publishing_service



partial class

publishing : System.Web.UI.Page


protected void generate_app_xml()


string root_phys = MapPath(".");

string[] dirs = Directory.GetDirectories(root_phys);

foreach (string dir in dirs)




string[] manifests = Directory.GetFiles(Path.Combine(root_phys,dir), @"*_manifest.xml", SearchOption.TopDirectoryOnly);

foreach (string filename in manifests)


FileStream file = File.OpenRead(filename);

XmlDocument doc = new



XmlNode applist = doc.SelectSingleNode(@"/PACKAGE/APPLIST");




catch (Exception ex)


// Output to log file







Brief Test 2:

At this point you should have 2 files in your content folder of importance, publishing.aspx and publishing.aspx.cs. In Windows 2008 you will also have a web.config file.


In addition, if at this point you open IE and go to http://servername/content/publishing.aspx, you should see the following, granted you have no subfolders with packages in the content folder yet:


Setting up the Content Folder and Manifest Files:

In most App-V environments, content packages are copied in sub-folders within the content folder. I point this out because the publishing.aspx.cs script will be aggregating package information from the manifest files of all your packages into the publishing file (publishing.aspx). If the paths in your manifest files are not 100%, you can run into errors such as 4A-40000194.

For that reason, we spend some time ensuring the path in the manifest file for each package is 100% correct. Look at the following manifest file for Visio. This is how the sequencer will generate the manifest file by default. This is a partial and incorrect manifest for HTTP:

<?xml version="1.0" standalone="no"?>

<PACKAGE GUID="{902A0688-F858-4738-AEDA-3C13A12B3080}" NAME="Visio_Microsoft_v2003_MNT" VERSION="1" VERSIONGUID="{16A00876-97CB-4CDD-8143-9F1D0E7AC0A8}">


<APP NAME="Microsoft Office Visio 2003" VERSION="11.0.8207.0" ICON="%SFT_MIME_SOURCE%/Visio_Microsoft_v2003_MNT Icons/Visio2003.ico" OSD="%SFT_MIME_SOURCE%/Visio2003.osd">


<SHORTCUT LOCATION="%CSIDL_PROGRAMS%" ICON="%SFT_MIME_SOURCE%/Visio_Microsoft_v2003_MNT Icons/Visio2003.ico" PARAMETERS="" DISPLAY="Microsoft Office Visio 2003"/>


The above file will work fine if you copy all your packages to the root of the content folder. For most companies, they have many packages and store packages in subfolders within the content folder. For this reason, we need to do a find/replace:


Replace with: %SFT_MIME_SOURCE%/Visio_microsoft_v2003_MNT/ (your subfolder of the package)

<?xml version="1.0" standalone="no"?>

<PACKAGE GUID="{902A0688-F858-4738-AEDA-3C13A12B3080}" NAME="Visio_Microsoft_v2003_MNT" VERSION="1" VERSIONGUID="{16A00876-97CB-4CDD-8143-9F1D0E7AC0A8}">


<APP NAME="Microsoft Office Visio 2003" VERSION="11.0.8207.0" ICON="%SFT_MIME_SOURCE%/Visio_microsoft_v2003_MNT/Visio_Microsoft_v2003_MNT Icons/Visio2003.ico" OSD="%SFT_MIME_SOURCE%/Visio_microsoft_v2003_MNT/Visio2003.osd">


<SHORTCUT LOCATION="%CSIDL_PROGRAMS%" ICON="%SFT_MIME_SOURCE%/Visio_microsoft_v2003_MNT/Visio_Microsoft_v2003_MNT Icons/Visio2003.ico" PARAMETERS="" DISPLAY="Microsoft Office Visio 2003"/>


Manifest files can be of different lengths. You will need to replace all the paths in the manifest file that does not include the subfolder, to include the subfolder name – not only the ones mentioned above.

Edit the OSD:

Ensure that your CODEBASE in the OSD is set for the correct protocol and path. Here is an example of how the CODEBASE should read:


<CODEBASE HREF="HTTP://app-v-http2/content/Visio_Microsoft_v2003_MNT/Visio_Microsoft_v2003_MNT.sft" GUID="902A0688-F858-4738-AEDA-3C13A12B3080" PARAMETERS="" FILENAME="Visio.v01\Visio11\VISIO.EXE" SYSGUARDFILE="Visio.v01\osguard.cp" SIZE="509603875"/>


In addition to the CODEBASE, there are several additional references in the OSD that makes use of %SFT_MIME_SOURCE%, which will need to be rectified by adding the subfolder to it. While editing the OSD, also ensure, just like we did with the manifest file, that the subfolder of the package is correctly reflected in the OSD. It is very likely that it does not include the subfolder. In the OSD, find/replace:


Replace with: %SFT_MIME_SOURCE%/Visio_microsoft_v2003_MNT/ (your subfolder of the package)

Configuring the App-V Client:

When configuring the App-V client, add a publishing server as follows:


It is important to have the path in to the Publishing Document as /content/publishing.aspx.

Configure the Application Source Root (ASR) on the client by editing the registry. In the registry, go to the following key (always backup your registry prior to making any changes):


Set the following keys as such:







Restart the “Application Virtualization Service Agent” on the client. Refresh the App-V client and you will be receiving applications.

Understanding the differences when using HTTP:

Active Upgrade: When using RTPS/S in a traditional App-V model, when a new version of a package has been published, updating the package, the App-V client has intelligence in identifying that the package has changed and the active upgrade process gets initiated. When we use HTTP, it is left up to the administrator to edit the individual OSD files and ensure that the HREF path is set to the correct version of the package.

Justin Luyt | Senior Support Engineer

The App-V Team blog:
The WSUS Support Team blog:
The SCMDM Support Team blog:
The ConfigMgr Support Team blog:
The SCOM 2007 Support Team blog:
The SCVMM Team blog:
The MED-V Team blog:
The DPM Team blog:
The OOB Support Team blog:
The Opalis Team blog:

clip_image001 clip_image002

  • Thank you for an excellent guide on App-V HTTP publishing.

  • Very nice guide.

    Just tested it with some virtualized applications..


  • App-V Client refresh Http server  error:45242F4-24600C0A-0000000A

  • Thanks for this guide and I want to ask a question about this article.I want to publish only explorer to client . Client use zero client like Dell Wyse Thinos.Is it possible with this metod ?

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment