-
May 2nd, 2013, 02:45 PM
#16
Re: How to provide a return URL?
Originally Posted by CM2013
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
Please just zip this up and post it in a reply as an attachment.
I get malicious web site errors trying to download that file from the site.
-
May 2nd, 2013, 02:48 PM
#17
Re: How to provide a return URL?
The HttpResponse does not fill a crucial field - ekey. It came back empty. They will only send it to our URL which is hosted at lintott.net. I need to find the link between what to call their server, how it passes to my URL and then I can read it. The .aspx hosted in lintott.net does nothing - its empty. These links are not done, until then it wont work. Nobody has done these calls before - from windows app -> servebase server to another URL in another server.
Will do this and post it - as I need it today.
-
May 2nd, 2013, 02:57 PM
#18
Re: How to provide a return URL?
If I do:
Code:
string post = "erst=authreq&elid=bebcppesmtest&esid=" + m_sSessionID + "";
HttpWebRequest WebReq = (HttpWebRequest)WebRequest.Create("https://wxuat.servebase.net/Hosted/HostedAnswer.asp?" + post);
WebReq.Method = "POST";
HttpWebResponse response = (HttpWebResponse)WebReq.GetResponse();
//read the response to stream and output it
Stream ds = response.GetResponseStream();
StreamReader sr = new StreamReader(ds);
MessageBox.Show(sr.ReadToEnd());
Nothing comes back - it just shows the same string back - with the same fields filled in as I gave, and ekey empty. How does our URL fit in here? And where do I get it?
-
May 2nd, 2013, 03:11 PM
#19
Re: How to provide a return URL?
Its 1 MB - doesnt let me post. I could email if you are ok with it.ct0306@outlook.com
-
May 2nd, 2013, 03:22 PM
#20
Re: How to provide a return URL?
Originally Posted by CM2013
The HttpResponse does not fill a crucial field - ekey. It came back empty. They will only send it to our URL which is hosted at lintott.net. I need to find the link between what to call their server, how it passes to my URL and then I can read it. The .aspx hosted in lintott.net does nothing - its empty. These links are not done, until then it wont work. Nobody has done these calls before - from windows app -> servebase server to another URL in another server.
Will do this and post it - as I need it today.
They are probably doing a whitelist onyour server. Give them the IP address of you dev box ans ask them to add it to the white list.
-
May 2nd, 2013, 03:26 PM
#21
Re: How to provide a return URL?
Ok, will do. Will update this thread so its useful for other newbies. Get back to you on this.
-
May 2nd, 2013, 03:28 PM
#22
Re: How to provide a return URL?
My Supervisor thinks there is no whitelist . This is clearly a case of missing link. Will figure it out myself and post it here.
-
May 2nd, 2013, 03:30 PM
#23
Re: How to provide a return URL?
Is their server posts back to our url - linott.net/bebc then how do I get it? Web pages are stateless - it makes no sense the tech guy didnt give the link here. There is no way one can read from a webpage on some server. Data is not saved anywhere.
-
May 7th, 2013, 06:47 PM
#24
Re: How to provide a return URL?
I think you are misinterpreting how this works. In my opinion, their website doesn't post back to your site, it merely returns data to you.
In other words, you make an httprequest using your url as the key and post it to their web site, they pass back the eKey to you which you retrieve using the httpresponse class.
You should be able to test this by coding up a small console application and make the appropriate httprequest call (using the link I gave you) and retrieve the eKey with the httpresponse.
-
May 7th, 2013, 07:04 PM
#25
Re: How to provide a return URL?
Found the solution - used form fields to get the data posted by the other site and wrote the values needed to a text file. Will either use while loop to check for the file's existence to read the values back or write a webservice.
The only problem I ran into is that, first time I create the file on the webserver and write it, its fine. The next write is too slow or doesnt write at all. An expert suggested I write a new file every request - but I can't keep track them of all.
-
May 7th, 2013, 07:21 PM
#26
Re: How to provide a return URL?
Found out the solution for the appending file problem as well: create a new file everytime and check its timestamp to get the latest file.
-
May 7th, 2013, 07:52 PM
#27
Re: How to provide a return URL?
Why do you need to write the data to a file?
-
May 7th, 2013, 08:00 PM
#28
Re: How to provide a return URL?
coz I need to read it from the text file from my C# app - I basically want to access a string thats returned as a form field.
-
May 7th, 2013, 08:22 PM
#29
Re: How to provide a return URL?
Do you know how to read a list of files from a website folder that I have access to?? Or the latest file?
-
May 7th, 2013, 08:31 PM
#30
Re: How to provide a return URL?
This approach is a bad idea in my opinion. You are going to have issues with the locking and access of the files.
Post the content of these 'files' (with mocked up data) and I'll show you how to create a web service around them (expect I won't use files).
If I recall correctly, you send in a url as the 'key' and then get an eKey (i.e. the contents of the file back). Is that correct. If so, send me a typical url that you use (or a fake one).
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|