I wrote some code in VB to send XML to a HTTP server. I am including that code below. I confess that I do not know C# but I have a customer who is asking if we would know how to do what I did in VB in C#. Below is the VB code can someone please provide the C# equivalent if it's not too involved. Thank you very much:
Code:Dim oWinhttp As New WinHttpRequest Dim sResponse 'sXML is a string containing your XML to submit With oWinhttp Call .Open("POST", " https://emkt.pjm.com/emkt/xml/submit ") Call .SetCredentials("your_user_name", "your_password", 0) Call .SetRequestHeader("POST", "/emkt/xml/submit HTTP/1.1") Call .SetRequestHeader("HOST", "emkt.pjm.com") Call .SetRequestHeader("Content-Type", "text/xml") Call .SetRequestHeader("Content-Length", Len(sXML)) Call .SetRequestHeader("SOAPAction", "/emkt/xml/submit") Call .Send(sXML) 'Wait for the response. Call .WaitForResponse 'Display the response text. sResponse = .ResponseText End With



LinkBack URL
About LinkBacks


