locked
Failed to map the path '/'. RRS feed

  • Question

  • Hi All,

    I received below error and I have no clue why it is breaking on Service A for Path.

    Other services are running fine, These services are not hosted in IIS they are running of Visual Studio (web dev server).

    Please guide me on this. Request you change Forum category if not correct one.

    Server Error in '/MyService' Application.

    Failed to map the path '/'.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    Exception Details: System.InvalidOperationException: Failed to map the path '/'.
    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace:

    [InvalidOperationException: Failed to map the path '/'.]

       System.Web.Configuration.ProcessHostConfigUtils.MapPathActual(String siteName, VirtualPath path) +314

       System.Web.Configuration.ProcessHostMapPath.MapPathCaching(String siteID, VirtualPath path) +1865

       System.Web.Configuration.ProcessHostMapPath.GetPathConfigFilenameWorker(String siteID, VirtualPath path, String& directory, String& baseName) +46

       System.Web.Configuration.ProcessHostMapPath.System.Web.Configuration.IConfigMapPath.GetPathConfigFilename(String siteID, String path, String& directory, String& baseName) +69

       System.Web.Configuration.HostingPreferredMapPath.GetPathConfigFilename(String siteID, String path, String& directory, String& baseName) +104

       System.Web.Configuration.WebConfigurationHost.GetStreamName(String configPath) +309

       System.Configuration.Internal.DelegatingConfigHost.GetStreamName(String configPath) +48

       System.Configuration.BaseConfigurationRecord.InitConfigFromFile() +367

    [ConfigurationErrorsException: An error occurred loading a configuration file: Failed to map the path '/'.]

       System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal) +100

       System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors) +86

       System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors() +35

       System.Configuration.Configuration..ctor(String locationSubPath, Type typeConfigHost, Object[] hostInitConfigurationParams) +527

       System.Configuration.Internal.InternalConfigConfigurationFactory.System.Configuration.Internal.IInternalConfigConfigurationFactory.Create(Type typeConfigHost, Object[] hostInitConfigurationParams) +55

       System.Web.Configuration.WebConfigurationHost.OpenConfiguration(WebLevel webLevel, ConfigurationFileMap fileMap, VirtualPath path, String site, String locationSubPath, String server, String userName, String password, IntPtr tokenHandle) +1296

       System.Web.Configuration.WebConfigurationManager.OpenWebConfigurationImpl(WebLevel webLevel, ConfigurationFileMap fileMap, String path, String site, String locationSubPath, String server, String userName, String password, IntPtr userToken) +115

       System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(String path) +63

       Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceHost.InitializeRuntime() +389

       System.ServiceModel.ServiceHostBase.OnBeginOpen() +46

       System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout) +82

       System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +744

       System.ServiceModel.Channels.CommunicationObject.Open() +66

       System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +206

       System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +1071

    [ServiceActivationException: The service '/MyService/Service.svc' cannot be activated due to an exception during compilation.  The exception message is: An error occurred loading a configuration file: Failed to map the path '/'..]

       System.Runtime.AsyncResult.End(IAsyncResult result) +428

       System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +422

       System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, String routeServiceVirtualPath, Boolean flowContext, Boolean ensureWFService) +330

       System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext, Boolean ensureWFService) +46

       System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e) +414

       System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +221

       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +120

    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

    Thanks In Advance, Vikram

    Thursday, September 5, 2013 6:35 AM

All replies

  • Hi,

    Thank you for posting in the MSDN forum.

    Based on your post, I feel you did not get the issue when you work with Visual Studio tests. In this case, I’m afraid that it is not the correct forum for this issue, since this forum is to discuss the VS testing issue.

    If you get issues when working with ASP.NET Web Application/Web Service, I suggest that you can consult your issue on ASP.NET forum: http://forums.asp.net/  for better solution and support.

    If I have misunderstood anything, please feel free to let me know.

    Best regards,


    Amanda Zhu <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, September 5, 2013 7:54 AM
    Moderator