Hi, I have an application that sends out an email with a link similar to the below (obviously localhost would be replaced with the actual web site): http://localhost/test/test_PlaceOrder.tst?t=FileToRetrieve&A=UserName&B=Password
The goal is to locate and send back to the user the requested file.
The logic works in logging in, locating, and sending the requested document to the user, but there's always a web page that's brought up showing the above sample URL and the web page displays even before I hit the creation of the Process class.
I'd like to have a "silent" running request that doesn't bring up a web page until the process has completed and then display to the user a confirmation that the request was successful or not successful.
Is that possible to do?
Thanks
I'm not quite sure what you mean by before the link hits the process class. If you access a Web Connection request, it will not change the URL until the result comes back. The browser may choose at its discretion to change the address bar before completion, but the content and actual URL don't apply until the request is complete.
From what you describe all you really need to go to the email page, then redirect to another page after you've sent instead of displaying content.
FUNCTION EmailProcessMethod
loSmtp.SendMail(...)
Response.Redirect("~/SomeOtherPage.myapp")
ENDFUNC
FUNCTION SomeOtherPage
*** Some other page of the application
ENDFUNC
The Redirect Url can be a local site virtual URL as above, or a relative or fully qualified Web URL:
Response.Redirect("https://webConnection.west-wind.com/")
Unless I'm misunderstanding this is a very common HTTP scenario easily handled with Redirect()
.
+++ Rick ---
Rick,
Thanks for the quick reply, here's a video that may demonstrate the issue better.
The sequence is our firm sends an email to a client with an attached invoice.
The client then clicks on a link embedded in the email which is designed to send the document to them without having to log in to the system.
As soon as the link hits the IIS Server/Westwind app, a web page is brought up with the full URL.
I'd prefer that the Westwind app I've developed just accepts the request and responds by just sending an email with the related document attached (which it currently does) and then displays a confirmation page. Not the initial page with the originating URL.
Hopefully, I haven't made it more confusing.
Here's the video Demonstration Video
You can't do that. The reason is when you click a link the operating system launches the browser and it then navigates to the URL you provide.
If you want to do this 'invisibly' you can use wwHttp
to send the HTTP request to the URL from within the application.
+++ Rick ---