.NET Framework Bookmark and Share   
 index > Windows Communication Foundation > Redirect an ASP request to a WCF Service
 

Redirect an ASP request to a WCF Service

Hi,
I have an existing device which is configured to post a request to an ASP page which in turn calls a VB component to perform operations. We are planning to redesign this in .NET
It is not possible for us to change the url which points to the asp page. We were thinking of writing in WCF. If we were to use Self hosting we could specify the endpoint similar to that of the asp page. Hence all the request made by the device would be routed to this service.
But we were thinking of hosting it in IIS. Now for this I am not to sure what would be the best approach. One way is to disable the existing asp.dll extension in IIS and then write a httpModule to handle asp request. This approach looks a bit complex. Is there any other way. Any thoughts on this?
Thanks
Sai
Sai A
Hi Sai A,

try this: http://blogs.msdn.com/wenlong/archive/2007/09/18/how-to-use-asmx-extension-to-handle-wcf-requests.aspx

HTH
Fabio
Fabio Cozzolino Blogs: http://dotnetside.org/blogs/fabio http://weblogs.asp.net/fabio
  • Marked As Answer bySai A Tuesday, September 22, 2009 3:45 AM
  • Unmarked As Answer bySai A Tuesday, September 22, 2009 4:34 AM
  • Marked As Answer bySai A Tuesday, September 22, 2009 9:04 AM
  •  
Fabio Cozzolino
You could simply try to map *.asp to aspnet_isapi (%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll) and then follow the same settings of the wenlong's post (obviously change *.asmx to *.asp). What IIS version are you using?
Fabio Cozzolino Blogs: http://dotnetside.org/blogs/fabio http://weblogs.asp.net/fabio
  • Marked As Answer bySai A Tuesday, September 22, 2009 9:04 AM
  •  
Fabio Cozzolino
Hi Sai A,

try this: http://blogs.msdn.com/wenlong/archive/2007/09/18/how-to-use-asmx-extension-to-handle-wcf-requests.aspx

HTH
Fabio
Fabio Cozzolino Blogs: http://dotnetside.org/blogs/fabio http://weblogs.asp.net/fabio
  • Marked As Answer bySai A Tuesday, September 22, 2009 3:45 AM
  • Unmarked As Answer bySai A Tuesday, September 22, 2009 4:34 AM
  • Marked As Answer bySai A Tuesday, September 22, 2009 9:04 AM
  •  
Fabio Cozzolino
Hi Fabio,
This would work for a .NET based extension. But in my case it is an asp extension. Since most of the requests would get handled by ASP.dll it would not reach the ASP.NET ISAPI. I dont think the approach would work in this case
-Sai
Sai A
You could simply try to map *.asp to aspnet_isapi (%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll) and then follow the same settings of the wenlong's post (obviously change *.asmx to *.asp). What IIS version are you using?
Fabio Cozzolino Blogs: http://dotnetside.org/blogs/fabio http://weblogs.asp.net/fabio
  • Marked As Answer bySai A Tuesday, September 22, 2009 9:04 AM
  •  
Fabio Cozzolino
Well the Servers are Windows 2003 which I guess has IIS 6. i guess a redirection of asp extensions to aspnet_isapi can be done. Let me try it out. Thanks for the direction
Sai A

You can use google to search for other answers

Custom Search

More Threads

• [Help] Identity check failed for outgoing message
• How to identify an Out of Memory exception from service side ?
• Signed Request & Unsigned Response using WCF
• caching of security sensitive data in wcf service
• maxReceivedMessageSize and maxStringContentLength
• Returning Datatable from WCF service to clent
• why can't the secure conversation be turned off?
• Trouble with Serialization an object.
• Sharing WCF proxy objects
• SvcUtil and https