473,513 Members | 3,949 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Get IHttpHandler in WCF service

Hello,

I want to get the IHttpHandler from a svc service.
With old asmx webservices, I get it using
WebServiceHandlerFactory.GetHandler .

How can I get IHttpHandler in WCF running in serviceHostingEnvironment :
aspNetCompatibilityEnabled="true" ?

Thanks in advance for your help.
Jun 27 '08 #1
3 1939
OK; *why* do you want the handler? What do you want to do?

Most things you can do by looking at the WCF pipeline ("inspectors",
etc). Yes, cmopatibility mode is an option, but I wouldn't use it
unless I had to - WCF doesn't always run over http or via ASP.NET...

Marc
Jun 27 '08 #2
Marc,

I only want to get the Handler as I was doing in an old asmx webservice.
Jun 27 '08 #3
I only want to get the Handler as I was doing in an old asmx webservice.

Yes... but why; what do you want to do with the handler? The point is
that there may be different (but more than adequate) ways of doing
this with WCF. Quite simply, WCF isn't actually part of the ASP.NET
pipeline, and handlers are an ASP.NET feature. If you happen to be
running in ASP.NET, you *might* be able to get the handler (not sure)
via compatibility mode, but I would still consider this a hacky
solution, and it adds unnecessary overhead (the ASP.NET shims) to the
WCF stack.

So if you can tell me what you actually want to do, I might be able to
suggest an appropriate WCF way to do this...

Marc
Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1450
by: lapin | last post by:
I'm trying to get access to session variables from an IHttpHandler class. In several places I've seen the solution posted as in this message: >If you define your own custom HttpHandler, you need to >import the >System.Web.SessionState namespace, you >need it to implement the IRequiresSessionState interface >if you want it to >have a...
1
3065
by: lapin | last post by:
I'm trying to get access to session variables from an IHttpHandler class. In several places I've seen the solution posted as in this message: >If you define your own custom HttpHandler, you need to >import the >System.Web.SessionState namespace, you >need it to implement the IRequiresSessionState interface
13
4283
by: Sky Sigal | last post by:
I have created an IHttpHandler that waits for uploads as attachments for a webmail interface, and saves it to a directory that is defined in config.xml. My question is the following: assuming that this is suppossed to end up as a component for others to use, and therefore I do NOT have access to their global.cs::Session_End() how do I...
5
1992
by: vimakefile | last post by:
I'd like to have the concept of a Page (different code-behind file for each url, session state, etc.) but be able to specify my own custom HTTP payload. (I don't want to use any Asp.Net forms, controls, etc.) (Happens to be binary - but although I need to use HTTP, it's not going to a browser.) With IHttpHandler I lose Url->page mapping and...
0
1050
by: Stu | last post by:
Hi, I am trying to write a basic httphandler to 'fake' that pages actually exist. I have copied the code below from various sites - but the line 'Implements IHttpHandler' reports an error "type 'IHttpHandler' is not defined". Any ideas what am I doing wrong? Thanks in advance,
24
2726
by: John Rivers | last post by:
ASPX which means ASPX pages, the code-behind concept, User Controls, Web Controls etc. is very poorly designed and makes it extremely hard to develop professional quality web applications. ASPX is Microsoft's attempt to "dumb down" web application development to help unskilled developers such as web design agencies achieve some results. ...
1
4300
by: Aartware | last post by:
I've read all the items about the IHttpHandler and the session-object and I see nothing wrong with my code, but still I have no session object. This is my code: Imports System Imports System.Data Imports System.Web imports System.Web.SessionState Imports System.Web.UI
1
1442
by: =?Utf-8?B?QWxwaGFwYWdl?= | last post by:
Hello, I want to get the IHttpHandler from a svc service. With old asmx webservices, I get it using WebServiceHandlerFactory.GetHandler . How can I get IHttpHandler in WCF running in serviceHostingEnvironment : aspNetCompatibilityEnabled="true" ? Thanks in advance for your help.
0
1187
by: shapper | last post by:
Hello, I am using an ASP.NET 3.5 SP1 and a while ago I created an IHttpHandler that transforms a Sitemap XML file to a compatible Google Sitemap (https://www.google.com/webmasters/tools/docs/en/ protocol.html#sitemapXMLExample) XML file using a XSD file. Now I need to do something similar but I need to create the XML file from scratch...
0
7270
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7178
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7563
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7125
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5703
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5102
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3252
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3239
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1612
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.