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 551121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:21:36+00:00 2026-05-13T11:21:36+00:00

I am working on form, which send input to webservice via post and display

  • 0

I am working on form, which send input to webservice via post and display result. It must be simple, and it works fine on localhost. But when I try to use it agains live I have error 500.

Here is my code:

 WebRequest request = WebRequest.Create("http://localhost:3192/WebServices/Export.asmx/" + uxAction.SelectedValue);
                UTF8Encoding encoding = new UTF8Encoding();
                byte[] data = encoding.GetBytes(uxRequest.Text);
                request.Method = "POST";
                request.ContentType = "text/xml; charset=utf-8";
                request.ContentLength = data.Length;

                Stream requestStream = request.GetRequestStream();
                requestStream.Write(data, 0, data.Length);
                requestStream.Flush();
                requestStream.Close();

                WebResponse response = request.GetResponse();
                Stream newStream = response.GetResponseStream();
                byte[] responseArray = new byte[response.ContentLength];
                newStream.Read(responseArray, 0, (int)response.ContentLength);
                newStream.Close();

                uxResponse.Text = encoding.GetString(responseArray);

And here is information about error

 Exception information: 
        Exception type: InvalidOperationException 
        Exception message: Request format is unrecognized for URL unexpectedly ending in '/GetProjectTypes'. 

    Request information: 
        Request URL: http://sitename.com/WebServices/Export.asmx/GetProjectTypes 
        Request path: /WebServices/Export.asmx/GetProjectTypes 
        User host address: 93.73.249.242 
        User:  
        Is authenticated: False 
        Authentication Type:  
        Thread account name: NT AUTHORITY\NETWORK SERVICE 


Thread information: 
    Thread ID: 1 
    Thread account name: NT AUTHORITY\NETWORK SERVICE 
    Is impersonating: False 
    Stack trace:    at System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response)
   at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath)
   at System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated)
   at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
   at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

I also have http handler to access web services from javascript and this works fine:

<add verb="GET,HEAD,POST*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

Here is my request data. Exception is same with or without it. Webservice do not have any parameters

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetProjectTypes xmlns="http://sitename.com/WebServices/Export.asmx" />
  </soap:Body>
</soap:Envelope>
  • 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-13T11:21:36+00:00Added an answer on May 13, 2026 at 11:21 am

    When we test webservice in browser, it adds methodname to url, but when we do post this is not needed.
    I removed ‘/” + uxAction.SelectedValue’ and everything is working fine now

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to get a simple search form working in my RoR site. I've
I'm working on a form that will display links to open different types of
I'm currently working on a reasonably complicated data input form, based around ASP.NET Web
I am working with jQuery Form and ASP.NET MVC. Preview 5 of ASP.NET MVC
I am working on a form widget for users to enter a time of
I am working on a windows form application. How do i use the find
Form validation for check boxes only seems to be working in IE....? Anyone have
I'm working on an attendance entry form for a band. My idea is to
I'm working on a star schema for analysis of posted form data. The site
I'm working on a Rails app that sends data through a form. I want

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.