Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » Hosting » Answers   (RSS)

Acting on Open

How do I run a custom event once when the service is first started? The easiest way to execute some custom code when a service is started is to hook the service's Open method. Although the Open method has two different moments in time that you might be
Posted by Nicholas Allen | 1 Comments
Filed under: , ,

You Are Here

Inside of a service method, how do I know where the message was delivered? Without defining what distinguishes a location it's hard to explain where 'here' is. I've got a few guesses though based on the most common variations of this question: OperationContext.Current.IncomingMessageHeaders.To

Hosting Identity

How can I run a service operation hosted in IIS using a specific identity? There are two ways for your operation to be running using a specific identity: start off running under that identity; or, start off running under a different identity and change
Posted by Nicholas Allen | 1 Comments
Filed under: , , ,

Runtime Limits in IIS

Does the IIS HTTP runtime configuration affect a WCF application? Yes, when the application is using IIS to host its HTTP endpoints. A WCF application that lives in IIS is an IIS application as well, even if you aren't explicitly using ASP.NET compatibility
Posted by Nicholas Allen | 2 Comments
Filed under: , , ,

Detecting ASP.NET Compatibility

How can I find out whether my service is running in ASP.NET compatibility mode? Why do you need to detect at runtime whether you're running in compatibility mode? As I've said before, compatibility mode is something that the odd and rare service takes
Posted by Nicholas Allen | 1 Comments
Filed under: , ,

Server.MapPath

How do I use % Feature X% from ASP.NET in a WCF service? ASP.NET has an HTTP-centric application model with many great features specialized for web development in IIS. WCF is transport and host agnostic. Out of the box, WCF supports most of the features
Posted by Nicholas Allen | 8 Comments
Filed under: , , ,

Multiple Web Site Bindings

I've configured my web site in IIS with multiple bindings but my web service can no longer run because it refuses to start if there are multiple base addresses defined for the same URI scheme. How can I use the same configuration for both my web service

Configuring TCP Activation from the Command Line

Can I configure non-HTTP web service activation from the command line? Yes, and you don't need any special tools if you're already familiar with configuring IIS from the command line. I've already talked about how to configure a new web site or application
Posted by Nicholas Allen | 4 Comments
Filed under: , , ,

Starting a Hosted Service

How do I run some code during service start time if I'm using an IIS hosted service? In a normal executable or NT service, your code is responsible for creating the ServiceHost that contains the web services. In IIS, it is the platform activation code
Posted by Nicholas Allen | 2 Comments
Filed under: , ,

Preventing Anonymous Access

How do I prevent clients from accessing my service anonymously? I've changed the settings in IIS from Anonymous Access to Integrated Windows Authentication. However, now I'm getting the error message: "Security settings for this service require 'Anonymous'

Mapping to a VDir

When I run my non-HTTP service in IIS, I get an error message that the protocol is not supported. How do I add non-HTTP support to my VDir? This is a two step process because the web site controls the list of available protocols while the application
Posted by Nicholas Allen | 5 Comments
Filed under: , ,

Keeping Traces Up to Date

I've enabled tracing in my application, but I don't see entries in the trace log show up until I restart IIS. How can I get trace entries to appear right away? Like many other output files, traces are buffered to reduce the number of times that the disk
Posted by Nicholas Allen | 2 Comments
Filed under: , ,

Securing Custom Headers, Version 2

Last time we were looking at the problem of securing a dynamically generated message header . We saw one solution to that problem, which was to add a behavior that updated the protection level for the desired message part. That solution is quite simple

Restarting a Failed Service

I have an application hosted inside a Windows service that needs to be continuously running. Occasionally the application service host will fail and I have to restart the service. How can I automatically restart a failed service host? You may not find
Posted by Nicholas Allen | 4 Comments
Filed under: , ,

Replacing an Existing ASMX Service with WCF

I have an existing ASMX service that I'm replacing with a WCF service. The replacement service works, but some of the clients point to a page with a service.asmx address. IIS gives me an error if I name my WCF service service.asmx. How do I get this to
Posted by Nicholas Allen | 6 Comments
Filed under: , ,
More Posts Next page »
 
Page view tracker