.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Soap request fails

Posted By:      Posted Date: October 03, 2010    Points: 0   Category :WCF

I get the following error when I send a soap request to my service. Any clues what needs to be fixed?

The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access.
HTTP Error 405 - The HTTP verb used to access this page is not allowed.<br>Internet Information Services (IIS)



View Complete Post

More Related Resource Links

sending xml inside a soap request with HttpWebRequest

Im trying to send some xml inside a soap request to a webservice using the HttpWebRequest class.  I know this isnt the best way, but my hands are tied by company policy so i have to do it this way.  My webmethod has an input parameter  "SourceXML"  so my soap request has this node<SourceXML></SourceXML>I need to insert the xml in this node but whenver I insert it and try to send it to my web method I get an error "400 bad request"Is this even possible ?  I need to insert the xml as a string literal and read it in the web methodStringBuilder sb = new StringBuilder(_soapEnv); -- soap enevlope template containing the SourceXML node sb.Insert(sb.ToString().IndexOf("</SourceXML>"), the xml I want to insert in the node); sendmessage(url, webmethod, sb.ToString()) -- send the message to the webserviceIf I put plain text in the string builderegsb.Insert(sb.ToString().IndexOf("</SourceXML>"), "this is a test");everything works ok, but as soon as i put some xml in it fails. Am I going about this in the right way ?basically my webmethod will have 2 input parameters, some xml and an object, but I just cant get it to work. Can anyone help ?

Work with SOAP requests via Raw request

I will handle SOAP requests via IHttpRequest. What best way to work with raw SOAP requests (mean how desearialize etc)?

Need help in reading Soap request and response on invoking WCF client assembly

Hi All,   I'm new to WCF and i'm using .Net 3.5. I have created a library from the proxy class generated through svcutil. I'm able to succesfully invoke service methods. I was wondering how to capture the request and response soap xmls so that i could render it on browser. If you have any code piece for this kind of problem please share it with me. Regards, Rahul

Seeing the SOAP request sent from a Web Service Client/Consumer

Hello, I am building a web service consumer in C# in VS2010.  Using the provided WSDL, I need to build appropriate headers and use certificates, SSL (user name & pass), & WS security.  I am getting an error from the webservice side, specifically processing the <wsse:Security> header. Is it possible for me to see the exact request I am sending to the Webservice? I'd like to see the values of the pieces of the header that get put in and such. Is it possible to have human readable serialization of what's being passed in right before the error? Thank You

Any way to re-route soap request to different method using soap extensions?

Not sure if this is possible, but is there any way (using soap extensions) to intercept a soap message and re-route it to a different method on the web service host?  I am able to intercept and replace the method name in the xml, but it still goes to the original method.

ASMX to WCF Soap request

I have a .asmx service that I need to convert to WCF. The service receives xml requests via the request input stream,  parses xml and sends clients back a response also in xml. The clients are sending SOAP requests. I have to make this change transparent to the clients. I'm somewhat new to WCF so i'm wondering what would be the best solution. REST looks good but I need to support SOAP. Is it possible to use basicHTTPBinding for my needs?

RSS feed - Web request fails in 4.0 whereas it works in 3.5

I am trying to get RSS feed from Microsoft blogs thro' web proxy. The Web request fails in .net 4.0 whereas all work fine in .net 3.5... Anything extra to be done in 4.0 while sending the credentials to proxy? Please help me. Code: namespace     testrssfeeder {     /// <summary>     /// Interaction logic for MainWindow.xaml     /// </summary>     public partial class MainWindow : Window {     public MainWindow() { InitializeComponent();     AuthenticationManager.CredentialPolicy = new Proxycredentials (); }     private void Window_Loaded(object sender, RoutedEventArgs e) {     XmlTextReader rssReader;     XmlDocument rssDoc;     Uri httpSite = new Uri("http://www.microsoft.com/communities/rss.aspx?&Title=Blogcasts&CMTYSvcSource=MSCOMBlogPosts&CMTYRawShape=list&Params=%7eCMTYDataSvcParams%5e%7eArg+Name%3d'DateFormat'+Value%3d'MMM+d%2c+yyyy'%2f%5e%7eArg+Name%3d'CategoryGuid'+Value%3d'b286f1d2-c540-405f-abb8-c386d4815f32'%2f%5e%7e%2fCMTYDataSvcParams%5e&NumberOfItems=50");     // Create the request object.     WebRequest wreq = WebRequest.Create(httpSite); wreq.Credentials =   CredentialCa

Sign outgoing client request SOAP body with WSE 3.0



We currently have the code in WCF to sign the outgoing client requests' SOAP Body, however we need the same code for use with WSE 3.0.  I can't find any examples of this.  

Is it possible?  If so, does anyone have an example?

Thank you,

view soap request message


I am consuming a .net 2.0 webservice from a class library and calling this class from a web page form . When a user inputs and saves the data in the form it will call the class and inturn send the user inputted data over webservice. I want to view the Soap messages like request and response going from my dll to the webservice. I tried fiddler but with no luck. So I created a class mentioned here: http://msdn.microsoft.com/en-us/library/system.web.services.protocols.soapextension(v=VS.90).aspx

and added the in the dll.config file like this and it was also of no help. By the way the end webservice is https not http.




        <add type="SoapTrace.TraceExtension" priority="2" group="High" />





Any pointers are greatly appreciated, thanks in advance

Simple ASP.NET SOAP request to return string



I have a requirement to build a simple ASP.NET web page which sends some parameters to a web service, and then displays the string which was returned.

I'm a complete .NET newby and the only examples I can find seem really really complex.  I just need something mega simple, but which an handle parameters being sent to the web service.  Can anyone point me in the direction of a simple bit of C# which will do this with no frills or fuss?

Any help much appreciated, thanks!

soap:ServerServer was unable to process request.


I had a collaboration site that for several reasons I decided to delete and then create a new one with the same name. In the original version I had created a duplicate DefaultLayout file and renamed the original to DefaultLayouxxxt.aspx.

Now with the completely new version of the site when I try to edit the Default.aspx file using SharePointdesigner I get this error:

soap:ServerServer was unable to process request. ---> The file https://mytestsite/_catalogs/masterpage/DefaultLayouxxxt.aspx does not exist.

How does it know that in a completely non-existent site there once was file that it now wants. But more importantly how do you change the setting so that it wouldn't seek it?




Fetch raw XML for SOAP request and response inside WCF client


I've got a basis WinForms test harness that's implementing a WCF client (.NET 3.5) which calls a SOAP web service.  I need to be able to write the HTTP request and response and output the two XML documents so I can load them back into WebBrowser controls on the form.

It looks like the way to accomplish this is to implement a custom IClientMessageInspector and an IEndpointBehavior, apply the behavior to the binding and then do the work of capturing the XML inside AfterReceiveReply and BeforeSendRequest (inside IClientMessageInspector implementation).

So my questions are:

1. This seems like a rather exhaustive process, is there a more straightforward approach to doing this? 

2.  If I am on the right path, does anyone have links to related articles/code samples related to this?

3. In what I have coded so far, I am held up trying to get the behaviorExtension to register properly (inside app.config), it looks as if I must register my classes that implement behavior Extenshions in the GAC in order to make use of them, is this true? 

Thanks in advance for taking time away to help a fellow developer!

How to properly create SOAP Request that has x509 signed message body and unsigned usernameToken




I'm trying to  create a .NET client that will consume AXIS WS.

Request should be signed (using x509 Signature) and after this usernametoken profile 1.0 should be attached.

Using SOAP-UI I can create Outgoing Security Policy with few steps described below:

1) Define keystore

2) Add WSS Signature entry and mark key identifier type as X509 Certificate or Binary Security Token

3) Add WSS Username entry

The order is important.

I cannot recreate SOAP request that would generate valid response.

I got "The signature or decryption was invalid" most of the time.

Here is valid SOAP Request from SOAP-UI:


 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:user="http://users.api.swd.zbp.pl"

soap:ServerServer was unable to process request. ---> A Web Part with this ID has already been added


We have a custom WebPart that we have added to a WebPart Zone in the page layout.  We can't get several of the pages to open in SPD due to this error and the ones we can get to open will duplicate the WebPart tag.

We have tried navigating to the layout through a browser by adding the ?contents=1 to the url and we get the page cannot be found or loaded error.

We also get the duplicate webpart error when we try to create a page based on that layout.We have tried everything including, downloading a copy of the layout, removing the webpart, and reuploading it, our next move is to programmatically removing the webpart from the layout.

I just want to know if there is an easier less aggressive way to remedy this problem, and if anyone else has had it.  There have been no changes to the site or the layouts for over 2 weeks and this just started happening out of the blue.


below is the tag from the page layout that we can get open.

<WebPartPages:WebPartZone id="Zone20" runat="server" title="Zone 20" frametype="None"><ZoneTemplate>
<WebParts:PageMetaTags runat="server" ID="PageMetaTags1" Title="PageMetaTags" WebPart="true" __designer:IsClosed="false" partorder="1" __WebPartId="{4B5DCA63-0BBA-4F13-A13C-17A

How do I add the client certificate to a soap request?


hello all,

I want to add the client certificate to the web request, but i'm unable to do it because it's not visible. here are the examples:

I have a web test project. if i add an asmx webservice to the web protect, i am able to do this


void buttonclick()
   WebService1 ws = new WebService1();
   ws.URL = ... someURL;
   ws.ClientCertificates.Add(new certificate in here); 


here's the problem,
if i add a webserivce project to the current solution (web test solution). And I reference the webservice. and when i do this:


void buttonclick()
  InstantName.Service1 ws = new InstantName.Service1();
  ws.URL ...??? Don't see it
  ws.ClientCertificates.Add( ... not here ... ) 


both web services class inherits the System.Web.Services.Protocols.SoapHttpClientProtocol

i don't get it ... anyone has experience with this, please give some input .. thank you.

If the process duration greater than 5 minutes on HP server with MS 2008 server, remote SOAP request


We have a simple SOAP web service running on ASP.NET Web Services over IIS6, the service waits for 5 minutes and the returns "Hellow World". 

If the wait duration more than 5 minutes then IIS never sends the response back to the remote client, but there is no problem; when the service called on local machine.

We turned off the firewall and another limitation, but problem still continue.

Need to get the SOAP request being sent to the server


Guys I have a web service consumer that is calling a web service (web servuice has WSE securtiy) and the end point are masked.

When I am using the security header in my consumer :

<endpoint address="https://abacfddasdsadasd/usp/" binding="basicHttpBinding" bindingConfiguration="CMSWSoap" contract="CMSSoap" name="CMSWSoap">
          <wsse:Security mustUnderstand="true" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
            <wsse:UsernameToken wsu:Id="UsernameToken-1" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
              <wsse:Password Type="

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend