Adding migrated VPP upload directory to IIS7-powered site

Member since: 2004
 

Hello,

I am trying to add an upload directory to a migrated site from EPi 4.62b to CMS R2. I have since then also upgraded the site to R2 SP1. I am runnning a Windows Server 2008 site with IIS 7.

My steps:

1. Added the (migrated) /upload directory to the VPP directory E:\www-upload - and also made sure that the migrated database is used on the web site.

2. Added the following in web.config, inside the /VirtualPath/providers xpath:
< add virtualPath="~/upload/" physicalPath="E:\www-upload\upload"
showInFileManager="true" virtualName="upload" bypassAccessCheck="false"
name="Siteupload" type="EPiServer.Web.Hosting.VirtualPathVersioningProvider,EPiServer" />

3. Set the correct rights for account NETWORK SERVICE to modify files on the physical upload directory.

This approach works fine on my local IIS 5.1 installation, but on IIS7 the images and documents inside upload can not be shown. If I try to browse the EPiServer file manager inside edit mode of the IIS7 site, I can read the full structure of the upload directory, so I know they are there and rendered properly by the database, but I cannot view them there (either).

Also, I have no trouble adding images or documents that can be viewed to the standard VPP folders "Global" or "Documents", it is within the VPP folder "upload" something goes awry.

Is there anyone that has some pointers on how to go forward with this?

Regards,
/Marten

#28984 Apr 01, 2009 16:03
  • Member since: 1999
     
    Have you added a <location>-element for "upload" just as there is for the other folders like "Global" ?
    #28986 Apr 01, 2009 16:21
  • Member since: 2006
     

    It's the location element only needed if one are running IIS6?

     

    //Morten

    #29000 Apr 02, 2009 7:24
  • Member since: 2003
     

    You need the following location element for IIS 7:

    <location path="upload">
       <system.webServer>
         <handlers>
             <add name="webresources" path="WebResource.axd" verb="GET"
                      type="System.Web.Handlers.AssemblyResourceLoader" />
             <add name="wildcard" path="*" verb="*"
                type="EPiServer.Web.StaticFileHandler, EPiServer" />
         </handlers>
        </system.webServer>
    </location>

    #29003 Apr 02, 2009 8:35
  • Member since: 2004
     

    It was indeed the case of me forgetting the location element. It works fine now since I added it. Thanks to all for your input.

    #29005 Apr 02, 2009 9:12