well, When you use Internet Information Services (IIS) to host your remote type, you cannot programmatically configure the remoting system for your remotable type directly in the host process, because the host application domains are created by IIS and ASP.NET. However, you can use the Global.asax file to do much of the same programmatic configuration that you can do in other types of application domains. To use a configuration file to configure remoting when IIS is your host process, you must do the following:
* Place your configuration information in the Web.config file in the IIS virtual directory that you have chosen to use.
* Place your remotable type implementation in the \bin directory (or use the Global Assembly Cache tool (Gacutil.exe) to place it in the global assembly cache).
In addition, you cannot do any of the following:
* Specify an application name when hosting in IIS. The name of the virtual directory becomes your application name.
* Use the <debug> element in a Web.config file that is used for .NET remoting configuration.
* Use any channel other than the HttpChannel.
* Use the Web.config file and the <client> element to configure your client Web application automatically. If you want to use IIS as a remoting client, you must call RemotingConfiguration.Configur e in the Application_Start method in the Global.asax file.
Sub Application_Start()
Dim props = New Hashtable() As IDictionary
props("name") = "MyChannel"
props("priority") = "100"
' Nothing entries specify the default formatters.
Dim channel As New HttpChannel( _
props, _
Nothing, _
Nothing _
)
ChannelServices.Register Channe l(channel)
Dim WKSTE As New WellKnownServiceTypeEntry( _
GetType(ServiceClass), _
"HttpService", _
WellKnownObjectMode.SingleC all
)
RemotingConfiguration. Register WellKnownServiceType(WKSTE)
E nd Sub
Answered by
Romi
, an ibibo Master,
at
11:11 AM on July 03, 2008