Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6057521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:29:51+00:00 2026-05-23T08:29:51+00:00

I have a known working web service which is configured as a SOAP and

  • 0

I have a known working web service which is configured as a SOAP and REST binding. I can call it with a test harness and I can see the SOAP POST’s going to and then the SOAP response all good.

However when I try and host the service in visual studio 2010 Cassini I get the following behaviour:

1) When calling endpoint as REST and using the WebChannelFactory class the service works.
2) When calling the endpoint as SOAP and using the ChannelFactory class the service throws an error and I get a 400 response. (The error is below).
3) When calling the endpoint as SOAP and using a c# SOAP reference the service works.

Confusing no?

Im wondering is it something to do with the fact that I have used a port number for the Cassini version?


just before people start telling me to host in IIS I really need to get this working in Cassini as its part of a tutorial on WCF


Here is the raw HTTP request that doesnt work (when called against a working IIS deployment and the faulty Visual Studio webserver.

IIS WORKING:

POST http://api.dev.videolibraryserver.com/VLSContentService.svc/soap/ HTTP/1.1
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://tempuri.org/IVLSContentService/EchoWithGet"
Host: api.dev.videolibraryserver.com
Content-Length: 180
Expect: 100-continue
Accept-Encoding: gzip, deflate
Connection: Keep-Alive

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><EchoWithGet xmlns="http://tempuri.org/"><message>Hello World!</message></EchoWithGet></s:Body></s:Envelope>

VISUAL STUDIO (CASSINI) – NOT WORKING:

POST http://127.0.0.1:52587/VLSContentService.svc//soap HTTP/1.1
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://tempuri.org/IVLSContentService/EchoWithGet"
Host: 127.0.0.1:52587
Content-Length: 180
Expect: 100-continue
Accept-Encoding: gzip, deflate
Connection: Keep-Alive

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><EchoWithGet xmlns="http://tempuri.org/"><message>Hello World!</message></EchoWithGet></s:Body></s:Envelope>

THE ERROR RESPONSE WHEN USING CASSINI

HTTP/1.1 400 Bad Request
Server: ASP.NET Development Server/10.0.0.0
Date: Thu, 23 Jun 2011 10:42:09 GMT
Content-Length: 1209
Content-type: text/html;charset=utf-8
Connection: Close

<html>
    <head>
        <title>Bad Request</title>
        <style>
            body {font-family:"Verdana";font-weight:normal;font-size: 8pt;color:black;} 
            p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
            b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
            h1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
            h2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
            pre {font-family:"Lucida Console";font-size: 8pt}
            .marker {font-weight: bold; color: black;text-decoration: none;}
            .version {color: gray;}
            .error {margin-bottom: 10px;}
            .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
        </style>
    </head>
    <body bgcolor="white">

            <span><h1>Server Error in '/' Application.<hr width=100% size=1 color=silver></h1>

            <h2> <i>HTTP Error 400 - Bad Request.</i> </h2></span>

            <hr width=100% size=1 color=silver>

            <b>Version Information:</b>&nbsp;ASP.NET Development Server 10.0.0.0

            </font>

    </body>
</html>

THE .NET EXCEPTION (although irrelevant as no response returned from server)

C:\Users\Peter Heard\Desktop\TestClient\Debug>TestClient.exe "http://ipv4.fiddle
r:52587/VLSContentService.svc/" "Hello World!" 2


***************************
About to call SOAP web service interface TestSOAPUsingChannelFactory()
There was an errorSystem.ServiceModel.ProtocolException: The remote server retur
ned an unexpected response: (400) Bad Request. ---> System.Net.WebException: The
 remote server returned an error: (400) Bad Request.
   at System.Net.HttpWebRequest.GetResponse()
   at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpCha
nnelRequest.WaitForReply(TimeSpan timeout)
   --- End of inner exception stack trace ---

Server stack trace:
   at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResp
onse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory factor
y, WebException responseException, ChannelBinding channelBinding)
   at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpCha
nnelRequest.WaitForReply(TimeSpan timeout)
   at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeS
pan timeout)
   at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message messag
e, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean on
eway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan tim
eout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCall
Message methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage req
Msg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgDa
ta, Int32 type)
   at IVLSContentService.EchoWithGet(String message)
   at TestClient.Program.TestSOAPUsingChannelFactory() in C:\Repositories\VideoL
ibraryServer\trunk\prototypes\Hml_Api_Wcf\TestClient\Program.cs:line 96
   at TestClient.Program.Main(String[] args) in C:\Repositories\VideoLibraryServ
er\trunk\prototypes\Hml_Api_Wcf\TestClient\Program.cs:line 47

*******Update*************

Whilst the answer to this question was correct. My testing wasnt. I actually tried to pass a ‘//’ in the url for the IIS and Cassini and it didnt work for Cassini. Obviously IIS is a bit more robust when handling quotes. The comments below talk about this but I thought i would update the answer.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T08:29:52+00:00Added an answer on May 23, 2026 at 8:29 am

    The first line of your “not working” request has an extra slash in the URL:

    POST http://127.0.0.1:52587/VLSContentService.svc//soap HTTP/1.1
                                                      ^
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm fairly new to writing web services. I'm working on a SOAP service using
I have a WCF web service hosted in IIS7 which is reporting its endpoint
I am working on a REST client in android.My web service is based on
I want to call a web service of which URL is available to me.
I am executing a method of a SOAP web service which receives 3 string
HI All, I have a .NET application which connects to a Web Service. Application
I am consuming web service using the method SOAP.I have to create an edit
I've been working on a project which uses SPNEGO to have Single Sign On
I'm working on bindings to a web service, where some of the calls take
I have a web application which uses membership and profiles. I successfully used the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.