Solved

Outlook 2002/2003 - ASP Response.redirect fails when submitting form from email

Posted on 2004-10-02
15
282 Views
Last Modified: 2012-08-13
Ok, really strange problem.  I have a page called Test.asp with the following code:

    <%@ Language="VBScript" %>
    <%response.redirect "http://www.yahoo.com"%>

and an HTML email with a simple form in the body with source:

    <form action="http://mysite.com/test.asp" method="Post">
        <input type="submit">
    </form>

I send myself the email and check it with Outlook 2002 or Outlook 2003 and when I click the Submit Query button in the body of the email, nothing happens at all.  No error msg, no IE window opening, nothing.  However, this same exact thing works perfectly fine with Outlook 2000.  It appears that if the ASP script is launched via a submit form from OL2002/2003, it just freezes or dies when it comes across response.redirect.  If you just open IE and manually navigate to http://www.mysite.com/test.asp then it redirects you to yahoo.com like it should.  I know that Outlook 2002/2003 is getting to the Test.asp page when I click the submit button because if I comment out the response.redirect line it opens up a blank window.  I really need this code to work with OL2002/2003 so if someone can please help me figure out what is going on I would greatly appreciate it.  If you want to try to duplicate this problem and don't have an easy way to send yourself an HTML email, let me know and I can send you one with the Action pointing to your copy of Test.asp.
0
Comment
Question by:Mutare99
  • 5
  • 5
  • 3
  • +1
15 Comments
 
LVL 6

Expert Comment

by:masirof
ID: 12207432
Looks like Outlook security. Version 2003 comes with some high security. It may prevent it as preventing download of images from internet when opening messeges. You may have to check Outlook security settings.
0
 
LVL 1

Author Comment

by:Mutare99
ID: 12207552
I am mainly worried about Outlook 2002 but this behaviour also occurs in OL2003.  I cannot find any security settings in 2002 that allow this to work.  If you find one that you think will help let me know.

Thanks
0
 
LVL 6

Expert Comment

by:masirof
ID: 12207710
Frankly I do not use Outlook 2002, but I think its similar with 2003. Please try this.

Tools > Security > Security Zones
Change zone to Internet if its Restricted sites.

As I said, I am not really sure. But it looks like its working in OL2003.
0
 
LVL 12

Expert Comment

by:minichicken
ID: 12207717
Do you mean when you click on the submit button in the email, the values in the HTML email doesn't appear in the web browser. If that is the case you will need a work around for it, as I used to have this problem.

You will have to refresh the browser the first time when the page loads from the email. For some reason, the submit values don't get recognized the first time around by the browser so you have to refresh it in order for the browser to get the values.

You will need to use GET and not POST as the form method in your HTML email, if you use POST a annoying popup window will come up when you refresh the page. And also it's a good idea to store your submitted values into sessions to make things easier.

Include a code like this at the top of your page that opens when the submit button is clicked.

**************************************
if (request.querystring("dummy_value") <> "") then

      session("value1") = request.querystring("value1")
      session("value2") = request.querystring("value2")
      session("value3") = request.querystring("value3")
      
      response.redirect("this_same_page.asp") 'refresh this page by redirecting to itself

end if
******************************************
Hope this helps

j311y :)
0
 
LVL 1

Author Comment

by:Mutare99
ID: 12207766
Masirof, I tried that setting and even opened up internet security to allow just about everything and that didn't seem to help.
0
 
LVL 1

Author Comment

by:Mutare99
ID: 12207775
MiniChicken,  Part of the problem I mentioned is that anytime it encounters  a response.redirect in the ASP page it just freezes or dies when you open it via a submit form from Outlook 2002
0
 
LVL 6

Expert Comment

by:masirof
ID: 12207906
please send me mail to masirov[a]mail.ru
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 12

Expert Comment

by:minichicken
ID: 12207928
Hmm.... can you please send me the email to jerry@silvermail.co.za thanks
0
 
LVL 6

Expert Comment

by:masirof
ID: 12208068
Buddy, its working on my OL2003, after changing security settings as I described you before.
Something to do with OL2002? Maybe, but do not think so.

The fact that when it is hunging after you submit via OL, seems like nothing to do with OL. Please double check for data you are sending via outlook. Maybe something in the data is preventing it. To think that it differs to access a site via a form from Outlook or via typing it directly from add bar, shuld not change the behaviour of brwoser.

P.S. Really not sure if OL is appending some vars. Please chek it. You may via request.form collection.
0
 
LVL 1

Author Comment

by:Mutare99
ID: 12208094
Masirof, I have a script that I can post to which displays contents of request object and it doesn't show it submitting anything.  It must be a problem with Outlook 2002 then as I have tested it myself in OL2002.  I only have someone else's (possibly unreliable) word that it does the same thing in OL2003.  But, yes, if I access the page directly OR if I put the source of the email into a real HTML file and open it first, then the redirect works, otherwise nothing.  I have test it very thoroughly and it is definitely just freezing when it encounters a redirect from Outlook 2002.
0
 
LVL 1

Author Comment

by:Mutare99
ID: 12208707
Ok, I figured out a workaround.  Apparently this problem is resolved by having an initial script open from the email form then have it's Body onLoad event open the real asp page.  Very strange but this works:

Change my email form code to point to redir.asp like this:

    <form action="http://mysite.com/redir.asp" method="Post">
        <input type="submit">
    </form>

This is the code for redir.asp:

    <%@ Language="VBScript" %>
    <html>
    <body onLoad="window.location = 'test.asp?<%=request.querystring%>&<%=request.form%>'">
    </body>      
    </html>
0
 
LVL 12

Expert Comment

by:minichicken
ID: 12208730
Hmm that interesting...

Good to know you worked it out :)
0
 
LVL 6

Expert Comment

by:masirof
ID: 12215423
:)
0
 

Accepted Solution

by:
ee_ai_construct earned 0 total points
ID: 12240801
Question answered by asker or dialog valuable.
Closed, 250 points refunded.
ee_ai_construct (replacement part #xm34)
Community Support Admin
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now