473,563 Members | 2,653 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

global.asa fires after url parameters?

When clicking on the following link from an email i.e -
http://myserver/myapplication/myprog...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 the
global.asa is fired. Does anyone know of the order of processing? Any
suggestions?

Jul 22 '05 #1
16 2265
=?Utf-8?B?V2F0ZXJCdWc =?= wrote on 16 mrt 2005 in
microsoft.publi c.inetserver.as p.general:
When clicking on the following link from an email i.e -
http://myserver/myapplication/myprog...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.
This is a emailclient cum browser issue, IMHO

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?


global.asa does not fire every time a page is called, only at a [re]start
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)

Jul 22 '05 #2
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 connectionStrin g, 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.
Jul 22 '05 #3
Tim
WaterBug wrote:
E: This is a emailclient cum browser issue, IMHO
W: I don't believe this is an emailclient issue. I can create the problem
Not a big issue but I suggest using ordinare quoting (like I do here) in
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
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.
Application_OnS tart fires only when your application starts, that is
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
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.

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
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?


The url vars are never automatically resolved.

If it is a new session, session_onstart is called first, in there you
might resolve the url vars with request.queryst ring 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
Jul 22 '05 #4
Dear waterbug,

Tim wrote on 16 mrt 2005 in microsoft.publi c.inetserver.as p.general:
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.


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.


Tim is right. [also on the quoting issue, but that aside]

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
security.


And you initialize those session variables [we are talking session() ?]
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)

Jul 22 '05 #5
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.
Jul 22 '05 #6
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.
Jul 22 '05 #7
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
--

"WaterBug" <Wa******@discu ssions.microsof t.com> a écrit dans le message de
news:D6******** *************** ***********@mic rosoft.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.

Jul 22 '05 #8
The browser call..
http://127.0.0.1/MyApp/EvalPage.asp?...lly&type=orbit

MyApp is defined as an application in IIS...

The contents of EvalPage.asp...
<%@ Language=VBScri pt %>
<%option explicit

response.Write "Trainee= " & request("traine e") & " Evaluator= " &
request("evalua tor") & " type= " & request("type")

response.Write "<br>query_stri ng= " & request.ServerV ariables("query _string")
response.Write "<br>request_ur i= " & request.ServerV ariables("reque st_uri")
response.Write "<br>path_i nfo= " & request.ServerV ariables("path_ info")
response.Write "<br>path_trans lated= " &
request.ServerV ariables("path_ translated")
response.Write "<br>http_h ost= " & request.ServerV ariables("http_ host")
response.Write "<br>http_refer er= " & request.ServerV ariables("http_ referer")
response.Write "<br>path= " & request.ServerV ariables("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.

Jul 22 '05 #9
WaterBug wrote:
The browser call...
http://127.0.0.1/MyApp/EvalPage.asp?...lly&type=orbit
MyApp is defined as an application in IIS...

The contents of EvalPage.asp...
<%@ Language=VBScri pt %> <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_stri ng= " & _
request.ServerV ariables("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.
Jul 22 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
515
by: Phil Lamey | last post by:
Hi All, I have the following code but for some reason I cannot get the Session_OnEnd event to fire. I am trying to limit the amount of connections a browser session can have. Where the application is a virtual directory. Any ideas? ------------
0
1282
by: Tim::.. | last post by:
Hi, Can someone please tell me why I get this error when I try to build my ASP.NET application??? Could not load type 'CPNNet.Global'. Line 1: <%@ Application Codebehind="Global.asax.vb" Inherits="CPNiNet.Global" %> Thanks for any help!
1
6306
by: Stu | last post by:
Hi, Im using vis studio 2003 and I think wse is out of the question as clients could be using java which doesnt support it. So I managed to find some code which allows you to develop a custom soap header called by using a http module. The problem Im having is I cannot seem to get the event to raise to fire off my authenticate method in the...
19
10169
by: furiousmojo | last post by:
This is a strange problem. I have a project where the contents of global.asax application_error are not firing. It is an asp.net 2.0 application using web application projects. I have another app using web application projects and it's firing fine but it was upgraded from the 1.1 framework. Why doesn't my global.asax application_error...
3
2878
by: thomson | last post by:
Hi All, i do have an website with the URL http://localhost/application/ASEAN-ANZ, Once i hit the application, it goes to the Global.asax. but after that if i tried to change the URL http://localhost/application/en-US, the global.asax is not fired.
0
7659
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7882
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8103
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7634
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7945
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5208
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3618
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1194
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.