Can you post the part of your config where the VPP paths are defined?
They should look like this: http://world.episerver.com/Documentation/Items/Tech-Notes/EPiServer-CMS-6/EPiServer-CMS-60/Virtual-Path-Providers/
Here is the code extract from the episerver.config file. I have checked and all the locations do exist. If I access the admin page, the debugging console shows 404 errors for the various scripts. If I try and access one of the scripts directly through firefox, it shows a full 404 page and shows that it's trying to find the files from the root folder each time.
<virtualPath customFileSummary="~/FileSummary.config">
<providers>
<clear />
<add showInFileManager="true" virtualName="Page Files" virtualPath="~/PageFiles/" bypassAccessCheck="false" name="SitePageFiles" type="EPiServer.Web.Hosting.VirtualPathVersioningProvider,EPiServer" indexingServiceCatalog="Web" physicalPath="C:\EPiServer\VPP\EPiServer6r2Test\PageFiles" />
<!--<add showInFileManager="false" virtualName="Virtual Path Mappings" virtualPath="~/upload/"
bypassAccessCheck="false" name="SitePathMappings" type="EPiServer.Web.Hosting.VirtualPathMappedProvider,EPiServer" />-->
<add showInFileManager="true" virtualName="Global Files" virtualPath="~/Global/" bypassAccessCheck="false" name="SiteGlobalFiles" type="EPiServer.Web.Hosting.VirtualPathVersioningProvider,EPiServer" indexingServiceCatalog="Web" physicalPath="C:\EPiServer\VPP\EPiServer6r2Test\Global" />
<add showInFileManager="true" virtualName="Documents" virtualPath="~/Documents/" bypassAccessCheck="false" maxVersions="5" name="SiteDocuments" type="EPiServer.Web.Hosting.VirtualPathVersioningProvider,EPiServer" physicalPath="C:\EPiServer\VPP\EPiServer6r2Test\Documents" />
<!--
<add showInFileManager="true" virtualName="Global Files" virtualPath="~/Global/"
bypassAccessCheck="false" indexingServiceCatalog="Web" physicalPath="%EPISERVERFILESDIR%\EPiServerFiles\Globals"
name="SiteGlobalFiles" type="EPiServer.Web.Hosting.VirtualPathNativeProvider,EPiServer"
WriteAccess="Administrators" DeleteAccess="Administrators" />
-->
<add name="App_Themes_Default" virtualPath="~/App_Themes/Default/" physicalPath="C:\Program Files (x86)\EPiServer\CMS\6.1.379.0\application\App_Themes\Default" type="EPiServer.Web.Hosting.VirtualPathNonUnifiedProvider,EPiServer" />
<add name="UI" virtualPath="~/Admin/UI/CMS/" physicalPath="C:\Program Files (x86)\EPiServer\CMS\6.1.379.0\application\UI\CMS" type="EPiServer.Web.Hosting.VirtualPathNonUnifiedProvider,EPiServer" />
<add name="UtilFiles" virtualPath="~/Util/" physicalPath="C:\Program Files (x86)\EPiServer\CMS\6.1.379.0\application\util" type="EPiServer.Web.Hosting.VirtualPathNonUnifiedProvider,EPiServer" />
<add name="WebServiceFiles" virtualPath="~/WebServices/" physicalPath="C:\Program Files (x86)\EPiServer\CMS\6.1.379.0\application\webservices" type="EPiServer.Web.Hosting.VirtualPathNonUnifiedProvider,EPiServer" />
<add name="EPiServerCMS" virtualPath="~/Admin/UI/CMS/" physicalPath="C:\Program Files (x86)\EPiServer\CMS\6.1.379.0\application\UI\EPiServer\CMS" type="EPiServer.Web.Hosting.VirtualPathNonUnifiedProvider,EPiServer" />
<add name="EPiServerShell" virtualPath="~/Admin/UI/Shell/" physicalPath="C:\Program Files (x86)\EPiServer\Framework\6.2.267.1\Application\UI" type="EPiServer.Web.Hosting.VirtualPathNonUnifiedProvider,EPiServer" />
<add name="EPiServerUrlMappingVPP" virtualName="ExtensionMapping" virtualPath="~/Admin/UI/CMS/" bypassAccessCheck="false" showInFileManager="false" type="EPiServer.Web.Hosting.VirtualPathMappedProvider,EPiServer" />
</providers>
<filters />
</virtualPath>
The error when trying to access directly is as follows:
Module | IIS Web Core |
---|---|
Notification | MapRequestHandler |
Handler | StaticFile |
Error Code | 0x80070002 |
Requested URL | http://localhost:17000/Admin/UI/Shell/ClientResources/ShellWidgets.js |
---|---|
Physical Path | C:\EPiServer\Sites\EPiServer6r2Test\Admin\UI\Shell\ClientResources\ShellWidgets.js |
Logon Method | Anonymous |
Logon User | Anonymous |
Your VPPs from episerver.config need a corresponding section in web.config, like this (IIS7 format, see my link above for IIS6 format if needed):
<location path="Documents">
<staticFile expirationTime="-1.0:0:0"/>
<system.webServer>
<handlers>
<add name="wildcard" path="*" verb="*" type="EPiServer.Web.StaticFileHandler, EPiServer"/>
</handlers>
</system.webServer>
</location>
These are the ones I have
<location path="PageFiles">
<system.web>
<!-- Make sure that the WebResource loader of ASP.NET is initialized correctly -->
<!-- Setup the StaticFileHandler for the wildcard mapping to work in IIS6 -->
<httpHandlers>
<add path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" validate="true" />
<add path="*" verb="*" type="EPiServer.Web.StaticFileHandler, EPiServer" validate="true" />
</httpHandlers>
</system.web>
<staticFile expirationTime="-1.0:0:0" />
</location>
<location path="Documents">
<system.web>
<!-- Setup the StaticFileHandler for the wildcard mapping to work in IIS6 -->
<httpHandlers>
<add path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" validate="true" />
<add path="*" verb="*" type="EPiServer.Web.StaticFileHandler, EPiServer" validate="true" />
</httpHandlers>
</system.web>
<staticFile expirationTime="-1.0:0:0" />
</location>
<location path="Global">
<system.web>
<!-- Setup the StaticFileHandler for the wildcard mapping to work in IIS6 -->
<httpHandlers>
<add path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" validate="true" />
<add path="*" verb="*" type="EPiServer.Web.StaticFileHandler, EPiServer" validate="true" />
</httpHandlers>
</system.web>
<staticFile expirationTime="-1.0:0:0" />
</location>
<!--
Uncomment the following section replace UI in the path attribute with your customized UI path
to enable Office integration in the application.
-->
<!--<location path="EPiServer/CMS/OfficeIntegration">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>-->
<location path="util">
<system.web>
<pages enableEventValidation="true">
<controls>
<add tagPrefix="EPiServerUI" namespace="EPiServer.UI.WebControls" assembly="EPiServer.UI" />
<add tagPrefix="EPiServerScript" namespace="EPiServer.ClientScript.WebControls" assembly="EPiServer" />
</controls>
</pages>
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
<httpHandlers>
<add path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" validate="true" />
<add path="*.aspx" verb="*" type="System.Web.UI.PageHandlerFactory" validate="true" />
<add path="*.ashx" verb="*" type="System.Web.UI.SimpleHandlerFactory" validate="true" />
<add path="*.asmx" verb="*" type="System.Web.Services.Protocols.WebServiceHandlerFactory, System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false" />
<add path="*" verb="*" type="EPiServer.Web.StaticFileHandler, EPiServer" validate="true" />
</httpHandlers>
</system.web>
</location>
Your config is in IIS6 format. Are you sure you're running IIS6 in your environment?
Just ran %SystemRoot%\system32\inetsrv\appcmd migrate config "EPiServer6r2Test/"
It says it converted stuff but the code I posted above hasn't changed one bit
Just try substituting your <system.web> nodes with <system.webServer> (inside the <location> nodes) and see if that solves it
Didn't work. Liked the <system.webServer> but then it didn't like <httpHandlers>
In IIS7+ it's changed to <handlers>. Take a look at my TechNote link above, it's all there :-)
Updated the web.config file. Still not working :(
<location path="PageFiles">
<system.webServer>
<!-- Make sure that the WebResource loader of ASP.NET is initialized correctly -->
<!-- Setup the StaticFileHandler for the wildcard mapping to work in IIS6 -->
<handlers>
<add name="webresource" path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" />
<add name="filehandler" path="*" verb="*" type="EPiServer.Web.StaticFileHandler, EPiServer" />
</handlers>
</system.webServer>
<staticFile expirationTime="-1.0:0:0" />
</location>
<location path="Documents">
<system.webServer>
<!-- Setup the StaticFileHandler for the wildcard mapping to work in IIS6 -->
<handlers>
<add name="webresource" path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" />
<add name="filehandler" path="*" verb="*" type="EPiServer.Web.StaticFileHandler, EPiServer" />
</handlers>
</system.webServer>
<staticFile expirationTime="-1.0:0:0" />
</location>
<location path="Global">
<system.webServer>
<!-- Setup the StaticFileHandler for the wildcard mapping to work in IIS6 -->
<handlers>
<add name="webresource" path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" />
<add name="filehandler" path="*" verb="*" type="EPiServer.Web.StaticFileHandler, EPiServer" />
</handlers>
</system.webServer>
<staticFile expirationTime="-1.0:0:0" />
</location>
<!--
Uncomment the following section replace UI in the path attribute with your customized UI path
to enable Office integration in the application.
-->
<!--<location path="EPiServer/CMS/OfficeIntegration">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>-->
<location path="util">
<system.webServer>
<!--<pages enableEventValidation="true">
<controls>
<add tagPrefix="EPiServerUI" namespace="EPiServer.UI.WebControls" assembly="EPiServer.UI" />
<add tagPrefix="EPiServerScript" namespace="EPiServer.ClientScript.WebControls" assembly="EPiServer" />
</controls>
</pages>-->
<!--<globalization requestEncoding="utf-8" responseEncoding="utf-8" />-->
<handlers>
<add name="webresource" path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" />
<add name="pagehandler" path="*.aspx" verb="*" type="System.Web.UI.PageHandlerFactory" />
<add name="simplehandler" path="*.ashx" verb="*" type="System.Web.UI.SimpleHandlerFactory" />
<add name="servicehandler" path="*.asmx" verb="*" type="System.Web.Services.Protocols.WebServiceHandlerFactory, System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add name="staticfile" path="*" verb="*" type="EPiServer.Web.StaticFileHandler, EPiServer" />
</handlers>
</system.webServer>
</location>
Success! Here are the working lines:
<location path="PageFiles">
<staticFile expirationTime="-1.0:0:0" />
<system.webServer>
<handlers>
<clear />
<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>
<location path="Documents">
<system.webServer>
<!-- Setup the StaticFileHandler for the wildcard mapping to work in IIS6 -->
<handlers>
<clear />
<add name="webresource" path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" />
<add name="filehandler" path="*" verb="*" type="EPiServer.Web.StaticFileHandler, EPiServer" />
</handlers>
</system.webServer>
<staticFile expirationTime="-1.0:0:0" />
</location>
<location path="Global">
<system.web>
<httpHandlers>
<clear />
<add path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" validate="true" />
<add path="*.aspx" verb="*" type="System.Web.UI.PageHandlerFactory" validate="true" />
<add path="*.ashx" verb="*" type="System.Web.UI.SimpleHandlerFactory" validate="true" />
<add path="*.asmx" verb="*" type="System.Web.Services.Protocols.WebServiceHandlerFactory, System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false" />
<add path="*" verb="*" type="EPiServer.Web.StaticFileHandler, EPiServer" validate="true" />
</httpHandlers>
</system.web>
<system.webServer>
<!-- Setup the StaticFileHandler for the wildcard mapping to work in IIS6 -->
<handlers>
<clear />
<add name="webresource" path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" />
<add name="filehandler" path="*" verb="*" type="EPiServer.Web.StaticFileHandler, EPiServer" />
</handlers>
</system.webServer>
<staticFile expirationTime="-1.0:0:0" />
</location>
<location path="Admin/UI/CMS">
<system.web>
<pages enableEventValidation="true">
<controls>
<add tagPrefix="EPiServerUI" namespace="EPiServer.UI.WebControls" assembly="EPiServer.UI" />
<add tagPrefix="EPiServerScript" namespace="EPiServer.ClientScript.WebControls" assembly="EPiServer" />
<add tagPrefix="EPiServerScript" namespace="EPiServer.UI.ClientScript.WebControls" assembly="EPiServer.UI" />
</controls>
</pages>
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
<httpHandlers>
<clear />
<add path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" validate="true" />
<add path="*.aspx" verb="*" type="System.Web.UI.PageHandlerFactory" validate="true" />
<add path="*.ashx" verb="*" type="System.Web.UI.SimpleHandlerFactory" validate="true" />
<add path="*.asmx" verb="*" type="System.Web.Services.Protocols.WebServiceHandlerFactory, System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false" />
<add path="*" verb="*" type="EPiServer.Web.StaticFileHandler, EPiServer" validate="true" />
</httpHandlers>
</system.web>
<system.webServer>
<!-- Setup the StaticFileHandler for the wildcard mapping to work in IIS6 -->
<handlers>
<clear />
<add name="webresource" path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" />
<add name="aspxresource" path="*.aspx" verb="*" type="System.Web.UI.PageHandlerFactory" />
<add name="ashxresource" path="*.ashx" verb="*" type="System.Web.UI.SimpleHandlerFactory" />
<add name="asmxresource" path="*.asmx" verb="*" type="System.Web.Services.Protocols.WebServiceHandlerFactory, System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add name="filehandler" path="*" verb="*" type="EPiServer.Web.StaticFileHandler, EPiServer" />
</handlers>
</system.webServer>
<staticFile expirationTime="-1.0:0:0" />
</location>
<location path="Admin/UI/Shell">
<system.web>
<pages enableEventValidation="true">
<controls>
<add tagPrefix="EPiServerUI" namespace="EPiServer.UI.WebControls" assembly="EPiServer.UI" />
<add tagPrefix="EPiServerScript" namespace="EPiServer.ClientScript.WebControls" assembly="EPiServer" />
<add tagPrefix="EPiServerScript" namespace="EPiServer.UI.ClientScript.WebControls" assembly="EPiServer.UI" />
</controls>
</pages>
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
<httpHandlers>
<clear />
<add path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" validate="true" />
<add path="*.aspx" verb="*" type="System.Web.UI.PageHandlerFactory" validate="true" />
<add path="*.ashx" verb="*" type="System.Web.UI.SimpleHandlerFactory" validate="true" />
<add path="*.asmx" verb="*" type="System.Web.Services.Protocols.WebServiceHandlerFactory, System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false" />
<add path="*" verb="*" type="EPiServer.Web.StaticFileHandler, EPiServer" validate="true" />
</httpHandlers>
</system.web>
<system.webServer>
<!-- Setup the StaticFileHandler for the wildcard mapping to work in IIS6 -->
<handlers>
<clear />
<add name="webresource" path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" />
<add name="aspxresource" path="*.aspx" verb="*" type="System.Web.UI.PageHandlerFactory" />
<add name="ashxresource" path="*.ashx" verb="*" type="System.Web.UI.SimpleHandlerFactory" />
<add name="asmxresource" path="*.asmx" verb="*" type="System.Web.Services.Protocols.WebServiceHandlerFactory, System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add name="filehandler" path="*" verb="*" type="EPiServer.Web.StaticFileHandler, EPiServer" />
</handlers>
</system.webServer>
<staticFile expirationTime="-1.0:0:0" />
</location>
Fundamentally, the new paths were missing. (Admin/UI/CMS and Admin/UI/Shell) and tada! Thanks for your help Arild! There are still minor bugs but with the paths working, it should be a case of working through them
I've just installed a local copy of EPiServer 6 r2 and the Alloy Tech sample site. Everything except the virtual paths are working. The paths are in the EPiServer.config file and seem correct but are clearly not working. The urls seem to map to the site root regardless. Anyone know how I can fix it?