Google Groups Home
Help | Sign in
Selectively override AjaxPro HttpHandler
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post will appear after it is approved by moderators
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Mike  
View profile
 More options Sep 29 2008, 10:49 am
From: Mike <mikeva...@gmail.com>
Date: Mon, 29 Sep 2008 07:49:40 -0700 (PDT)
Local: Mon, Sep 29 2008 10:49 am
Subject: Selectively override AjaxPro HttpHandler
I am using AjaxPro to call many web services from Javascript code. As
such, I have the following httpHandler mapping in my web.config:

<add verb="POST,GET" path="ajaxpro/*.ashx"
type="AjaxPro.AjaxHandlerFactory, AjaxPro.2"/>

However, one of these web services fires up a VB6 STA COM component.
This is fine when I call the web service outside of AjaxPro because I
have a HTTP handler "wrapper" that piggy-backs onto the ASPX Page
AspCompat functionality (see http://msdn.microsoft.com/msdnmag/issues/06/10/WickedCode/).
My web.config has this line in it:

<add verb="POST,GET" path="VB6WebSvc.asmx" type="MyHandler,
MyAssembly"/>

But I need to do something similar when I call this web service from
AjaxPro. Therefore I has defined a further handler "wrapper" which
invokes the AjaxPro handler is a similar way to the WickedCode article
above. Now what I really want is to configure my web.config as
follows, effectively so AjaxPro calls my web service through my STA
thread wrapper handler:

<add verb="POST,GET" path="ajaxpro/*.ashx"
type="AjaxPro.AjaxHandlerFactory, AjaxPro.2"/>
<add verb="POST,GET" path="ajaxpro/*VB6WebSvc*.ashx" type="MyHandler,
MyAssembly"/>

but the second line doesn't get picked up.

Does anyone know if there is a way to configure this?

Thanks in advance,

Mike.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike  
View profile
 More options Oct 8 2008, 5:11 am
From: Mike <mikeva...@gmail.com>
Date: Wed, 8 Oct 2008 02:11:13 -0700 (PDT)
Local: Wed, Oct 8 2008 5:11 am
Subject: Re: Selectively override AjaxPro HttpHandler
To answer my own question, I got around this configuration restriction
by doing the following:

- hold a list of web service urls in web.config which need to use my
AspCompat AjaxPro handler
- creating my own IHttpHandlerFactory which reads this list and
GetHandler() determines whether to return my AspCompat AjaxPro handler
or call the default AjaxProHandlerFactory
- changing the http handler configuration in web.config to use my new
factory

Hope this helps someone else.

Mike.

On Sep 29, 3:49 pm, Mike <mikeva...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google