By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,969 Members | 1,579 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,969 IT Pros & Developers. It's quick & easy.

httphandler in VS 2005

P: n/a
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.

Jun 6 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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).

--
Patrice

"Billy" <Bi***@discussions.microsoft.coma écrit dans le message de news:
60**********************************@microsoft.com...
>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.

Jun 6 '07 #2

P: n/a
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.

"Patrice" wrote:
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).

--
Patrice

"Billy" <Bi***@discussions.microsoft.coma écrit dans le message de news:
60**********************************@microsoft.com...
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.


Jun 8 '07 #3

P: n/a
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

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

"Billy" wrote:
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.

"Patrice" wrote:
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).

--
Patrice

"Billy" <Bi***@discussions.microsoft.coma écrit dans le message de news:
60**********************************@microsoft.com...
>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.
>
Jun 8 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.