Making web service authenticated calls in custom controller

A current Radzen project was scoped with pushing some data into SAP middleware via older authenticated web services. The process ended up being very simple. I opened my Radzen ‘Server’ project in VS 2017 and added a ‘Connected Services’ reference using the WCF option. I had a wsdl defining the service. During this process I received a warning about WCF ignoring a ‘Policy’ definition in the wsdl. The process created a new folder in my project ‘Connected Services’ containing Reference.cs file. The WCF creation does not generate any authentication client code in the Reference.cs so it needs to be added.

I used this article for assistance in adding the authentication information:

My call to the web service call occurs in a custom controller as follows:
var ackText = soapClient.SI_OB_SalesOrder_WebServiceAsync(soapParms).Result;

Also note that once I opened my ‘Server’ project in VS 2017 that it created a ‘Properties’ folder with a LaunchSettings.json file that prevented my project from launching correctly. I deleted the ‘Properties’ folder, the ‘.vs’ folder and the 'project.csprog.user file.

I am amazed at the outstanding support and almost daily roll-outs of new features by the Radzen team!


Thank you very much for sharing your experience, David! Such posts are extremely valuable for Radzen community!