httpmodule causes VS.NET to refuse to open solution!

P

Peter Row

Hi,

Just in case anyone else has the following issue (unlikely but you never
know) here is the solution I eventually found after I was threatening myself
with a wipe and reload of my laptop.

VB6 to VB.NET web project Port.
We wanted all the code to run under .NET
However we use an ISAPI filter. According to posts my Microsoft bods it is
not possible to write these in .NET.
But it is as long as your ISAPI filter isn't that complex - with a few
drawbacks.

First off create a class that implements IHttpModule and setup the
appropriate bits in web.config.
Next in IIS add a mapping of *.* to be processed by the ASP.NET DLL. This is
done because usually things like
CSS and JPEGs etc... don't get processed by ASP.NET

In inQuire2.NET's case we could have URLs requested like:
http://www.mysite.com/res/3/mystyle.css
Before in inQuire2.COM+ the ISAPI filter would kick in and do a redirect to
another page that would actually
cause the file mystyle.css to be fetched out of the database.

But now with the HttpModule it receives a request as the above and without
redirecting gets the file and returns it.
So hence you have a speed increase because theres no redirect going on and
it's managed code so it can be debugged easily.

Drawback time !
1) The *.* mapping makes the setting of a default document for the site
pointless because this never reachs the site or gets used.

But the big time wasting killer is.....

2) If you close VS.NET 2002/3 and then try to reopen the project it will
then complain that the locations of http://localhost/yoursite and
c:\usr\mysite don't point to the same location even though they do and you
haven't changed anything. The reason for this is because of the *.* mapping
above screwing up .NET's wacky offline cache handshake stuff.

So to get around it you have to remove the *.* mapping before opening the
project, having opened it you can then add it back in.

Bye,
Peter Row
Oxford Computer Consultants Ltd
2 Cambridge Terrace
OXFORD
OX1 1RR

phone: 01865 793077
fax: 01865 793124
email: (e-mail address removed)
 

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,776
Messages
2,569,602
Members
45,182
Latest member
BettinaPol

Latest Threads

Top