United States - English
Argentina (Español)
Australia (English)
Brasil (Português)
Canada (English)
Canada (Français)
中国 (简体中文)
Colombia (Español)
Deutschland (Deutsch)
España (Español)
France (Français)
India (English)
Italia (Italiano)
日本 (日本語)
México (Español)
Perú (Español)
Россия (Pусский)
United Kingdom (English)
United States (English)
More...
Microsoft.com
Product Families
Office
Windows
Windows Server System
Windows Mobile
Developer Tools
Business Solutions
Games & Xbox
MSN
Resources
Microsoft Update
Office Update
Download Center
Help & Support
Security
Volume Licensing
About Microsoft
Company Information
Investor Relations
PressPass for journalists
Popular Places
MSDN (Developers)
TechNet (IT Pros)
Microsoft At Home
Microsoft At Work
Business & Industry
Microsoft partners
Microsoft hardware
Product catalog
Mactopia
Microsoft.com site map
Popular Searches
Templates
ActiveSync
Clip art
Popular Downloads
Windows Defender Beta 2
DirectX End-User Runtime
More popular downloads
Welcome
|
Sign in
Search MSDN
Search Microsoft.com
Live Search
Developer Centers
MSDN Home
.NET Framework Developer Center
Home
Library
Learn
Downloads
Support
Community
Printer Friendly Version
Send
Add Content...
Click to Rate and Give Feedback
Give feedback on this content
MSDN Library
MSDN
Please Wait
MSDN Library
Please Wait
.NET Development
Please Wait
.NET Framework 3.5
Please Wait
.NET Framework Class Library
Please Wait
System.ServiceModel Namespace
Please Wait
ServiceHost Class
Please Wait
ServiceHost Methods
Please Wait
Collapse All
Language Filter
Visual Basic
C#
C++
J#
JScript
XAML
Members Filter
Include Protected Members
Include Inherited Members
Frameworks Filter
Include .NET Framework Members
Include .NET Compact Framework Members
Include XNA Framework Members
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5
Other versions are also available for the following:
.NET Framework 3.0
.NET Framework Class Library
ServiceHost Methods
Updated: November 2007
The
ServiceHost
type exposes the following members.
Methods
Name
Description
Abort
Causes a communication object to transition immediately from its current state into the closing state.
(Inherited from
CommunicationObject
.)
AddBaseAddress
Adds a base address to the service host.
(Inherited from
ServiceHostBase
.)
AddServiceEndpoint
Overloaded.
Adds a service endpoint to the hosted service.
ApplyConfiguration
Loads the service description information from the configuration file and applies it to the runtime being constructed.
(Inherited from
ServiceHostBase
.)
BeginClose
Overloaded.
BeginOpen
Overloaded.
Close
Overloaded.
CreateDescription
Creates a description of the service hosted.
(Overrides
ServiceHostBase
.
.
::
.
CreateDescription(IDictionary
<
(Of
<
(
String, ContractDescription
>
)
>
)
%
)
.)
EndClose
Completes an asynchronous operation to close a communication object.
(Inherited from
CommunicationObject
.)
EndOpen
Completes an asynchronous operation to open a communication object.
(Inherited from
CommunicationObject
.)
Equals
Determines whether the specified
Object
is equal to the current
Object
.
(Inherited from
Object
.)
Fault
Causes a communication object to transition from its current state into the faulted state.
(Inherited from
CommunicationObject
.)
Finalize
Allows an
Object
to attempt to free resources and perform other cleanup operations before the
Object
is reclaimed by garbage collection.
(Inherited from
Object
.)
GetCommunicationObjectType
Gets the type of communication object.
(Inherited from
CommunicationObject
.)
GetHashCode
Serves as a hash function for a particular type.
(Inherited from
Object
.)
GetType
Gets the
Type
of the current instance.
(Inherited from
Object
.)
IncrementManualFlowControlLimit
Increases the limit on the flow rate of messages to the hosted service by a specified increment.
(Inherited from
ServiceHostBase
.)
InitializeDescription
Overloaded.
Initializes a description of the service hosted based on its type or instance.
InitializeRuntime
Initializes the runtime for the service host.
(Inherited from
ServiceHostBase
.)
LoadConfigurationSection
Loads the service element from the configuration file of the hosted service.
(Inherited from
ServiceHostBase
.)
MemberwiseClone
Creates a shallow copy of the current
Object
.
(Inherited from
Object
.)
OnAbort
Aborts the service.
(Inherited from
ServiceHostBase
.)
OnBeginClose
Begins an asynchronous operation invoked on the close of the service host.
(Inherited from
ServiceHostBase
.)
OnBeginOpen
Begins an asynchronous operation invoked on the opening of the service host.
(Inherited from
ServiceHostBase
.)
OnClose
Closes down the hosted service, including their channel dispatchers and associated instance contexts and listeners.
(Inherited from
ServiceHostBase
.)
OnClosed
Disposes of disposable services that are being hosted when the service host is closed.
(Overrides
CommunicationObject
.
.
::
.
OnClosed
()
()
()
.)
OnClosing
Invoked during the transition of a communication object into the closing state.
(Inherited from
CommunicationObject
.)
OnEndClose
Completes an asynchronous operation invoked on the closing of the service host.
(Inherited from
ServiceHostBase
.)
OnEndOpen
Completes an asynchronous operation invoked on the opening of the service host.
(Inherited from
ServiceHostBase
.)
OnFaulted
Inserts processing on a communication object after it transitions to the faulted state due to the invocation of a synchronous fault operation.
(Inherited from
CommunicationObject
.)
OnOpen
Opens the channel dispatchers.
(Inherited from
ServiceHostBase
.)
OnOpened
Gets the service credentials and service authorization behavior for the hosted service.
(Inherited from
ServiceHostBase
.)
OnOpening
Invoked during the transition of a communication object into the opening state.
(Inherited from
CommunicationObject
.)
Open
Overloaded.
ReleasePerformanceCounters
Releases the service and channel dispatcher performance counters for the hosted service.
(Inherited from
ServiceHostBase
.)
ThrowIfDisposed
Throws an exception if the communication object is disposed.
(Inherited from
CommunicationObject
.)
ThrowIfDisposedOrImmutable
Throws an exception if the communication object the
State
property is not set to the
Created
state.
(Inherited from
CommunicationObject
.)
ThrowIfDisposedOrNotOpen
Throws an exception if the communication object is not in the
Opened
state.
(Inherited from
CommunicationObject
.)
ToString
Returns a
String
that represents the current
Object
.
(Inherited from
Object
.)
Top
Explicit Interface Implementations
Name
Description
IDisposable
.
.
::
.
Dispose
Closes the service host.
(Inherited from
ServiceHostBase
.)
Top
See Also
Reference
ServiceHost Class
System.ServiceModel Namespace
Tags
:
Add a tag
Add
Cancel
Flag as
ContentBug
Community Content
Add new content
Annotations
|
Edit
Tags
:
Add a tag
Add
Cancel
Flag as
ContentBug
Manage Your Profile
|
Legal
|
Contact Us
|
MSDN Flash Newsletter
© 2008 Microsoft Corporation. All rights reserved.
Terms of Use
|
Trademarks
|
Privacy Statement