"Failed to map the path" on a brand new EPi5R2 site in VS2008 on W2K8

Andy Brodie
Member since: 2006

Hi there,

I'm trying to create a new development project on Visual Studio 2008 on Windows Server 2008 Enterprise.

I've done this several times before on other platforms, so I'm pretty sure I'm following the instructions in the SDK documentation's excellent "Getting Started" guide.

I get a directory listing as expected once the site is created, however if I go to any pages, or the root once Default.aspx is created I get the following error:

System.InvalidOperationException: Failed to map the path '/'.
[InvalidOperationException: Failed to map the path '/'.]
System.Web.Configuration.ProcessHostMapPath.MapPathCaching(String siteID, VirtualPath path) +719
System.Web.Configuration.ProcessHostMapPath.GetPathConfigFilenameWorker(String siteID, VirtualPath path, String& directory, String& baseName) +19
System.Web.Configuration.ProcessHostMapPath.System.Web.Configuration.IConfigMapPath.GetPathConfigFilename(String siteID, String path, String& directory, String& baseName) +37
System.Web.Configuration.HostingPreferredMapPath.GetPathConfigFilename(String siteID, String path, String& directory, String& baseName) +75
System.Web.Configuration.WebConfigurationHost.GetStreamName(String configPath) +8834134
System.Configuration.Internal.DelegatingConfigHost.GetStreamName(String configPath) +13
System.Configuration.BaseConfigurationRecord.InitConfigFromFile() +154

[ConfigurationErrorsException: An error occurred loading a configuration file: Failed to map the path '/'.]
System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal) +650756
System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors) +31
System.Configuration.Configuration..ctor(String locationSubPath, Type typeConfigHost, Object[] hostInitConfigurationParams) +356
System.Configuration.Internal.InternalConfigConfigurationFactory.System.Configuration.Internal.IInternalConfigConfigurationFactory.Create(Type typeConfigHost, Object[] hostInitConfigurationParams) +29
System.Web.Configuration.WebConfigurationHost.OpenConfiguration(WebLevel webLevel, ConfigurationFileMap fileMap, VirtualPath path, String site, String locationSubPath, String server, String userName, String password, IntPtr tokenHandle) +775
System.Web.Configuration.WebConfigurationManager.OpenWebConfigurationImpl(WebLevel webLevel, ConfigurationFileMap fileMap, String path, String site, String locationSubPath, String server, String userName, String password, IntPtr userToken) +84
System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(String path) +36
EPiServer.Configuration.EPiServerSection.get_CurrentConfiguration() +31
EPiServer.Configuration.EPiServerSection.get_Instance() +27
EPiServer.Security.VirtualRoles..cctor() +88

[TypeInitializationException: The type initializer for 'EPiServer.Security.VirtualRoles' threw an exception.]
EPiServer.Global.Init() +126
System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +335

Does anyone know what might cause this?




#27223 Jan 21, 2009 13:57
  • Andy Brodie
    Member since: 2006

    I've compared the web.config for virtualroles and providers with an install that works on XP and they seem the same.  I've checked I've got .NET Framework 3.5 SP1 installed too.

    I didn't want to attach the entire web.config as its huge...

    #27231 Edited, Jan 21, 2009 15:40
  • Andy Brodie
    Member since: 2006

    Problem solved!  Courtesy of EPiServer Support (with a wonderfully fast and concise response!)

    You have to run Visual Studio 2008 as Administrator.

    This is by design in R2.


    #27233 Jan 21, 2009 16:46