Custom Http Handler Question

M

Mark Olbert

I have a custom http handler set for an ASP.NET site which handles requests for ".scef" pages. It
works fine once IIS is properly configured.

I've noticed something about the handler, though, that I want to confirm. Let's say my site has a
"virtual" page that the handler should generate called www.scef.us/test2.scef. If I enter that
address in the address bar of a browser -- and the site's ASP.NET process isn't running (it's not a
heavily-trafficed site) -- I get a server application error.

But if I first visit a "normal" page in the site -- say the home page, which is a plain aspx page --
then visiting the virtual page works fine.

It's as is asking for the virtual page doesn't cause the site's process to start. At least, that's
my theory.

Is this theory correct? If so, how do I code an http handler so that it will start up the site
process? If the theory's not correct, what other things might be causing this behavior?

Thanx in advance!

- Mark
 
D

Daniel Fisher\(lennybacon\)

How do you configre IIS - map the extension to the aspnet ISAPI?
 
M

Mark Olbert

I don't remember; it's been a while. I did it whichever way the documentation suggested.

I was able to fix the problem. It turns out a custom handler can be called when there is no running
HttpApplication instance. Since my handler was (initially) using some properties and methods of
Global.asax to manipulate a database connection, it would blow up in that situation. I solved the
problem by including standalone logic that does not depend on the existence of an HttpApplication
instance within the custom handler.

- Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top