Note that there are some explanatory texts on larger screens.

plurals
  1. POUnable to browse to WCF service: HTTP 400 bad request
    primarykey
    data
    text
    <p>I have a VS2010 MVC3 solution calling 2 WCF services. Everything works fine on my first computer. I have another computer where I installed the same OS, same VS, same SQL Server Express, Same IIS, ... I copied source code of my solution on this second computer. Everything works fine when running the solution.</p> <p>BUT on this second computer:</p> <ul> <li><p>I cannot browse to the service URL !? (1)</p></li> <li><p>I cannot do a "Update service reference" !? (2)</p></li> </ul> <p>(1) When I browse to <strong>http://localhost/PLATONServices/RequestService.svc</strong> I got a HTTP400 BAD REQUEST error.</p> <p>(2) I got a THE REQUEST FAILED WITH HTTP STATUS 400: BAD REQUEST METADATE CONTAINS REFERENCE THAT CANNOT BE RESOLVED: 'http://localhost/PLATONServices/RequestService.svc'.</p> <p>Any idea?</p> <p>Because code source is the same on both computers and everything is OK on the first computer, the problem is somewhere else. I use IIS6 on both computers but I cannot see any differences.</p> <p>I searched all day long without success. </p> <p>Thanks.</p> <hr> <p>UPDATE</p> <p>Here is the trace of WCF:</p> <pre><code>&lt;E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent"&gt; &lt;System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system"&gt; &lt;EventID&gt;131075&lt;/EventID&gt; &lt;Type&gt;3&lt;/Type&gt; &lt;SubType Name="Error"&gt;0&lt;/SubType&gt; &lt;Level&gt;2&lt;/Level&gt; &lt;TimeCreated SystemTime="2012-05-13T08:33:37.1384484Z" /&gt; &lt;Source Name="System.ServiceModel" /&gt; &lt;Correlation ActivityID="{5d80ddb2-6cf8-4e65-bc9b-3f4b7b880605}" /&gt; &lt;Execution ProcessName="w3wp" ProcessID="5280" ThreadID="13" /&gt; &lt;Channel /&gt; &lt;Computer&gt;THINKPAD&lt;/Computer&gt; &lt;/System&gt; &lt;ApplicationData&gt; &lt;TraceData&gt; &lt;DataItem&gt; &lt;TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Error"&gt; &lt;TraceIdentifier&gt;http://msdn.microsoft.com/fr-BE/library/System.ServiceModel.Diagnostics.ThrowingException.aspx&lt;/TraceIdentifier&gt; &lt;Description&gt;Throwing an exception.&lt;/Description&gt; &lt;AppDomain&gt;/LM/W3SVC/1/ROOT/PLATONServices-2-129813716146273047&lt;/AppDomain&gt; &lt;Exception&gt; &lt;ExceptionType&gt;System.ServiceModel.ProtocolException, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&lt;/ExceptionType&gt; &lt;Message&gt;There is a problem with the XML that was received from the network. See inner exception for more details.&lt;/Message&gt; &lt;StackTrace&gt; at System.ServiceModel.Channels.HttpRequestContext.CreateMessage() at System.ServiceModel.Channels.HttpChannelListener.HttpContextReceived(HttpRequestContext context, Action callback) at System.ServiceModel.Activation.HostedHttpTransportManager.HttpContextReceived(HostedHttpRequestAsyncResult result) at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest() at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest() at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequest(Object state) at System.Runtime.IOThreadScheduler.ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped) at System.Runtime.Fx.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped) at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP) &lt;/StackTrace&gt; &lt;ExceptionString&gt;System.ServiceModel.ProtocolException: There is a problem with the XML that was received from the network. See inner exception for more details. ---&amp;gt; System.Xml.XmlException: The body of the message cannot be read because it is empty. --- End of inner exception stack trace ---&lt;/ExceptionString&gt; &lt;InnerException&gt; &lt;ExceptionType&gt;System.Xml.XmlException, System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&lt;/ExceptionType&gt; **&lt;Message&gt;The body of the message cannot be read because it is empty.&lt;/Message&gt;** &lt;StackTrace&gt; at System.ServiceModel.Channels.HttpRequestContext.CreateMessage() at System.ServiceModel.Channels.HttpChannelListener.HttpContextReceived(HttpRequestContext context, Action callback) at System.ServiceModel.Activation.HostedHttpTransportManager.HttpContextReceived(HostedHttpRequestAsyncResult result) at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest() at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest() at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequest(Object state) at System.Runtime.IOThreadScheduler.ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped) at System.Runtime.Fx.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped) at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP) &lt;/StackTrace&gt; &lt;ExceptionString&gt;**System.Xml.XmlException: The body of the message cannot be read because it is empty.**&lt;/ExceptionString&gt; &lt;/InnerException&gt; &lt;/Exception&gt; &lt;/TraceRecord&gt; &lt;/DataItem&gt; &lt;/TraceData&gt; &lt;/ApplicationData&gt; &lt;/E2ETraceEvent&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload