Quantcast
Channel: Web API
Viewing all articles
Browse latest Browse all 4850

The virtual path '/' maps to another application, which is not allowed.

$
0
0

We are trying to consume a WCF proxy service form a Web API REST service. When we allow Visual Studio to run under the default URL likehttp://localhost:62664/everything works well. When we trying to run it under http://localhost/MyWebApi/ we get this error The virtual path '/' maps to another application, which is not allowed. The service will run if I map a new local IIS site to it and runhttp://localhost/

This behavior is replicated on each server we deploy it to. Any suggestions for resolving this are welcome. Below is the full exception

  Message: "The virtual path '/' maps to another application, which is not allowed."


    RemoteStackTrace: "\r\nServer stack trace: \r\n   at System.Web.CachedPathData.GetVirtualPathData(VirtualPath virtualPath, Boolean permitPathsOutsideApp)\r\n   at System.Web.HttpContext.GetFilePathData()\r\n   at System.Web.HttpContext.GetSection(String sectionName)\r\n   at System.ServiceModel.Activation.HostedAspNetEnvironment.UnsafeGetSectionFromWebConfigurationManager(String sectionPath, String virtualPath)\r\n   at System.ServiceModel.Configuration.ConfigurationHelpers.UnsafeGetAssociatedSection(ContextInformation evalContext, String sectionPath)\r\n   at System.ServiceModel.Diagnostics.MessageLogger.Initialize()\r\n   at System.ServiceModel.Diagnostics.MessageLogger.EnsureInitialized()\r\n   at System.ServiceModel.Diagnostics.MessageLogger.get_LogMessagesAtServiceLevel()\r\n   at System.ServiceModel.Channels.ServiceChannel.PrepareCall(ProxyOperationRuntime operation, Boolean oneway, ProxyRpc& rpc)\r\n   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationR
untime operation, Object[] ins, Object[] outs, TimeSpan timeout)\r\n   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)\r\n   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)\r\n\r\nException rethrown at [0]: \r\n"
    Source: "mscorlib"
    TargetSite: {Void HandleReturnMessage(System.Runtime.Remoting.Messaging.IMessage, System.Runtime.Remoting.Messaging.IMessage)}


Viewing all articles
Browse latest Browse all 4850

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>