|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
global.asa fires after url parameters?
When clicking on the following link from an email i.e -
http://myserver/myapplication/myprogram.asp?urlvar1=some%20stuff&urlvar2=more%20stuff
I get a server 500 error. With that same browser window open, if I click the link from the email again I get the desired page. The results are the same if the url is copied and pasted into the brower but the 'go' must be pressed twice. It appears that the server is trying to resolve the url vars before the global.asa is fired. Does anyone know of the order of processing? Any suggestions? =?Utf-8?B?V2F0ZXJCdWc=?= wrote on 16 mrt 2005 in
microsoft.public.inetserver.asp.general: > When clicking on the following link from an email i.e - This is a emailclient cum browser issue, IMHO> http://myserver/myapplication/myprogram.asp?urlvar1=some%20stuff&urlvar > 2=more%20stuff I get a server 500 error. With that same browser > window open, if I click the link from the email again I get the > desired page. The results are the same if the url is copied and > pasted into the brower but the 'go' must be pressed twice. > It appears that the server is trying to resolve the url vars before global.asa does not fire every time a page is called, only at a [re]start > the global.asa is fired. Does anyone know of the order of processing? > Any suggestions? of the server/IIS. Why do you think global.asa has anything to do with it? Try the same without any global.asa present. -- Evertjan. The Netherlands. (Replace all crosses with dots in my emailaddress) E: This is a emailclient cum browser issue, IMHO
W: I don't believe this is an emailclient issue. I can create the problem without email. If you start a new browser and paste the url with the urlvariables then the error occurs. The page requires the URL variables to locate the specific recordset from the database and the session must be started prior to that to establish connectionString, who you are, your security, and more. E: global.asa does not fire every time a page is called, only at a [re]start of the server/IIS. W: It fires every time I open a new browser and call my application. It starts a new unique session for each browser conversation with the application. This is only an issue if a session is not established. E: Why do you think global.asa has anything to do with it? Try the same without any global.asa present. W: My app won't work without global.asa present. I rely on many session vars for db connectivity and resolving security. W: I think it is global.asa since the first time I type in the url and press 'go' or enter I get the error but the second time I press 'go' or enter the page is delivered correctly. I think on the first trip to the server, the server 1) attempts to resolve the url vars first, 2) then processes the global.asa, 3) then attempts to deliver my page but my url vars are no longer available. On the 2nd trip to the server, the session was established in the 1st trip and now the url vars are resolved correctly. I am still in search of the order of processing by the server for an asp request. WaterBug wrote:
> E: This is a emailclient cum browser issue, IMHO Not a big issue but I suggest using ordinare quoting (like I do here) in > W: I don't believe this is an emailclient issue. I can create the problem the future to increase the chance of good responses. > without email. If you start a new browser and paste the url with the I dontt think this is not an email program issue> E: global.asa does not fire every time a page is called, only at a [re]start Application_OnStart fires only when your application starts, that is > of the server/IIS. > W: It fires every time I open a new browser and call my application. It > starts a new unique session for each browser conversation with the > application. This is only an issue if a session is not established. generally only the first time a page is requested after you have made changes to global.asa. > E: Why do you think global.asa has anything to do with it? Try the same Session_OnStart is caled once when a new session starts. This means, if > without any global.asa present. > W: My app won't work without global.asa present. I rely on many session > vars for db connectivity and resolving security. you browse the site, Session_onstart is only called the fist time you go to the first page. A new session might start when you start another webbrowser but I guess that is a settings thing? Anyway, > I am still in search of the order of processing by the server for an The url vars are never automatically resolved.> asp request. >It appears that the server is trying to resolve the url vars before the >global.asa is fired. Does anyone know of the order of processing? Any >suggestions? If it is a new session, session_onstart is called first, in there you might resolve the url vars with request.querystring if you want. When session_onstart is ran to the end (or imediatley if this is your second request) your asp page will be compiled and run from the top to the bottom. If you post the content of your global asa and myprogram.asp I am sure it will be much easier to spot the error. Tim Dear waterbug,
Tim wrote on 16 mrt 2005 in microsoft.public.inetserver.asp.general: >> E: Why do you think global.asa has anything to do with it? Try the Tim is right. [also on the quoting issue, but that aside]>> same without any global.asa present. >> W: My app won't work without global.asa present. I rely on many >> session vars for db connectivity and resolving security. > > Session_OnStart is caled once when a new session starts. This means, > if you browse the site, Session_onstart is only called the fist time > you go to the first page. The fact that Session_OnStart is called at the beginning of every new session does not mean that global.asa is run. Global.asa runs only at the application start. Session_OnStart sub is helt in memory. I suppose your problem is a session problem. If the session is not helt, because the browser does not allow a ram-cookie, every page is a new session with a new call to the Session_OnStart sub. ASP pages are always a session. However without relevant code we cannot envision the exact nature of your problem. btw, did you try to debug? ======================== >> I rely on many session vars for db connectivity and resolving And you initialize those session variables [we are talking session() ?]>> security. in Session_OnStart? Why? They can more easily be initialized on your entry page, easying the debugging process. Or if you have multiple entry possiblilities, with a include statement. That way you can have administrative entry using a different security appoach for your own purpose. Or differnt [open?] pages in another part of your site. -- Evertjan. The Netherlands. (Replace all crosses with dots in my emailaddress) Let me try to rephrase my problem. On a page call that invokes a new unique
application/session, the included query string (URL parameters) that are passed are trashed, ignored, stripped (however you want to say it). Is it true that the server's asp process will ignore URL variables if the page invokes a new session? Is it impossible to refer to URL parameters on the page that starts a session. It appears I am unable to refer to URL parameters in an asp page that invokes a session. WaterBug wrote:
> Let me try to rephrase my problem. On a page call that invokes a new Create a small page (or set of pages) that illustrates your problem. This> unique application/session, the included query string (URL > parameters) that are passed are trashed, ignored, stripped (however > you want to say it). Is it true that the server's asp process will > ignore URL variables if the page invokes a new session? Is it > impossible to refer to URL parameters on the page that starts a > session. It appears I am unable to refer to URL parameters in an asp > page that invokes a session. description is hard to follow. -- Microsoft MVP -- ASP/ASP.NET Please reply to the newsgroup. The email account listed in my From header is my spam trap, so I don't check it very often. You will get a quicker response by posting to the newsgroup. The browser call...
http://127.0.0.1/MyApp/EvalPage.asp?trainee=astronaut&evaluator=kelly&type=orbit
MyApp is defined as an application in IIS... The contents of EvalPage.asp... <%@ Language=VBScript %> <%option explicit response.Write "Trainee= " & request("trainee") & " Evaluator= " & request("evaluator") & " type= " & request("type") response.Write "<br>query_string= " & request.ServerVariables("query_string") response.Write "<br>request_uri= " & request.ServerVariables("request_uri") response.Write "<br>path_info= " & request.ServerVariables("path_info") response.Write "<br>path_translated= " & request.ServerVariables("path_translated") response.Write "<br>http_host= " & request.ServerVariables("http_host") response.Write "<br>http_referer= " & request.ServerVariables("http_referer") response.Write "<br>path= " & request.ServerVariables("path") %> The first time the URL listed above is requested the query_string is returned as an empty string. Repaste the URL (cause the query_string gets stripped) and the query_string is returned...k Show quote "Bob Barrows [MVP]" wrote: > WaterBug wrote: > > Let me try to rephrase my problem. On a page call that invokes a new > > unique application/session, the included query string (URL > > parameters) that are passed are trashed, ignored, stripped (however > > you want to say it). Is it true that the server's asp process will > > ignore URL variables if the page invokes a new session? Is it > > impossible to refer to URL parameters on the page that starts a > > session. It appears I am unable to refer to URL parameters in an asp > > page that invokes a session. > > Create a small page (or set of pages) that illustrates your problem. This > description is hard to follow. > > -- > Microsoft MVP -- ASP/ASP.NET > Please reply to the newsgroup. The email account listed in my From > header is my spam trap, so I don't check it very often. You will get a > quicker response by posting to the newsgroup. > > > WaterBug wrote:
> The browser call... http://127.0.0.1/MyApp/EvalPage.asp?trainee=astronaut&evaluator=kelly&type=orbit> > <snip>> MyApp is defined as an application in IIS... > > The contents of EvalPage.asp... > <%@ Language=VBScript %> > The first time the URL listed above is requested the query_string is By "returned", do you mean the> returned as an empty string. response.Write "query_string= " & _ request.ServerVariables("query_string") statement writes an empty string? No, that does not happen to me. I'm using IE6 on a Win2000 machine. What are you using? Bob Barrows -- Microsoft MVP -- ASP/ASP.NET Please reply to the newsgroup. The email account listed in my From header is my spam trap, so I don't check it very often. You will get a quicker response by posting to the newsgroup. Show quote
"Bob Barrows [MVP]" wrote: The first paste of the URL> WaterBug wrote: > > The browser call... > > > > http://127.0.0.1/MyApp/EvalPage.asp? > > trainee=astronaut&evaluator=kelly&type=orbit > > > > MyApp is defined as an application in IIS... > > > > The contents of EvalPage.asp... > > <%@ Language=VBScript %> > <snip> > > The first time the URL listed above is requested the query_string is > > returned as an empty string. > > By "returned", do you mean the > > response.Write "query_string= " & _ > request.ServerVariables("query_string") > > statement writes an empty string? > > No, that does not happen to me. I'm using IE6 on a Win2000 machine. What are > you using? (http://127.0.0.1/MyApp/EvalPage.asp? trainee=astronaut&evaluator=kelly&type=orbit) into the Address line of the browser writes query_string as an empty string (or query_string=) . When pasting the URL into the address line the second time (thus requesting a second trip to the server) the browser writes query_string= trainee=astronaut&evaluator=kelly&type=orbit WaterBug wrote:
Show quote > "Bob Barrows [MVP]" wrote: As I said: it does not happen to me. I agree with the others: you have a>> WaterBug wrote: >>> The browser call... >>> >>> http://127.0.0.1/MyApp/EvalPage.asp? >>> trainee=astronaut&evaluator=kelly&type=orbit >>> >>> MyApp is defined as an application in IIS... >>> >>> The contents of EvalPage.asp... >>> <%@ Language=VBScript %> >> <snip> >>> The first time the URL listed above is requested the query_string is >>> returned as an empty string. >> >> By "returned", do you mean the >> >> response.Write "query_string= " & _ >> request.ServerVariables("query_string") >> >> statement writes an empty string? >> >> No, that does not happen to me. I'm using IE6 on a Win2000 machine. >> What are you using? > > The first paste of the URL > (http://127.0.0.1/MyApp/EvalPage.asp? > trainee=astronaut&evaluator=kelly&type=orbit) > into the Address line of the browser writes query_string as an empty > string (or query_string=) . When pasting the URL into the address > line the second time (thus requesting a second trip to the server) > the browser writes query_string= > trainee=astronaut&evaluator=kelly&type=orbit problem in your global.file. -- Microsoft MVP -- ASP/ASP.NET Please reply to the newsgroup. The email account listed in my From header is my spam trap, so I don't check it very often. You will get a quicker response by posting to the newsgroup. I have recreated a project in Visual Studio 2003 and everything works fine
when there is no global.asa. When I add a global.asa that does very little or an empty global.asa then the page url variables are not recognized during the first load. The behavior is again demonstrated that only during the second load does the query_string get recognized. Can one of you add an empty global.asa in your project to see if this 'breaks' it? Thanks...k Show quote "Bob Barrows [MVP]" wrote: > WaterBug wrote: > > "Bob Barrows [MVP]" wrote: > >> WaterBug wrote: > >>> The browser call... > >>> > >>> http://127.0.0.1/MyApp/EvalPage.asp? > >>> trainee=astronaut&evaluator=kelly&type=orbit > >>> > >>> MyApp is defined as an application in IIS... > >>> > >>> The contents of EvalPage.asp... > >>> <%@ Language=VBScript %> > >> <snip> > >>> The first time the URL listed above is requested the query_string is > >>> returned as an empty string. > >> > >> By "returned", do you mean the > >> > >> response.Write "query_string= " & _ > >> request.ServerVariables("query_string") > >> > >> statement writes an empty string? > >> > >> No, that does not happen to me. I'm using IE6 on a Win2000 machine. > >> What are you using? > > > > The first paste of the URL > > (http://127.0.0.1/MyApp/EvalPage.asp? > > trainee=astronaut&evaluator=kelly&type=orbit) > > into the Address line of the browser writes query_string as an empty > > string (or query_string=) . When pasting the URL into the address > > line the second time (thus requesting a second trip to the server) > > the browser writes query_string= > > trainee=astronaut&evaluator=kelly&type=orbit > > As I said: it does not happen to me. I agree with the others: you have a > problem in your global.file. No problem here. What if you use Request.QueryString ?
Try also with an emply global.asa (rather than with doing a minimal amount for things we have no idea about). Are you sure this is not a cache issue ? Patrice -- Show quote "WaterBug" <coop***@saic.com> a écrit dans le message de news:63C346B1-3829-4C2E-9276-0DCA30EAE537@microsoft.com... > I have recreated a project in Visual Studio 2003 and everything works fine > when there is no global.asa. When I add a global.asa that does very little > or an empty global.asa then the page url variables are not recognized during > the first load. The behavior is again demonstrated that only during the > second load does the query_string get recognized. Can one of you add an > empty global.asa in your project to see if this 'breaks' it? Thanks...k > > "Bob Barrows [MVP]" wrote: > > > WaterBug wrote: > > > "Bob Barrows [MVP]" wrote: > > >> WaterBug wrote: > > >>> The browser call... > > >>> > > >>> http://127.0.0.1/MyApp/EvalPage.asp? > > >>> trainee=astronaut&evaluator=kelly&type=orbit > > >>> > > >>> MyApp is defined as an application in IIS... > > >>> > > >>> The contents of EvalPage.asp... > > >>> <%@ Language=VBScript %> > > >> <snip> > > >>> The first time the URL listed above is requested the query_string is > > >>> returned as an empty string. > > >> > > >> By "returned", do you mean the > > >> > > >> response.Write "query_string= " & _ > > >> request.ServerVariables("query_string") > > >> > > >> statement writes an empty string? > > >> > > >> No, that does not happen to me. I'm using IE6 on a Win2000 machine. > > >> What are you using? > > > > > > The first paste of the URL > > > (http://127.0.0.1/MyApp/EvalPage.asp? > > > trainee=astronaut&evaluator=kelly&type=orbit) > > > into the Address line of the browser writes query_string as an empty > > > string (or query_string=) . When pasting the URL into the address > > > line the second time (thus requesting a second trip to the server) > > > the browser writes query_string= > > > trainee=astronaut&evaluator=kelly&type=orbit > > > > As I said: it does not happen to me. I agree with the others: you have a > > problem in your global.file. Don't make us guess what you mean by "empty global.asa". Post the global.asa
code that causes the problem for you. Show quote "WaterBug" <coop***@saic.com> wrote in message news:63C346B1-3829-4C2E-9276-0DCA30EAE537@microsoft.com... > I have recreated a project in Visual Studio 2003 and everything works fine > when there is no global.asa. When I add a global.asa that does very little > or an empty global.asa then the page url variables are not recognized during > the first load. The behavior is again demonstrated that only during the > second load does the query_string get recognized. Can one of you add an > empty global.asa in your project to see if this 'breaks' it? Thanks...k > > "Bob Barrows [MVP]" wrote: > > > WaterBug wrote: > > > "Bob Barrows [MVP]" wrote: > > >> WaterBug wrote: > > >>> The browser call... > > >>> > > >>> http://127.0.0.1/MyApp/EvalPage.asp? > > >>> trainee=astronaut&evaluator=kelly&type=orbit > > >>> > > >>> MyApp is defined as an application in IIS... > > >>> > > >>> The contents of EvalPage.asp... > > >>> <%@ Language=VBScript %> > > >> <snip> > > >>> The first time the URL listed above is requested the query_string is > > >>> returned as an empty string. > > >> > > >> By "returned", do you mean the > > >> > > >> response.Write "query_string= " & _ > > >> request.ServerVariables("query_string") > > >> > > >> statement writes an empty string? > > >> > > >> No, that does not happen to me. I'm using IE6 on a Win2000 machine. > > >> What are you using? > > > > > > The first paste of the URL > > > (http://127.0.0.1/MyApp/EvalPage.asp? > > > trainee=astronaut&evaluator=kelly&type=orbit) > > > into the Address line of the browser writes query_string as an empty > > > string (or query_string=) . When pasting the URL into the address > > > line the second time (thus requesting a second trip to the server) > > > the browser writes query_string= > > > trainee=astronaut&evaluator=kelly&type=orbit > > > > As I said: it does not happen to me. I agree with the others: you have a > > problem in your global.file. All of my projects have a global.asa file, including the one I tested your
code with. Bob Barrows WaterBug wrote: Show quote > I have recreated a project in Visual Studio 2003 and everything works > fine when there is no global.asa. When I add a global.asa that does > very little or an empty global.asa then the page url variables are > not recognized during the first load. The behavior is again > demonstrated that only during the second load does the query_string > get recognized. Can one of you add an empty global.asa in your > project to see if this 'breaks' it? Thanks...k > > "Bob Barrows [MVP]" wrote: > >> WaterBug wrote: >>> "Bob Barrows [MVP]" wrote: >>>> WaterBug wrote: >>>>> The browser call... >>>>> >>>>> http://127.0.0.1/MyApp/EvalPage.asp? >>>>> trainee=astronaut&evaluator=kelly&type=orbit >>>>> >>>>> MyApp is defined as an application in IIS... >>>>> >>>>> The contents of EvalPage.asp... >>>>> <%@ Language=VBScript %> >>>> <snip> >>>>> The first time the URL listed above is requested the query_string >>>>> is returned as an empty string. >>>> >>>> By "returned", do you mean the >>>> >>>> response.Write "query_string= " & _ >>>> request.ServerVariables("query_string") >>>> >>>> statement writes an empty string? >>>> >>>> No, that does not happen to me. I'm using IE6 on a Win2000 machine. >>>> What are you using? >>> >>> The first paste of the URL >>> (http://127.0.0.1/MyApp/EvalPage.asp? >>> trainee=astronaut&evaluator=kelly&type=orbit) >>> into the Address line of the browser writes query_string as an empty >>> string (or query_string=) . When pasting the URL into the address >>> line the second time (thus requesting a second trip to the server) >>> the browser writes query_string= >>> trainee=astronaut&evaluator=kelly&type=orbit >> >> As I said: it does not happen to me. I agree with the others: you >> have a problem in your global.file. -- Microsoft MVP -- ASP/ASP.NET Please reply to the newsgroup. The email account listed in my From header is my spam trap, so I don't check it very often. You will get a quicker response by posting to the newsgroup. Works fine for me. Is there a global.asa file that is supposed to go along
with this? Show quote "WaterBug" <Water***@discussions.microsoft.com> wrote in message news:5733FEFF-CF24-4A33-B991-93C268B885D8@microsoft.com... > The browser call... > http://127.0.0.1/MyApp/EvalPage.asp?trainee=astronaut&evaluator=kelly&type=orbit > > MyApp is defined as an application in IIS... > > The contents of EvalPage.asp... > <%@ Language=VBScript %> > <%option explicit > > response.Write "Trainee= " & request("trainee") & " Evaluator= " & > request("evaluator") & " type= " & request("type") > > response.Write "<br>query_string= " & > request.ServerVariables("query_string") > response.Write "<br>request_uri= " & > request.ServerVariables("request_uri") > response.Write "<br>path_info= " & request.ServerVariables("path_info") > response.Write "<br>path_translated= " & > request.ServerVariables("path_translated") > response.Write "<br>http_host= " & request.ServerVariables("http_host") > response.Write "<br>http_referer= " & > request.ServerVariables("http_referer") > response.Write "<br>path= " & request.ServerVariables("path") > %> > > The first time the URL listed above is requested the query_string is > returned as an empty string. Repaste the URL (cause the query_string gets > stripped) and the query_string is returned...k > > "Bob Barrows [MVP]" wrote: > >> WaterBug wrote: >> > Let me try to rephrase my problem. On a page call that invokes a new >> > unique application/session, the included query string (URL >> > parameters) that are passed are trashed, ignored, stripped (however >> > you want to say it). Is it true that the server's asp process will >> > ignore URL variables if the page invokes a new session? Is it >> > impossible to refer to URL parameters on the page that starts a >> > session. It appears I am unable to refer to URL parameters in an asp >> > page that invokes a session. >> >> Create a small page (or set of pages) that illustrates your problem. This >> description is hard to follow. >> >> -- >> Microsoft MVP -- ASP/ASP.NET >> Please reply to the newsgroup. The email account listed in my From >> header is my spam trap, so I don't check it very often. You will get a >> quicker response by posting to the newsgroup. >> >> >> You can. IMO the problem is rather that you have some error in your
global.asa file having then an error just when the session starts... You should start by disabling simplified HTTP errors to that you can clearly see what this 500 error is exactly... Patrice -- Show quote "WaterBug" <Water***@discussions.microsoft.com> a écrit dans le message de news:D6EBDE35-3FD7-49A0-BCE0-4E97D4070993@microsoft.com... > Let me try to rephrase my problem. On a page call that invokes a new unique > application/session, the included query string (URL parameters) that are > passed are trashed, ignored, stripped (however you want to say it). Is it > true that the server's asp process will ignore URL variables if the page > invokes a new session? Is it impossible to refer to URL parameters on the > page that starts a session. It appears I am unable to refer to URL > parameters in an asp page that invokes a session. |
|||||||||||||||||||||||