• This page is going to detail how to set up a simple website which enables you to upload a WMA or WMV file wo a Windows Streaming Media Services server, and also create a link in a SharePoint list with descriptions.

The purpose of doing this is to allow ordinary users to upload content to a streaming server, whilst utilising the search and accessibility features of SharePoint.

In this example, we are using a single server, which is running:

  • Microsoft Windows Server 2008 R2
  • Microsoft SharePoint Server Standard 2010

I am assuming that you already have a fully functioning SharePoint site that you can access.

For the purposes of this demonstration:

  • The media server is accessible through:  media.mydomain.com
  • The SharePoint site is at:  sharepoint.mydomain.com
  • Media Content is being saved on the server in the D:\Media_Content folder

Installing Streaming Media Services 2008

Not going to dwell on this too much. Plenty of information can be found on Technet (http://technet.microsoft.com/en-us/windowsserver/dd448620).

Windows Media Services 2008 for Windows Server 2008 R2 can be downloaded from here: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=B2CDB043-D611-41C9-91B7-CDDF6E5FDF6B

An installation guide can be found here: http://support.microsoft.com/kb/963697

Streaming Media Services is a role and is added through the Add Roles wizard after installing the MSU file.

Once you have installed the role, you can test that your Streaming Media Server is working by saving a file your content directory, and then creating an announcement.

Setting Up a Links List in SharePoint

The site creates URL’s on the SharePoint site in URL Lists. The site also shows you all of the available lists in the site that you can use for the media. In our scenario this allows us to separate all of the different categories of movies into different lists.

  1. In SharePoint, navigate to your homepage at http://sharepoint.mydomain.com.
  2. Create a new subsite called Media, using the Blank Site template – this reduces unneccessary clutter. Use a url name of ‘media’. (You can of course choose your own site and URL name)
  3. Browse to your new site and create a new list using the Links template. In this example we will call the list ‘My Cool Videos’. You can add a description to the list if you would like, and choose whether or not to show on the Quick Launch bar.

Done. You should now have a new URL list, inside a new site ready to accept your content.

You can customise the homepage and provide information to your users. For example, on our page we have information on how the content has been categorised, and also contact details for support. At the bottom we have information on how to upload content, and a link to the content upload page.

Setting Up the Upload Website

The actual upload website is separate from SharePoint.

  1. In IIS browse to Sites, right click and choose Add Web Site.
  2. Give the site a name, in this case I chose Media.
  3. Choose a physical path. This can be wherever you want according to your policies. In this case it is C:\Inetpub\Media
  4. Specify a binding. I have chosen to explicitly set the host name as Media, which allows me to ensure that it doesn’t affect my other sites. (Note, you will also have to create a CNAME record in DNS)
  5. Download the Upload Site Package from here:

    Download “WSMS Upload Site” WSMSUpload.zip – Downloaded 1377 times – 21 KB

  6. Delete the contents of the C:\Inetpub\Media folder on the server and replace it with the contents of the extracted files.
  7. Open up the c:\inetpub\media\upload\upload.aspx.cs file in notepad.
  8. You need to change the variables at the top. There are 6 in total
    1. SharePointURL – this needs to be the root of your SharePoint site. In this example it is http://sharepoint.mydomain.com
    2. MediaSite – the URL name given to the sub-site which is going to contain your media links. You need to put forward slashes around the name. In this example it is /media/
    3. ASXFileLocation – this is the location on the server where the ASX files will be saved. This needs to be a subfolder of the media website, so in this case it is c:\\inetpub\\media\\asx. The double backslashes are important as the act as escape characters.
    4. MediaContentLocation – this is where the uploaded media content will be saved. It can be anywhere on the server. In this example I have set it to D:\\Media_Content\\
    5. MMSServer – the address of the Windows Streaming Media Server. This must be prefixed with mms:// and end with the name of the distribution point that you set up in Windows Streaming Media Services earlier. In this example it is mms://media.mydomain.com/Media/
    6. UploadSiteURL – the web address that you use to access the upload site. In this example it is http://media.mydomain.com
  9. You are now set up.

The Download

In case you missed it above, here is the download link again.

Download “WSMS Upload Site” WSMSUpload.zip – Downloaded 1377 times – 21 KB


All of the actions performed by the site run in the context of the currently logged on user. You will therefore need to check the following permissions for the users who you intend on using this function.

  • C:\inetpub\media\asx   –   Assign the Modify permission to the users
  • D:\Media_Content   –   Assign the Modify permission to the users
  • SharePoint URL list – Assign the Contribute rights

I beleive that is everything, but will test again from a fresh install and update.


Let’s start simple. If you browse to http://media.mydomain.com you should be presented with a holding page. This just informs you that media cannot be accessed from here and to use the SharePoint site. It includes a link. You can customise this page by editing the index.htm file.

Next, if you browse to http://media.mydomain.com/upload you should be presented with the actual upload page. If you receive errors then you need to check that the variables set in step 8 above are correct.

The SharePoint list field should show the names of all of the SharePoint lists that you have created. In this instance, only 1 will show, called ‘My Cool Videos’.

If you have got this far with no errors, then great! Time to test adding some content.

Adding Content

Adding content is easy.

  1. Select the file to add by either typing in the path to the file or by selecting Browse and selecting the file.
  2. Fill in the details about the file, including Title, Author, Copyright Holder and any additional information. Only the title is compulsory, but other information is displayed in Windows Media Player when the file is playing. The Information field is used to populate the description of the URL in the SharePoint list.
  3. Choose a SharePoint list to add the link to.
  4. Click Upload

Once the content is uploaded you will have two information lines at the top of the page. One saying ‘The file has been uploaded’, and the second saying ‘Saved the New Item’.


If you get a ‘Server Error in ‘/’ Application’ as soon as you try to browse to the site, then it is most likely a problem with your variables, or the SharePoint site is unavailable.

To get some more information, open up the web.config file in the root of the website and uncomment the <customErrors mode=Off” /> line. Browse to the website again. This will give you a lot more information. Not useful for users (can be daunting) but great for you.

The Web Application at http://sharepoint.mydomain.com could not be found

Two options here: a) you have typed the address of the root of the SharePoint site incorrectly, or b) the SharePoint site is unavailable.

There is no Web named “/media”

The path that you have entered to the Media subsite does not exist. Check that you have entered the correct URL name. Be careful here, we are talking about the URL name, not the site name. If you are not sure, browse to the Media subsite and have a look at the address in the address bar.

Any other errors will only become apparent when you try to upload media. These will be shown at the top of the page and start “Error:”

Error: Could not find a part of the path ‘D:\Media_Services\Content1\System.String[]’.

The path you have specified to store the media content in is not accessible. Check it exists and update your variables.

Error: Could not find a part of the path ‘C:\inetpub\media\asx\filename.asx

The upload could not find the path specified. Check it exists on the web server and is set correctly in your variables.

Error: The type initializer for ” threw an exception

I have no idea why this happens. I have found that restarting the website on the server cures it. It seems to be more prevalent with SharePoint 2010 than with 2007.

All Done

Hopefully this is quite quick and simple to set up. I had it all up and running in a day, including writing the various web pages. I think providing you have a working SharePoint environment, there is no reason not to have this up and running within a couple of hours.

If you are experiencing headaches, please sent me a message from the Contact Me page and I will do my best to help.

9 people found this post useful.

11 thoughts on “Windows Media Services Media Upload Website

  1. Hi, thanks for your post. It’s exactly what I need as we’re relaunching our Sharepoint intranet soon. But I receive an a error when trying to navigate to the /upload page. I can access the main page fine and it comes up with your logo but the upload page displays the server error and Invalid URL: /Media/.
    I can browse to the sharepoint site and lists, even on the server the upload web is stored on.

    Any ideas?


    1. Hi,

      Can you send the full details of the error that you receive? Ideally if you can browse to the site from the server that it is hosted on you will get more detail.


  2. Hi Craig,

    I have everything installed and the configuration looks correct in the upload.aspx.cs file but I’m getting the “Server Erro in ‘/’ Application”. Parser error message is as follows:

    Parser Error Message: Could not load file or assembly ‘Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c’ or one of its dependencies. The system cannot find the file specified.

    I uncommented the line you indicated above for the web.config file but not other information shows up. Also, I see this entry in the web.config files and was curious why it is set to Version= if SharePoint 2010 is


    1. Hi Rob,

      Just had a test with mine here. I actually commented out the line <add assembly="Microsoft.SharePoint version…. and found that the site still works.

      It also appears to have fixed the 'Type Initializer for ''' error that I mentioned above on the page. Would you be able to give it a try and let me know how you get on?


      1. Hi Craig,

        Interestingly enough commenting out that line is giving me an error that is referencing the assembly.

        “Server Error in ‘/’ Application.

        Could not load file or assembly ‘Microsoft.SharePoint.Library, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c’ or one of its dependencies. The system cannot find the file specified.”

        I’ve commented that line out in both web.config files located in the root folder and the upload folder.


  3. Craig,

    First I want to say thank you for publishing these directions they have been enormously helpful. I do have one question though. I have the upload site and Sharepoint setup properly so I get the messages:

    The file has been uploaded.

    Saved the New Item.

    However, when i go look at the content directory on my media server I see a file of the correct size but with the name “System.String[]”. In addition, when I look at the corresponding ASX file I see the following line:

    I have tested creating an announcement file from within Media Services and that worked fine. In this instance the line from the ASX file looks like this:

    Did I screw something up in the configuration? Any tips or suggestions you could give would be greatly appreciated as I know depts in my company would love the ability to upload content on their own.

    Thanks again for the awesome work,


    1. Sorry for the late response, I have been on leave for the past week.

      I have just checked it out and found the problem. I had not merged the latest copy of the upload.aspx.cs file into the package.

      The new version is included in the package above.

  4. I have installed this template per your instructions on a Windows Server 2008 server, with Media Services functional. I have SP 2010 installed in the same network on different servers.

    I receive this error when trying to go to upload.aspx:
    Configuration Error:
    page: upload\web.config

    1. Hi,

      Please download the current version. It has been updated a fixes a couple of bugs in the upload.aspx.cs file.

      It seems to work fine when I run it on a HTTPS SharePoint site on my test machine.


    1. No, it doesn’t even have to be installed on a server with any sharepoint roles. As long as it is the same server as the Windows Media Streaming Services and IIS.

Leave a Reply to Craig Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.