installing global httphandler for custom extension

G

Guest

Im trying to add an httphandler for all *.sgf file extensions. I have
developed the handler,
1. installed it into the gac
2. added it to the machine.config:

<httpHandlers>
<add verb="*" path="*.sgf" type="CustomExtensionHandler,
Extenders.CustomExtensionHandler, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=d831d925597c1031" validate="True"/>
</httpHandlers>
3. Added .sgf to map to aspnet_isapi.dll

The assembly seems to get loaded (If I change the type string to be invalid
it will fail upon iisreset - so this seems to work ok).

When I try to request localhost/something.sgf I get a 404 returned from
asp.net (the script mapping in iis is set to not check for the client file).

If I create a new web app and add this filter to the web.config, it seems to
work. I thought adding it to machine.config would allow me to create a
"global" httphandler that I wouldnt have to add to every single web.config,
no? But its not working that way. Is it supposed to?

Thanks!
 
S

Steven Cheng[MSFT]

Hi adamtuliper,

Welcome to ASPNET newsgroup.
Regarding on the problem you mentioned, it seems a unexpected behavior and
I'll try performing some tests on my side. What's your environment of the
problem server? IIS5 /WIN2K or IIS6/WIN2003?

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: installing global httphandler for custom extension
| thread-index: AcW6XOdEOEJAjvdqQNaKxOh5cVTmXA==
| X-WBNR-Posting-Host: 68.163.60.56
| From: "=?Utf-8?B?QWRhbQ==?=" <[email protected]>
| Subject: installing global httphandler for custom extension
| Date: Thu, 15 Sep 2005 18:21:02 -0700
| Lines: 26
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:125014
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Im trying to add an httphandler for all *.sgf file extensions. I have
| developed the handler,
| 1. installed it into the gac
| 2. added it to the machine.config:
|
| <httpHandlers>
| <add verb="*" path="*.sgf" type="CustomExtensionHandler,
| Extenders.CustomExtensionHandler, Version=1.0.0.0, Culture=neutral,
| PublicKeyToken=d831d925597c1031" validate="True"/>
| </httpHandlers>
| 3. Added .sgf to map to aspnet_isapi.dll
|
| The assembly seems to get loaded (If I change the type string to be
invalid
| it will fail upon iisreset - so this seems to work ok).
|
| When I try to request localhost/something.sgf I get a 404 returned from
| asp.net (the script mapping in iis is set to not check for the client
file).
|
| If I create a new web app and add this filter to the web.config, it seems
to
| work. I thought adding it to machine.config would allow me to create a
| "global" httphandler that I wouldnt have to add to every single
web.config,
| no? But its not working that way. Is it supposed to?
|
| Thanks!
|
|
|
 
G

Guest

Hi Steven,
Im using windows xp, whidbey, iis5.1, and I've tried the asp.net development
web server as well.
Thanks!
Adam
 
S

Steven Cheng[MSFT]

OK. I'll do some tests and let you know my results ASAP.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: installing global httphandler for custom extension
| thread-index: AcW6xEeLWO/La2xISs6YCk91IRMHUQ==
| X-WBNR-Posting-Host: 63.66.47.208
| From: "=?Utf-8?B?QWRhbQ==?=" <[email protected]>
| References: <[email protected]>
<[email protected]>
| Subject: RE: installing global httphandler for custom extension
| Date: Fri, 16 Sep 2005 06:41:02 -0700
| Lines: 82
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:125122
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hi Steven,
| Im using windows xp, whidbey, iis5.1, and I've tried the asp.net
development
| web server as well.
| Thanks!
| Adam
|
|
| "Steven Cheng[MSFT]" wrote:
|
| > Hi adamtuliper,
| >
| > Welcome to ASPNET newsgroup.
| > Regarding on the problem you mentioned, it seems a unexpected behavior
and
| > I'll try performing some tests on my side. What's your environment of
the
| > problem server? IIS5 /WIN2K or IIS6/WIN2003?
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| > --------------------
| > | Thread-Topic: installing global httphandler for custom extension
| > | thread-index: AcW6XOdEOEJAjvdqQNaKxOh5cVTmXA==
| > | X-WBNR-Posting-Host: 68.163.60.56
| > | From: "=?Utf-8?B?QWRhbQ==?=" <[email protected]>
| > | Subject: installing global httphandler for custom extension
| > | Date: Thu, 15 Sep 2005 18:21:02 -0700
| > | Lines: 26
| > | Message-ID: <[email protected]>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | Xref: TK2MSFTNGXA01.phx.gbl
| > microsoft.public.dotnet.framework.aspnet:125014
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > | Im trying to add an httphandler for all *.sgf file extensions. I have
| > | developed the handler,
| > | 1. installed it into the gac
| > | 2. added it to the machine.config:
| > |
| > | <httpHandlers>
| > | <add verb="*" path="*.sgf" type="CustomExtensionHandler,
| > | Extenders.CustomExtensionHandler, Version=1.0.0.0, Culture=neutral,
| > | PublicKeyToken=d831d925597c1031" validate="True"/>
| > | </httpHandlers>
| > | 3. Added .sgf to map to aspnet_isapi.dll
| > |
| > | The assembly seems to get loaded (If I change the type string to be
| > invalid
| > | it will fail upon iisreset - so this seems to work ok).
| > |
| > | When I try to request localhost/something.sgf I get a 404 returned
from
| > | asp.net (the script mapping in iis is set to not check for the client
| > file).
| > |
| > | If I create a new web app and add this filter to the web.config, it
seems
| > to
| > | work. I thought adding it to machine.config would allow me to create
a
| > | "global" httphandler that I wouldnt have to add to every single
| > web.config,
| > | no? But its not working that way. Is it supposed to?
| > |
| > | Thanks!
| > |
| > |
| > |
| >
| >
|
 
S

Steven Cheng[MSFT]

Hi Adam,

I've just perfomed some tests on my local Whidbey beta2 environment. Based
on my test, I think the problem maybe due to the new global configuration
hierarchy for ASP.NET application in Whidbey. In the original ASP.NET 1.X,
the global (machine wide) configuration for ASP.NET application are stored
in machine.config. However, in whidbey, most of the machine wide
configuration for ASP.NET application are stored in a global web.config
which is also in the

%windir%\Microsoft.NET\Framework\v2.0.xxxxx\CONFIG folder.

I've tested through add the custom HttpHandler in that global web.config
and also configure the extentions mapping in IIS's website home directory,
that works well. So I think you can also try using the global web.config
file instead of the machine.config to see whether it works.

Hope helps. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| X-Tomcat-ID: 24090220
| References: <[email protected]>
<[email protected]>
<[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: (e-mail address removed) (Steven Cheng[MSFT])
| Organization: Microsoft
| Date: Mon, 19 Sep 2005 01:34:09 GMT
| Subject: RE: installing global httphandler for custom extension
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Lines: 111
| Path: TK2MSFTNGXA01.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:125404
| NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182
|
| OK. I'll do some tests and let you know my results ASAP.
|
| Thanks,
|
| Steven Cheng
| Microsoft Online Support
|
| Get Secure! www.microsoft.com/security
| (This posting is provided "AS IS", with no warranties, and confers no
| rights.)
| --------------------
| | Thread-Topic: installing global httphandler for custom extension
| | thread-index: AcW6xEeLWO/La2xISs6YCk91IRMHUQ==
| | X-WBNR-Posting-Host: 63.66.47.208
| | From: "=?Utf-8?B?QWRhbQ==?=" <[email protected]>
| | References: <[email protected]>
| <[email protected]>
| | Subject: RE: installing global httphandler for custom extension
| | Date: Fri, 16 Sep 2005 06:41:02 -0700
| | Lines: 82
| | Message-ID: <[email protected]>
| | MIME-Version: 1.0
| | Content-Type: text/plain;
| | charset="Utf-8"
| | Content-Transfer-Encoding: 7bit
| | X-Newsreader: Microsoft CDO for Windows 2000
| | Content-Class: urn:content-classes:message
| | Importance: normal
| | Priority: normal
| | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| | Newsgroups: microsoft.public.dotnet.framework.aspnet
| | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| | Xref: TK2MSFTNGXA01.phx.gbl
| microsoft.public.dotnet.framework.aspnet:125122
| | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| |
| | Hi Steven,
| | Im using windows xp, whidbey, iis5.1, and I've tried the asp.net
| development
| | web server as well.
| | Thanks!
| | Adam
| |
| |
| | "Steven Cheng[MSFT]" wrote:
| |
| | > Hi adamtuliper,
| | >
| | > Welcome to ASPNET newsgroup.
| | > Regarding on the problem you mentioned, it seems a unexpected
behavior
| and
| | > I'll try performing some tests on my side. What's your environment of
| the
| | > problem server? IIS5 /WIN2K or IIS6/WIN2003?
| | >
| | > Thanks,
| | >
| | > Steven Cheng
| | > Microsoft Online Support
| | >
| | > Get Secure! www.microsoft.com/security
| | > (This posting is provided "AS IS", with no warranties, and confers no
| | > rights.)
| | > --------------------
| | > | Thread-Topic: installing global httphandler for custom extension
| | > | thread-index: AcW6XOdEOEJAjvdqQNaKxOh5cVTmXA==
| | > | X-WBNR-Posting-Host: 68.163.60.56
| | > | From: "=?Utf-8?B?QWRhbQ==?=" <[email protected]>
| | > | Subject: installing global httphandler for custom extension
| | > | Date: Thu, 15 Sep 2005 18:21:02 -0700
| | > | Lines: 26
| | > | Message-ID: <[email protected]>
| | > | MIME-Version: 1.0
| | > | Content-Type: text/plain;
| | > | charset="Utf-8"
| | > | Content-Transfer-Encoding: 7bit
| | > | X-Newsreader: Microsoft CDO for Windows 2000
| | > | Content-Class: urn:content-classes:message
| | > | Importance: normal
| | > | Priority: normal
| | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| | > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| | > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| | > | Xref: TK2MSFTNGXA01.phx.gbl
| | > microsoft.public.dotnet.framework.aspnet:125014
| | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| | > |
| | > | Im trying to add an httphandler for all *.sgf file extensions. I
have
| | > | developed the handler,
| | > | 1. installed it into the gac
| | > | 2. added it to the machine.config:
| | > |
| | > | <httpHandlers>
| | > | <add verb="*" path="*.sgf" type="CustomExtensionHandler,
| | > | Extenders.CustomExtensionHandler, Version=1.0.0.0, Culture=neutral,
| | > | PublicKeyToken=d831d925597c1031" validate="True"/>
| | > | </httpHandlers>
| | > | 3. Added .sgf to map to aspnet_isapi.dll
| | > |
| | > | The assembly seems to get loaded (If I change the type string to be
| | > invalid
| | > | it will fail upon iisreset - so this seems to work ok).
| | > |
| | > | When I try to request localhost/something.sgf I get a 404 returned
| from
| | > | asp.net (the script mapping in iis is set to not check for the
client
| | > file).
| | > |
| | > | If I create a new web app and add this filter to the web.config, it
| seems
| | > to
| | > | work. I thought adding it to machine.config would allow me to
create
| a
| | > | "global" httphandler that I wouldnt have to add to every single
| | > web.config,
| | > | no? But its not working that way. Is it supposed to?
| | > |
| | > | Thanks!
| | > |
| | > |
| | > |
| | >
| | >
| |
|
|
 
S

Steven Cheng[MSFT]

Hi Adam,

I've received the screenshots you provided. Seems the configuration in
web.config is OK. Really a bit strange. What I haven't got from the screen
is that whether the configuration for the httphandler's config files and
the IIS's ASPNET isapi extension's version match. Have you checked both of
them to ensure they're both v2.0.xxxx?

If all of this is OK, I can't think of any definite issue. If possible, I'd
really suggest you build some other test enviornment to test this.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| X-Tomcat-ID: 56612462
| References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: (e-mail address removed) (Steven Cheng[MSFT])
| Organization: Microsoft
| Date: Wed, 21 Sep 2005 03:10:43 GMT
| Subject: RE: installing global httphandler for custom extension
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Lines: 165
| Path: TK2MSFTNGXA01.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:126001
| NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
|
| Hi Adam,
|
| I've just perfomed some tests on my local Whidbey beta2 environment.
Based
| on my test, I think the problem maybe due to the new global configuration
| hierarchy for ASP.NET application in Whidbey. In the original ASP.NET
1.X,
| the global (machine wide) configuration for ASP.NET application are
stored
| in machine.config. However, in whidbey, most of the machine wide
| configuration for ASP.NET application are stored in a global web.config
| which is also in the
|
| %windir%\Microsoft.NET\Framework\v2.0.xxxxx\CONFIG folder.
|
| I've tested through add the custom HttpHandler in that global web.config
| and also configure the extentions mapping in IIS's website home
directory,
| that works well. So I think you can also try using the global web.config
| file instead of the machine.config to see whether it works.
|
| Hope helps. Thanks,
|
| Steven Cheng
| Microsoft Online Support
|
| Get Secure! www.microsoft.com/security
| (This posting is provided "AS IS", with no warranties, and confers no
| rights.)
|
|
| --------------------
| | X-Tomcat-ID: 24090220
| | References: <[email protected]>
| <[email protected]>
| <[email protected]>
| | MIME-Version: 1.0
| | Content-Type: text/plain
| | Content-Transfer-Encoding: 7bit
| | From: (e-mail address removed) (Steven Cheng[MSFT])
| | Organization: Microsoft
| | Date: Mon, 19 Sep 2005 01:34:09 GMT
| | Subject: RE: installing global httphandler for custom extension
| | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| | Message-ID: <[email protected]>
| | Newsgroups: microsoft.public.dotnet.framework.aspnet
| | Lines: 111
| | Path: TK2MSFTNGXA01.phx.gbl
| | Xref: TK2MSFTNGXA01.phx.gbl
| microsoft.public.dotnet.framework.aspnet:125404
| | NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182
| |
| | OK. I'll do some tests and let you know my results ASAP.
| |
| | Thanks,
| |
| | Steven Cheng
| | Microsoft Online Support
| |
| | Get Secure! www.microsoft.com/security
| | (This posting is provided "AS IS", with no warranties, and confers no
| | rights.)
| | --------------------
| | | Thread-Topic: installing global httphandler for custom extension
| | | thread-index: AcW6xEeLWO/La2xISs6YCk91IRMHUQ==
| | | X-WBNR-Posting-Host: 63.66.47.208
| | | From: "=?Utf-8?B?QWRhbQ==?=" <[email protected]>
| | | References: <[email protected]>
| | <[email protected]>
| | | Subject: RE: installing global httphandler for custom extension
| | | Date: Fri, 16 Sep 2005 06:41:02 -0700
| | | Lines: 82
| | | Message-ID: <[email protected]>
| | | MIME-Version: 1.0
| | | Content-Type: text/plain;
| | | charset="Utf-8"
| | | Content-Transfer-Encoding: 7bit
| | | X-Newsreader: Microsoft CDO for Windows 2000
| | | Content-Class: urn:content-classes:message
| | | Importance: normal
| | | Priority: normal
| | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| | | Newsgroups: microsoft.public.dotnet.framework.aspnet
| | | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| | | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| | | Xref: TK2MSFTNGXA01.phx.gbl
| | microsoft.public.dotnet.framework.aspnet:125122
| | | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| | |
| | | Hi Steven,
| | | Im using windows xp, whidbey, iis5.1, and I've tried the asp.net
| | development
| | | web server as well.
| | | Thanks!
| | | Adam
| | |
| | |
| | | "Steven Cheng[MSFT]" wrote:
| | |
| | | > Hi adamtuliper,
| | | >
| | | > Welcome to ASPNET newsgroup.
| | | > Regarding on the problem you mentioned, it seems a unexpected
| behavior
| | and
| | | > I'll try performing some tests on my side. What's your environment
of
| | the
| | | > problem server? IIS5 /WIN2K or IIS6/WIN2003?
| | | >
| | | > Thanks,
| | | >
| | | > Steven Cheng
| | | > Microsoft Online Support
| | | >
| | | > Get Secure! www.microsoft.com/security
| | | > (This posting is provided "AS IS", with no warranties, and confers
no
| | | > rights.)
| | | > --------------------
| | | > | Thread-Topic: installing global httphandler for custom extension
| | | > | thread-index: AcW6XOdEOEJAjvdqQNaKxOh5cVTmXA==
| | | > | X-WBNR-Posting-Host: 68.163.60.56
| | | > | From: "=?Utf-8?B?QWRhbQ==?=" <[email protected]>
| | | > | Subject: installing global httphandler for custom extension
| | | > | Date: Thu, 15 Sep 2005 18:21:02 -0700
| | | > | Lines: 26
| | | > | Message-ID: <[email protected]>
| | | > | MIME-Version: 1.0
| | | > | Content-Type: text/plain;
| | | > | charset="Utf-8"
| | | > | Content-Transfer-Encoding: 7bit
| | | > | X-Newsreader: Microsoft CDO for Windows 2000
| | | > | Content-Class: urn:content-classes:message
| | | > | Importance: normal
| | | > | Priority: normal
| | | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| | | > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| | | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| | | > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| | | > | Xref: TK2MSFTNGXA01.phx.gbl
| | | > microsoft.public.dotnet.framework.aspnet:125014
| | | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| | | > |
| | | > | Im trying to add an httphandler for all *.sgf file extensions. I
| have
| | | > | developed the handler,
| | | > | 1. installed it into the gac
| | | > | 2. added it to the machine.config:
| | | > |
| | | > | <httpHandlers>
| | | > | <add verb="*" path="*.sgf" type="CustomExtensionHandler,
| | | > | Extenders.CustomExtensionHandler, Version=1.0.0.0,
Culture=neutral,
| | | > | PublicKeyToken=d831d925597c1031" validate="True"/>
| | | > | </httpHandlers>
| | | > | 3. Added .sgf to map to aspnet_isapi.dll
| | | > |
| | | > | The assembly seems to get loaded (If I change the type string to
be
| | | > invalid
| | | > | it will fail upon iisreset - so this seems to work ok).
| | | > |
| | | > | When I try to request localhost/something.sgf I get a 404
returned
| | from
| | | > | asp.net (the script mapping in iis is set to not check for the
| client
| | | > file).
| | | > |
| | | > | If I create a new web app and add this filter to the web.config,
it
| | seems
| | | > to
| | | > | work. I thought adding it to machine.config would allow me to
| create
| | a
| | | > | "global" httphandler that I wouldnt have to add to every single
| | | > web.config,
| | | > | no? But its not working that way. Is it supposed to?
| | | > |
| | | > | Thanks!
| | | > |
| | | > |
| | | > |
| | | >
| | | >
| | |
| |
| |
|
|
 
G

Guest

Hi Steven,
Im assuming you mean the global web.config in the
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\CONFIG folder. They are both
the same version, I've verified.
Can you tell me the steps (in as much detail as you can) that you took to do
this, since something weird is going here then.
Thanks!


--
http://www.secure-coding.com
<cheesy>Saving the world one line of code at a time</cheesy>


Steven Cheng said:
Hi Adam,

I've received the screenshots you provided. Seems the configuration in
web.config is OK. Really a bit strange. What I haven't got from the screen
is that whether the configuration for the httphandler's config files and
the IIS's ASPNET isapi extension's version match. Have you checked both of
them to ensure they're both v2.0.xxxx?

If all of this is OK, I can't think of any definite issue. If possible, I'd
really suggest you build some other test enviornment to test this.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| X-Tomcat-ID: 56612462
| References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: (e-mail address removed) (Steven Cheng[MSFT])
| Organization: Microsoft
| Date: Wed, 21 Sep 2005 03:10:43 GMT
| Subject: RE: installing global httphandler for custom extension
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Lines: 165
| Path: TK2MSFTNGXA01.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:126001
| NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
|
| Hi Adam,
|
| I've just perfomed some tests on my local Whidbey beta2 environment.
Based
| on my test, I think the problem maybe due to the new global configuration
| hierarchy for ASP.NET application in Whidbey. In the original ASP.NET
1.X,
| the global (machine wide) configuration for ASP.NET application are
stored
| in machine.config. However, in whidbey, most of the machine wide
| configuration for ASP.NET application are stored in a global web.config
| which is also in the
|
| %windir%\Microsoft.NET\Framework\v2.0.xxxxx\CONFIG folder.
|
| I've tested through add the custom HttpHandler in that global web.config
| and also configure the extentions mapping in IIS's website home
directory,
| that works well. So I think you can also try using the global web.config
| file instead of the machine.config to see whether it works.
|
| Hope helps. Thanks,
|
| Steven Cheng
| Microsoft Online Support
|
| Get Secure! www.microsoft.com/security
| (This posting is provided "AS IS", with no warranties, and confers no
| rights.)
|
|
| --------------------
| | X-Tomcat-ID: 24090220
| | References: <[email protected]>
| <[email protected]>
| <[email protected]>
| | MIME-Version: 1.0
| | Content-Type: text/plain
| | Content-Transfer-Encoding: 7bit
| | From: (e-mail address removed) (Steven Cheng[MSFT])
| | Organization: Microsoft
| | Date: Mon, 19 Sep 2005 01:34:09 GMT
| | Subject: RE: installing global httphandler for custom extension
| | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| | Message-ID: <[email protected]>
| | Newsgroups: microsoft.public.dotnet.framework.aspnet
| | Lines: 111
| | Path: TK2MSFTNGXA01.phx.gbl
| | Xref: TK2MSFTNGXA01.phx.gbl
| microsoft.public.dotnet.framework.aspnet:125404
| | NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182
| |
| | OK. I'll do some tests and let you know my results ASAP.
| |
| | Thanks,
| |
| | Steven Cheng
| | Microsoft Online Support
| |
| | Get Secure! www.microsoft.com/security
| | (This posting is provided "AS IS", with no warranties, and confers no
| | rights.)
| | --------------------
| | | Thread-Topic: installing global httphandler for custom extension
| | | thread-index: AcW6xEeLWO/La2xISs6YCk91IRMHUQ==
| | | X-WBNR-Posting-Host: 63.66.47.208
| | | From: "=?Utf-8?B?QWRhbQ==?=" <[email protected]>
| | | References: <[email protected]>
| | <[email protected]>
| | | Subject: RE: installing global httphandler for custom extension
| | | Date: Fri, 16 Sep 2005 06:41:02 -0700
| | | Lines: 82
| | | Message-ID: <[email protected]>
| | | MIME-Version: 1.0
| | | Content-Type: text/plain;
| | | charset="Utf-8"
| | | Content-Transfer-Encoding: 7bit
| | | X-Newsreader: Microsoft CDO for Windows 2000
| | | Content-Class: urn:content-classes:message
| | | Importance: normal
| | | Priority: normal
| | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| | | Newsgroups: microsoft.public.dotnet.framework.aspnet
| | | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| | | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| | | Xref: TK2MSFTNGXA01.phx.gbl
| | microsoft.public.dotnet.framework.aspnet:125122
| | | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| | |
| | | Hi Steven,
| | | Im using windows xp, whidbey, iis5.1, and I've tried the asp.net
| | development
| | | web server as well.
| | | Thanks!
| | | Adam
| | |
| | |
| | | "Steven Cheng[MSFT]" wrote:
| | |
| | | > Hi adamtuliper,
| | | >
| | | > Welcome to ASPNET newsgroup.
| | | > Regarding on the problem you mentioned, it seems a unexpected
| behavior
| | and
| | | > I'll try performing some tests on my side. What's your environment
of
| | the
| | | > problem server? IIS5 /WIN2K or IIS6/WIN2003?
| | | >
| | | > Thanks,
| | | >
| | | > Steven Cheng
| | | > Microsoft Online Support
| | | >
| | | > Get Secure! www.microsoft.com/security
| | | > (This posting is provided "AS IS", with no warranties, and confers
no
| | | > rights.)
| | | > --------------------
| | | > | Thread-Topic: installing global httphandler for custom extension
| | | > | thread-index: AcW6XOdEOEJAjvdqQNaKxOh5cVTmXA==
| | | > | X-WBNR-Posting-Host: 68.163.60.56
| | | > | From: "=?Utf-8?B?QWRhbQ==?=" <[email protected]>
| | | > | Subject: installing global httphandler for custom extension
| | | > | Date: Thu, 15 Sep 2005 18:21:02 -0700
| | | > | Lines: 26
| | | > | Message-ID: <[email protected]>
| | | > | MIME-Version: 1.0
| | | > | Content-Type: text/plain;
| | | > | charset="Utf-8"
| | | > | Content-Transfer-Encoding: 7bit
| | | > | X-Newsreader: Microsoft CDO for Windows 2000
| | | > | Content-Class: urn:content-classes:message
| | | > | Importance: normal
| | | > | Priority: normal
| | | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| | | > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| | | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| | | > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| | | > | Xref: TK2MSFTNGXA01.phx.gbl
| | | > microsoft.public.dotnet.framework.aspnet:125014
| | | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| | | > |
| | | > | Im trying to add an httphandler for all *.sgf file extensions. I
| have
| | | > | developed the handler,
| | | > | 1. installed it into the gac
| | | > | 2. added it to the machine.config:
| | | > |
| | | > | <httpHandlers>
| | | > | <add verb="*" path="*.sgf" type="CustomExtensionHandler,
| | | > | Extenders.CustomExtensionHandler, Version=1.0.0.0,
Culture=neutral,
| | | > | PublicKeyToken=d831d925597c1031" validate="True"/>
| | | > | </httpHandlers>
| | | > | 3. Added .sgf to map to aspnet_isapi.dll
| | | > |
| | | > | The assembly seems to get loaded (If I change the type string to
be
| | | > invalid
| | | > | it will fail upon iisreset - so this seems to work ok).
| | | > |
| | | > | When I try to request localhost/something.sgf I get a 404
returned
| | from
| | | > | asp.net (the script mapping in iis is set to not check for the
| client
| | | > file).
| | | > |
| | | > | If I create a new web app and add this filter to the web.config,
it
| | seems
| | | > to
| | | > | work. I thought adding it to machine.config would allow me to
| create
| | a
| | | > | "global" httphandler that I wouldnt have to add to every single
| | | > web.config,
| | | > | no? But its not working that way. Is it supposed to?
| | | > |
| | | > | Thanks!
| | | > |
| | | > |
| | | > |
| | | >
| | | >
| | |
| |
| |
|
|
 
S

Steven Cheng[MSFT]

Hi Adam,

Not sure whether this is a environment specific problem. Here is my test
steps:

1. creating a simple httphandler as below:
==================
namespace SNHandlers
{
public class HelloHandler : System.Web.IHttpHandler
{
public bool IsReusable
{
get { return false; }
}

public void ProcessRequest(System.Web.HttpContext context)
{
context.Response.Write("Hello " + context.User.Identity.Name);
}
}
}

====================

2. Put the strong-named httphandler assembly into GAC.


3. Then, I first try using following configure entry in the global
web.config file(under
%windir %\Microsoft.NET\Framework\v2.0.50215\CONFIG )

<add verb="*" path="Hello.ashx"
type="SNHandlers.HelloHandler, SNHandlers, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=c2ea789a4e09aa5f" />

since "*.ashx" is the buildin exitention that has been mapped to asp.net
isapi extension.

3. Use http://localhost/Hello.ashx to test the handler so as to confirm
that the handler works well.


4. change the configure entry in the #3 step to below:
<add verb="*" path="*.sgf"
type="SNHandlers.HelloHandler, SNHandlers, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=c2ea789a4e09aa5f" />

and add the extension mapping in IIS's default site as below:

extenstion to
"c:\windows\microsoft.net\framework\v2.0.50215\aspnet_isapi.dll"

verbs to "All verbs"

"Script engine" checked

"Verify that file exists" unchecked


5. Though I don't think IISreset is necessary, but you can still do it. And
restart a IE and test the

http://localhost/Hello.sgf which works well.


That's all my test steps. I don't think there has anything different from
yours. So I still suspect it to be a environment specific issue.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)







--------------------
| Thread-Topic: installing global httphandler for custom extension
| thread-index: AcXCzg2KyUgjEiV9TR6gBgH6v/tlPw==
| X-WBNR-Posting-Host: 63.66.47.208
| From: "=?Utf-8?B?QWRhbQ==?=" <[email protected]>
| References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
| Subject: RE: installing global httphandler for custom extension
| Date: Mon, 26 Sep 2005 12:11:09 -0700
| Lines: 251
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:127171
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hi Steven,
| Im assuming you mean the global web.config in the
| C:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\CONFIG folder. They are
both
| the same version, I've verified.
| Can you tell me the steps (in as much detail as you can) that you took to
do
| this, since something weird is going here then.
| Thanks!
|
|
| --
| http://www.secure-coding.com
| <cheesy>Saving the world one line of code at a time</cheesy>
|
|
| "Steven Cheng[MSFT]" wrote:
|
| > Hi Adam,
| >
| > I've received the screenshots you provided. Seems the configuration in
| > web.config is OK. Really a bit strange. What I haven't got from the
screen
| > is that whether the configuration for the httphandler's config files
and
| > the IIS's ASPNET isapi extension's version match. Have you checked both
of
| > them to ensure they're both v2.0.xxxx?
| >
| > If all of this is OK, I can't think of any definite issue. If possible,
I'd
| > really suggest you build some other test enviornment to test this.
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| > --------------------
| > | X-Tomcat-ID: 56612462
| > | References: <[email protected]>
| > <[email protected]>
| > <[email protected]>
| > <[email protected]>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain
| > | Content-Transfer-Encoding: 7bit
| > | From: (e-mail address removed) (Steven Cheng[MSFT])
| > | Organization: Microsoft
| > | Date: Wed, 21 Sep 2005 03:10:43 GMT
| > | Subject: RE: installing global httphandler for custom extension
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > | Message-ID: <[email protected]>
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | Lines: 165
| > | Path: TK2MSFTNGXA01.phx.gbl
| > | Xref: TK2MSFTNGXA01.phx.gbl
| > microsoft.public.dotnet.framework.aspnet:126001
| > | NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
| > |
| > | Hi Adam,
| > |
| > | I've just perfomed some tests on my local Whidbey beta2 environment.
| > Based
| > | on my test, I think the problem maybe due to the new global
configuration
| > | hierarchy for ASP.NET application in Whidbey. In the original ASP.NET
| > 1.X,
| > | the global (machine wide) configuration for ASP.NET application are
| > stored
| > | in machine.config. However, in whidbey, most of the machine wide
| > | configuration for ASP.NET application are stored in a global
web.config
| > | which is also in the
| > |
| > | %windir%\Microsoft.NET\Framework\v2.0.xxxxx\CONFIG folder.
| > |
| > | I've tested through add the custom HttpHandler in that global
web.config
| > | and also configure the extentions mapping in IIS's website home
| > directory,
| > | that works well. So I think you can also try using the global
web.config
| > | file instead of the machine.config to see whether it works.
| > |
| > | Hope helps. Thanks,
| > |
| > | Steven Cheng
| > | Microsoft Online Support
| > |
| > | Get Secure! www.microsoft.com/security
| > | (This posting is provided "AS IS", with no warranties, and confers no
| > | rights.)
| > |
| > |
| > | --------------------
| > | | X-Tomcat-ID: 24090220
| > | | References: <[email protected]>
| > | <[email protected]>
| > | <[email protected]>
| > | | MIME-Version: 1.0
| > | | Content-Type: text/plain
| > | | Content-Transfer-Encoding: 7bit
| > | | From: (e-mail address removed) (Steven Cheng[MSFT])
| > | | Organization: Microsoft
| > | | Date: Mon, 19 Sep 2005 01:34:09 GMT
| > | | Subject: RE: installing global httphandler for custom extension
| > | | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > | | Message-ID: <[email protected]>
| > | | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | | Lines: 111
| > | | Path: TK2MSFTNGXA01.phx.gbl
| > | | Xref: TK2MSFTNGXA01.phx.gbl
| > | microsoft.public.dotnet.framework.aspnet:125404
| > | | NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182
| > | |
| > | | OK. I'll do some tests and let you know my results ASAP.
| > | |
| > | | Thanks,
| > | |
| > | | Steven Cheng
| > | | Microsoft Online Support
| > | |
| > | | Get Secure! www.microsoft.com/security
| > | | (This posting is provided "AS IS", with no warranties, and confers
no
| > | | rights.)
| > | | --------------------
| > | | | Thread-Topic: installing global httphandler for custom extension
| > | | | thread-index: AcW6xEeLWO/La2xISs6YCk91IRMHUQ==
| > | | | X-WBNR-Posting-Host: 63.66.47.208
| > | | | From: "=?Utf-8?B?QWRhbQ==?=" <[email protected]>
| > | | | References: <[email protected]>
| > | | <[email protected]>
| > | | | Subject: RE: installing global httphandler for custom extension
| > | | | Date: Fri, 16 Sep 2005 06:41:02 -0700
| > | | | Lines: 82
| > | | | Message-ID: <[email protected]>
| > | | | MIME-Version: 1.0
| > | | | Content-Type: text/plain;
| > | | | charset="Utf-8"
| > | | | Content-Transfer-Encoding: 7bit
| > | | | X-Newsreader: Microsoft CDO for Windows 2000
| > | | | Content-Class: urn:content-classes:message
| > | | | Importance: normal
| > | | | Priority: normal
| > | | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | | | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | | | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | | | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | | | Xref: TK2MSFTNGXA01.phx.gbl
| > | | microsoft.public.dotnet.framework.aspnet:125122
| > | | | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > | | |
| > | | | Hi Steven,
| > | | | Im using windows xp, whidbey, iis5.1, and I've tried the asp.net
| > | | development
| > | | | web server as well.
| > | | | Thanks!
| > | | | Adam
| > | | |
| > | | |
| > | | | "Steven Cheng[MSFT]" wrote:
| > | | |
| > | | | > Hi adamtuliper,
| > | | | >
| > | | | > Welcome to ASPNET newsgroup.
| > | | | > Regarding on the problem you mentioned, it seems a unexpected
| > | behavior
| > | | and
| > | | | > I'll try performing some tests on my side. What's your
environment
| > of
| > | | the
| > | | | > problem server? IIS5 /WIN2K or IIS6/WIN2003?
| > | | | >
| > | | | > Thanks,
| > | | | >
| > | | | > Steven Cheng
| > | | | > Microsoft Online Support
| > | | | >
| > | | | > Get Secure! www.microsoft.com/security
| > | | | > (This posting is provided "AS IS", with no warranties, and
confers
| > no
| > | | | > rights.)
| > | | | > --------------------
| > | | | > | Thread-Topic: installing global httphandler for custom
extension
| > | | | > | thread-index: AcW6XOdEOEJAjvdqQNaKxOh5cVTmXA==
| > | | | > | X-WBNR-Posting-Host: 68.163.60.56
| > | | | > | From: "=?Utf-8?B?QWRhbQ==?=" <[email protected]>
| > | | | > | Subject: installing global httphandler for custom extension
| > | | | > | Date: Thu, 15 Sep 2005 18:21:02 -0700
| > | | | > | Lines: 26
| > | | | > | Message-ID:
<[email protected]>
| > | | | > | MIME-Version: 1.0
| > | | | > | Content-Type: text/plain;
| > | | | > | charset="Utf-8"
| > | | | > | Content-Transfer-Encoding: 7bit
| > | | | > | X-Newsreader: Microsoft CDO for Windows 2000
| > | | | > | Content-Class: urn:content-classes:message
| > | | | > | Importance: normal
| > | | | > | Priority: normal
| > | | | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | | | > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | | | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | | | > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | | | > | Xref: TK2MSFTNGXA01.phx.gbl
| > | | | > microsoft.public.dotnet.framework.aspnet:125014
| > | | | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > | | | > |
| > | | | > | Im trying to add an httphandler for all *.sgf file
extensions. I
| > | have
| > | | | > | developed the handler,
| > | | | > | 1. installed it into the gac
| > | | | > | 2. added it to the machine.config:
| > | | | > |
| > | | | > | <httpHandlers>
| > | | | > | <add verb="*" path="*.sgf"
type="CustomExtensionHandler,
| > | | | > | Extenders.CustomExtensionHandler, Version=1.0.0.0,
| > Culture=neutral,
| > | | | > | PublicKeyToken=d831d925597c1031" validate="True"/>
| > | | | > | </httpHandlers>
| > | | | > | 3. Added .sgf to map to aspnet_isapi.dll
| > | | | > |
| > | | | > | The assembly seems to get loaded (If I change the type string
to
| > be
| > | | | > invalid
| > | | | > | it will fail upon iisreset - so this seems to work ok).
| > | | | > |
| > | | | > | When I try to request localhost/something.sgf I get a 404
| > returned
| > | | from
| > | | | > | asp.net (the script mapping in iis is set to not check for
the
| > | client
| > | | | > file).
| > | | | > |
| > | | | > | If I create a new web app and add this filter to the
web.config,
| > it
| > | | seems
| > | | | > to
| > | | | > | work. I thought adding it to machine.config would allow me to
| > | create
| > | | a
| > | | | > | "global" httphandler that I wouldnt have to add to every
single
| > | | | > web.config,
| > | | | > | no? But its not working that way. Is it supposed to?
| > | | | > |
| > | | | > | Thanks!
| > | | | > |
| > | | | > |
| > | | | > |
| > | | | >
| > | | | >
| > | | |
| > | |
| > | |
| > |
| > |
| >
| >
|
 

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,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top