Click to See Complete Forum and Search --> : Response - error: "Element not found"


Pulp
July 26th, 2000, 09:39 AM
Hi all!!

I'm running IIS on a Nt-server, but are having some difficulties with displaying the web-sites.

I have created a directory called "test" (under wwwroot) and added two files to it, Global.asa and Hi.asp.
What happens is that the response-object (if you can can call it an object..) works fine in the asp-page.
It also works fine in the Session_OnStart -procedure in Global.asa. BUT if I place a response-call in the Application_OnStart -procedure, it fails!!!

It doesn't matter if it's a response.write, or response.redirect, the error pops up anyway.

The error number is: 8002802b
I found an article about the error on:

http://support.microsoft.com/support/kb/articles/Q199/9/65.ASP?LN=EN-US&SD=g
n&FR=0

...but that didn't solve the problem either.

Could anyone please help me out here???

Thanx
Pulp

Johnny101
July 26th, 2000, 11:39 AM
I'm curious as to why you are trying to do anything with the response object in either of the Session or Application events. Those events are more like a Form_Initialize event from VB. They meant to be used to set up global or user specific variables and such. If you need to send a redirect, then make that the first line of your asp page after the language declarative. If you want to send something down to the client, like "Good Afternoon", also do this in the first few lines of the asp page. The most common uses of the Session_OnStart and Application_OnStart events are to count hits, create a global variable - like a connectionstring that can be used through out the asp application, set up a user specific variable - like the SessionID.

Try moving your response and request object code to the asp page, and everything should work fine.

hope this helps,

John

John Pirkey
MCSD
http://www.ShallowWaterSystems.com
http://www.stlvbug.org

Pulp
July 27th, 2000, 04:55 AM
Thanks a lot, John!!

This helped me isolate the problem, and after a week of struggeling I was able to figure out what was wrong.

The code isn't in fact mine, so I'll now have to inform the provider that they should do some modifications in their code.

Thanks again!

Pulp