HomeHomeCoreCoreGeneralGeneralAction Input - The remote server returned an error: (500) Internal Server ErrorAction Input - The remote server returned an error: (500) Internal Server Error
New Post
11/4/2012 6:02 PM

Hi there,

I'm using the Input Action to call a web service and receiving the following error.  

 System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
   at System.Net.WebClient.UploadDataInternal(Uri address, String method, Byte[] data, WebRequest& request)
   at System.Net.WebClient.UploadData(Uri address, String method, Byte[] data)
   at System.Net.WebClient.UploadData(String address, String method, Byte[] data)
   at r2i.OWS.Actions.InputAction.Handle_Action(RuntimeBase& Caller, DataSet& sharedds, MessageActionItem& act, ActionExecutionResult& previous, Debugger& Debugger)


Here are my parameters for the call.  When the username or password are correct, the service returns a valid SOAP response BUT if the username or password are incorrect then the servive fails with the error above. 

URL: https://www...../services/Authenticate

Authentication Type: No Authentication

Content Type: text/xml; charset=utf-8

Headers (Request): Empty

Query Parameters: Empty

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:ser="" xmlns:soapenv="">


Method: Soap

Soap Action: ""

Soap Result Tab: Empty

Response Format: Text

Variable Type: <Action>

Name: Result


I have tested the call through a third party utility called SOAPUI and it returns a valid SAOP message whether the user/password details are correct or not.  Can anyone shed some light as to why this error might mean?. 




New Post
11/4/2012 8:30 PM

probably clutching at straws here but according to this microsoft link it says that ...

"A WebClient instance does not send optional HTTP headers by default. If your request requires an optional header, you must add the header to the Headers collection. For example, to retain queries in the response, you must add a user-agent header. Also, servers may return 500 (Internal Server Error) if the user agent header is missing"

So my question is, what is the format/structure is the "Headers" section of the Input action.  I've tried the following with the same results;


New Post
11/5/2012 1:21 AM

On further investigation, i went back to the Soap Utility soapUI to try again and discovered that not only does that utility get the correct data returned but it also detects a Server error 500.  See screenshot below.  The left part of the screenshot shows the Soap request, the right part shows the Soap response that I am expecting and underneath that you can see that the "#Status#" is HTTP/1.1 500 Internal server error.  The problem is that I want the Soap Response which I am not getting access to through OWS.  All that is being returned to me is the error 500.  Is there any solution to this?

New Post
11/6/2012 4:59 AM

Hi Kevin, I was looking at the code for the Action:Input and i suspect that I'm out of luck.  Would you be able to confirm my analysis below.  As it stands, I'm making a SOAP call and the call (one of those circled blue) is being trapped by the Try/Catch exception block circled red because the server is setting HTTP status 500 on the other end.  Assuming this is correct then the only data that is returned to my OWS code will be the .NET exception message.  

If I'm on the right track then would this work... I want to create a custom Action:Input and within the catch block, I'll test for a HTTP 500 and basically ignore it.  Something like this.. 


  If HTTP 500...

responseString = Text.UTF8Encoding.UTF8.GetString(responseData)


responseString = ex.ToString

  End If

Would that work?  Is this a valid thing to do?

PS.  Just a side note here but the way I see it, the makers of the web service should not be setting a HTTP 500 because its technically not a HTTP error.  Its a handled exception that produces a structured SOAP response (in this case a user/password error) and therefore the HTTP status should return as 200 OK.  But I'm not the owner of the web service so its not really my call to make.  I have to deal with what I've got.  That said, I am talking to them to try and resolve this.  Does this make sense or am I way off here?



New Post
11/8/2012 5:21 AM

So is there any way I can get access to the SOAP response when there is a HTTP 500 error?  The SoapUI utility manages to show the response but I dont know if it will be available after the webClientCall is caught in the exception block.  I just want to make sure that I'm not wasting my time if I try to extend OWS and create a new Action:Input to handle this situation.

HomeHomeCoreCoreGeneralGeneralAction Input - The remote server returned an error: (500) Internal Server ErrorAction Input - The remote server returned an error: (500) Internal Server Error


New York, NY • Baltimore, MD • Vienna, VA • St. Louis, MO • Seattle, WA •

Bookmark & Share Bookmark and Share