How to provide a return URL?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 3 123 LastLast
Results 1 to 15 of 34

Thread: How to provide a return URL?

  1. #1

    Question How to provide a return URL?

    Iam coding an app in C# to connect to a server, authenticate and then go ahead.

    When I send in a authentication request, its response is via a URL. It needs a return URL by which it returns crucial data called ekey.

    Can anyone please advise on how to provide a return URL and how to read back the data once it sends them back? I use WebClient, HttpRequest right now to post data.

  2. #2
    Join Date
    Feb 2011
    Location
    United States
    Posts
    1,006

    Re: How to provide a return URL?

    Sorry, I did not fully parse your question. Can you describe the exact authentication scheme? Who sends what where? when?
    Best Regards,

    BioPhysEngr
    http://blog.biophysengr.net
    --
    All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

  3. #3

    Re: How to provide a return URL?

    Its not authentication - I just need a URL to be passed out so it'll be passed back.

  4. #4
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,483

    Re: How to provide a return URL?

    Quote Originally Posted by CM2013 View Post
    Its not authentication - I just need a URL to be passed out so it'll be passed back.
    How does the web service you are calling do it? Are you the one who is writing that web service?

  5. #5

    Re: How to provide a return URL?

    Basically, we are querying a server, and the tech support guys there says when we query the page (page1), it

    "returns an answer to a URL provided by us"

    We provided the url say www.test1.com/testpage.aspx

    The tech support guy says he updated our account so it returns the answer to the above URL.

    Now, our "system must capture the returned data" which is returned to the above URL, as I understand.

    How do we capture this data now? ANy help is greatly appreciated.

  6. #6
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,483

    Re: How to provide a return URL?

    http://stackoverflow.com/questions/2...n-the-response.

    See the example of the client code in the link above.

  7. #7

    Re: How to provide a return URL?

    I have the code myself - this is what the tech support guy wrote to me:

    "You would need to host a URL yourself, then capture the response from there. You need to advise us of the URL, in order for us to return the data to."

    We did send him the URL and hes updated our account so it returns data to our url. How do they return data to another url? How do we capture it??

    I sent a HTTP POST method to their server - how do I get the response and read it from our URL? He says its returned to our URL. How is it done was my question...if I wasn't clear earlier.

  8. #8
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,483

    Re: How to provide a return URL?

    Who is hosting the web page that returns the data? Whoever hosts that page, needs to modify the page to return appropriate data. Whoever calls the page needs to extract the data using HttpResponse.

    The link I gave you shows what you need to do in the server side (inside the page) and on the client side.

    The tech guy can't call your page and force it to return data (unless the page is modified to return the data).

    You know, what you are trying to do is probably better done by a web service rather than in a web page.

  9. #9

    Re: How to provide a return URL?

    We are hosting the page. This is really annoying as the tech guy has no idea of it. I want an ekey from their server once we establish the session (Session ID). Thats all - he cant understand what it is.

    I have a C# app written that will run as a standalone app, so we are not developing websites here. But we are coding to interact with Servebase and the tech guy there wanted an Authans URL to return the ekey. Simple but the nuts there have complicated it unnecessarily.

    "Could you please let me know your AuthAns URL as soon as its available so that I can update the account. As default these are set to our HostedAnswer.asp page."

    The URl we gave is blank. Now, I have to manage 3 different things - my C# app to servebase server and the testpage.aspx he says will post the data to. He leaves by 3 PM wasting our precious time and not clarifying.

    Your answers are appreciated highly.
    Last edited by CM2013; May 2nd, 2013 at 03:02 PM. Reason: deleted 'diiot'

  10. #10

    Re: How to provide a return URL?

    Yes, you are right. A webservice is easier and less clumsy than a blank .aspx page. Now, for a simple ekey to be returned I need to connect 3 different devices.

  11. #11

    Re: How to provide a return URL?

    As I understand, I write a webservice in the URL we are hosting - as an .asmx page. ThenI query the page from my client windows form app, when the asmx page will query their server and then return back to me as a string. Am I in the right direction?

  12. #12
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,483

    Re: How to provide a return URL?

    If you change to a webservice (from the aspx page you have now), you'll need to read up on how to write an asmx web service.

    I would first write the web service and get it to return some test data and then call the web service from client code.

    Once you do that, then modify the web service code to call the tech service and return the real data.

  13. #13

    Re: How to provide a return URL?

    Yes, Iam reading up on how to do it - it seems to be a fairly straightforward process.

    http://www.west-wind.com/presentatio...ebServices.asp

    I dont think even that'll work here. Either way, its a function - whether its encapsulated in a webservice or a windows app.

    He says:

    "You need to provide us with a URL you can access, in order to receive the results and for us to hand control of the browser back to. "

    I still cant see how this will work from a webservice as well. Iam writing a C# windpws app. I receive a session ID using a HTTP Post method. Just check this doc I have uploaded:

    http://www.sendspace.com/file/81gub1


    It allows you to query and get a token. I have just finided Sec 4.1, 4.2. Its 4.3 Iam stuck with - the code is in it. Its the Auhtorization Request example. Pls advise.
    Last edited by CM2013; May 2nd, 2013 at 03:27 PM.

  14. #14

    Re: How to provide a return URL?

    In the tech specs I have shown above:

    its sec 4.4 Iam stuck with:

    It says:

    4.4 Authorisation Request Response
    PC-EFT Payment Page ESM returns an answer to a URL provided by the merchant. The merchant’s system must capture the returned data.

  15. #15
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,483

    Re: How to provide a return URL?

    Quote Originally Posted by CM2013 View Post
    In the tech specs I have shown above:

    its sec 4.4 Iam stuck with:

    It says:

    4.4 Authorisation Request Response
    PC-EFT Payment Page ESM returns an answer to a URL provided by the merchant. The merchant’s system must capture the returned data.
    Make a call to his system and retrieve the data. Use the link I provided as a guide to make a httprequest and use the httpresponse to retrieve the data.

    Ask the tech guy if they have any C# sample code for call their service.

Page 1 of 3 123 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center