How can I implement WCF SOAP functions from a .wsdl file through a firewall (NetIQ Access Manager)?

I am currently working on a project where I need to allow users to retrieve data from a Service Reference. On our development server, this works fine, as I just prompt the user for credentials, then call my method, using the credentials as parameters for the call.

The issue I am having is implementing these on our production server. The production version requires authentication through NetIQ Access Manager, where it has you input your credentials, then sends via email a one time password that the user inputs.

I don't have a ton of experience with WCF or SOAP. I currently have a "working" method of doing this.

Instead of adding the .wsdl file as a Service Reference, I added it as a Web Reference (which I've been informed is wrong). The Web Reference seems to give me more options, specifically attaching a CookieContainer object to the service call.

I prompt the user for their username and password, then using HttpWebRequest, I recreated the authentication request (using Fiddler), while collecting the cookies from the response. After this, I prompt the user for the one time password that has been sent to their email, and recreated that authentication request as well.

After that is complete, I can attach the CookieContainer from this handshake to my service call, and retrieve the data.

The person managing NetIQ in IT doesn't know much about it, and our lack of knowledge combined creates an issue. I don't really know what settings I need them to change to get this working without my "hack".

Does anyone have experience with implementing a client side SOAP service through NetIQ Access Manager, or something similar?

What is the "best" way to implement something like this? I know that having my code pretend to be a person is not the correct method, but as of now, it's a means to an end.

by TheirBadAtGrammar via /r/csharp

Leave a Reply