httphandler in VS 2005

G

Guest

I have a httpHandler which ran ok on .net 1.1, have ported the web app across
to 2.0 and it now gives a 404 error.

The problem seems to be based around the fact that the source for the
handler is contained in a seperate project in Vis Studio, although this
project is part of the same solution. But it being in a seperate project was
not a prob in VS 2003.

In 1.1 the declaration was:
<add verb="*" path="*Welcome.aspx*"
type="MyCO.WEB.Presentation.HolidayWelcomeFactory,MYSOURCE"/>

And it found MYSOURCE fine. But when trying to access "Welcome.aspx" in VS
2005 it throws a 404. I have tried the below, but again this still throws a
404.

<add verb="*" path="*Welcome.aspx*"
type="MyCO.WEB.Presentation.HolidayWelcomeFactory,MYSOURCE"/>

Probably a bit too specific, but an ideas apprecciated.
 
P

Patrice

My first thought would be to check the IIS log to make sure which path is
tried (is all deployed to the server ?). The wilcard after the .aspx
extension might be unsupported now ? (is it really needed ?) (thought it
doesn't seem to me it should be a 404 error then).

Also what if you disable this handler declaration and try to it a normal
welcome.aspx page at the same location. Does it work ? (would help to find
out if this is before the handler thing or if this is the handler
declaration that causes this problem).
 
G

Guest

I did substitution in web.config with:

<add verb="*" path="*HotelsWelcome.aspx*"
type="System.Web.HttpForbiddenHandler"/>

Which worked, so prob. not with the web.config.
hmmm.
 
G

Guest

Appears to be a problem with the assembly itself, anyone an idea why this
would work in .Net 1.1 and not 2.0?
-----------------------
Imports System.Web
Imports System.IO
Imports System.Web.UI
Imports System.Text.RegularExpressions

Public Class HolWelFact
Implements IHttpHandlerFactory

Public Function GetHandler(ByVal context As HttpContext, ByVal
requestType As String, ByVal url As String, ByVal pathTranslated As String)
As IHttpHandler Implements IHttpHandlerFactory.GetHandler

Dim sPath As String = Nothing
sPath = context.Server.MapPath("~/WelcomeNew.aspx")
Return PageParser.GetCompiledPageInstance("~/", sPath, context)

End Function

End Class

----------------------------
 

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

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top