Search:
Namespaces
Discussions
.NET v1.1
Feedback
Trouble with HttpHandlers section in web.config
Messages
Related Types
This message was discovered on
ASPFriends.com 'aspnghttphandlers' list
.
Bill Andreozzi
-- Moved from [aspngvs] to [aspnghttphandlers] by TrollHunter --This is a multi-part message in MIME format.------_=_NextPart_001_01C14545.77296220Content-Type: text/plain; charset="us-ascii"Content-Transfer-Encoding: quoted-printableI am trying to catch requests for *.exe files or possibly requests for acertain file path (e.g. */downloads/*).Here's my problem:If I use:<add verb=3D"*" path=3D"*.exe" type=3D"SPData.CDownLoad,ecClasses" />Then create a test page that:HttpContext.Current.Response.Redirect("test.exe");My CDownLoad class never gets called.But if I use:<add verb=3D"*" path=3D"*.exe.aspx" type=3D"SPData.CDownLoad,ecClasses" =/>Then create a test page that:HttpContext.Current.Response.Redirect("test.exe.aspx");My CDownLoad class works as expected.I've even tried:<add verb=3D"*" path=3D"*/downloads/*" =type=3D"SPData.CDownLoad,ecClasses" />Then create a test page that:HttpContext.Current.Response.Redirect("/downloads/test.exe");I've even experimented with all kinds of extensions - they just don'tsee to work unless it's (.aspx)?Does anyone know why?Bill AndreozziTown Compass, LLC* Phone: 206.624.4714=09* Mobile: 425.260.1127* E-mail:
Click here to reveal e-mail address
------_=_NextPart_001_01C14545.77296220Content-Type: text/html; charset="us-ascii"Content-Transfer-Encoding: quoted-printable<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"><HTML><HEAD><META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =charset=3Dus-ascii"><META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =6.0.4712.0"><TITLE>Trouble with HttpHandlers section in web.config</TITLE></HEAD><BODY><!-- Converted from text/rtf format --><P><FONT SIZE=3D2 FACE=3D"Arial">I am trying to catch requests for *.exe =files or possibly requests for a certain file path (e.g. =*/downloads/*).</FONT></P><P><FONT SIZE=3D2 FACE=3D"Arial">Here's my problem:</FONT><BR><FONT SIZE=3D2 FACE=3D"Arial">If I use:</FONT><BR><FONT SIZE=3D2 FACE=3D"Courier New"><add verb=3D"*" =path=3D"*.exe" type=3D"SPData.CDownLoad,ecClasses" =/></FONT><BR><FONT SIZE=3D2 FACE=3D"Courier New">Then create a test page =that:</FONT><BR><FONT SIZE=3D2 FACE=3D"Courier =New">HttpContext.Current.Response.Redirect("test.exe");</FONT></P><P><FONT SIZE=3D2 FACE=3D"Courier New">My CDownLoad class never gets =called.</FONT></P><P><FONT SIZE=3D2 FACE=3D"Courier New">But if I use:</FONT><BR><FONT SIZE=3D2 FACE=3D"Courier New"><add verb=3D"*" =path=3D"*.exe.aspx" =type=3D"SPData.CDownLoad,ecClasses" /></FONT><BR><FONT SIZE=3D2 FACE=3D"Courier New">Then create a test page =that:</FONT><BR><FONT SIZE=3D2 FACE=3D"Courier =New">HttpContext.Current.Response.Redirect("test.exe.aspx");</F=ONT><BR><FONT SIZE=3D2 FACE=3D"Courier New">My CDownLoad class works as =expected.</FONT></P><P><FONT SIZE=3D2 FACE=3D"Courier New">I've even tried:</FONT><BR><FONT SIZE=3D2 FACE=3D"Courier New"><add verb=3D"*" =path=3D"*/downloads/*" =type=3D"SPData.CDownLoad,ecClasses" /></FONT><BR><FONT SIZE=3D2 FACE=3D"Courier New">Then create a test page =that:</FONT><BR><FONT SIZE=3D2 FACE=3D"Courier =New">HttpContext.Current.Response.Redirect("/downloads/test.exe"=;);</FONT></P><P><FONT SIZE=3D2 FACE=3D"Courier New">I've even experimented with all =kinds of extensions - they just don't see to work unless it's =(.aspx)?</FONT></P><P><FONT SIZE=3D2 FACE=3D"Courier New">Does anyone know why?</FONT></P><BR><P><B><FONT SIZE=3D2 FACE=3D"Garamond">Bill Andreozzi</FONT></B><BR><FONT COLOR=3D"#008000" SIZE=3D2 FACE=3D"Garamond">Town Compass, =LLC</FONT><B></B><BR><SPAN LANG=3D"de"><FONT COLOR=3D"#0000FF" SIZE=3D1 =FACE=3D"Wingdings">(</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" =SIZE=3D2 FACE=3D"Arial"> =Phone: </FONT> <FONT =COLOR=3D"#000000" SIZE=3D1 FACE=3D"MS Sans =Serif">206.624.4714 </FONT></SPAN><BR><SPAN LANG=3D"de"><FONT COLOR=3D"#0000FF" SIZE=3D1 =FACE=3D"Wingdings">(</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" =SIZE=3D2 FACE=3D"Arial"> =Mobile: </FONT> <FONT COLOR=3D"#000000" =SIZE=3D1 FACE=3D"MS Sans Serif">425.260.1127</FONT></SPAN><SPAN =LANG=3D"de"></SPAN><SPAN LANG=3D"de"></SPAN><BR><SPAN LANG=3D"de"><FONT COLOR=3D"#0000FF" SIZE=3D1 =FACE=3D"Wingdings">*</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" =SIZE=3D2 FACE=3D"Arial"> =E-mail: </FONT> <FONT COLOR=3D"#000000" =SIZE=3D1 FACE=3D"MS Sans Serif">
Click here to reveal e-mail address
</FONT></SPAN></P><BR></BODY></HTML>------_=_NextPart_001_01C14545.77296220--
Reply to this message...
Bill Andreozzi
btw: I've tried mapping the extension (like the aspx extension) - still
didn't work.
thanks - bill
"Bill Andreozzi" <
Click here to reveal e-mail address
> wrote in message
news:490619@aspnghttphandlers...
[Original message clipped]
Reply to this message...
Jonne
I don't know if this helps at all. Here is what I have done and it works
perfectly. I added a mapping in the IIS management console, under Home
Directory / Configuration for the extension '*' to the aspnet_isapi.dll.
This is how the web.config looks for the directory. The dll is in the
directory's 'bin' subdirectory.
<configuration>
<system.web>
<httpHandlers>
<add verb"*;" path"*;" type"C;lass1.MyHttpHandler,MyHttpHandler"/>
</httpHandlers>
</system.web>
</configuration>
John
-----Original Message-----
From: Bill Andreozzi [mailto:
Click here to reveal e-mail address
]
Sent: 25. syyskuuta 2001 2:45
To: aspnghttphandlers
Subject: [aspnghttphandlers] Re: Trouble with HttpHandlers section in
web.config
btw: I've tried mapping the extension (like the aspx extension) - still
didn't work.
thanks - bill
"Bill Andreozzi" <
Click here to reveal e-mail address
> wrote in message
news:490619@aspnghttphandlers...
[Original message clipped]
|
http://www.asplists.com/asplists/aspnghttphandlers.asp
J;OIN/QUIT<BR>
|
http://www.asplists.com/search
S;EARCH Archives<BR>
</BODY>
[Original message clipped]
Reply to this message...
System.Web.HttpContext
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com