c# 4.7.2 asp.net classic webservice, connecting to webserivce using proxy generated by wsdl.exe via winforms.
I have web apps successfully connecting to the webservice, but I have a tool I wrote in c#/winforms, for testing if webservices are alive and working at various levels (dev/prod/etc)
What is the easiest way to call an .asmx webservice via https?
This is what it looks like now, but I’m okay with abandoning the proxy if that’s easier
AdStudent.ADStudent ws = new AdStudent.ADStudent();
ws.Url = "https://jcdcadstudent.bob.org/adstudent.asmx";
string str = ws.GetGuidString("Brown.Eric");
(Error = The underlying connection was closed: An unexpected error occurred on a send)
On the web apps, just changing the url works, but not from a winform.
2
Answers
The answer above did not work for me, I wound up doign it via soap, thusly
Check this url for detail on what tripped me up on the SOAP
C# .netcore 3.1, calling asmx web service from a winform
Hope it helps somebody!
I’ve been doing something similar in WinForms, but I was sending requests to API, not MVC webapp, so I don’t know if this will help, but I’ll paste here one method of my WinForm App that was sending request to API: