Little harvest in .NET Remoting

xiaoxiao2021-03-06  45

For nearly half a year, almost all copy paste, today I suddenly configure the settings in .NET Remoting, I have made a half day old error, and finally I found this article, I understand a little. Internet Information Services (IIS) Carrying Server Activated or client activation objects, usually registering these objects in the web.config file; or register them in the application configuration file when carrying these objects directly. Place all objects carried in the element.

When publishing a server-activated () object, you must indicate that the object is a SingleCall object or a Singleton object, the type of object, and the endpoint that can access the object. When publishing a client activation () object, you must only indicate that the type of the object is indicated. The following example shows how to register the server-side objects and client activation objects for host applications.

Wellknown

Mode = "SingleCall"

Type = "mytype, myassembly"

Objecturi = "mytype.soap"

/>

TYPE = "MyActivatedType, Typeassembly"

/>

The TYPE attribute in the tag indicates the full type name and assembly name of the object, which is the same as it appears in the tag.

Configuring the type of server activation with IIS

If you want to carry a remote service in the Internet Information Services to use the benefits provided by IIS, you must change your configuration file. You can configure IIS using the web.config file to automatically handle your type request; or you can use the Application_Start handler to load your profile using the Application_Start handler in the global.asax file by using RemotingConfiguration.configure and delivering the name of the configuration file. In both cases:

The application name is specified without using the Name property of the tag. The virtual directory you created for the remote processing type will be the application name of the client to your type. The port property of the tag is not in the tag specifies a port. If IIS creates a new thread to provide a number of requests, you can create a new channel, but will trigger an exception because the port has been used by the original channel. Instead, you should specify the port to use in the Internet Service Manager. The .NET Remote Processing Service will handle any requests for your available types of remote processing. Example

< OpenMeisterenterprise.Invocation> > - = h = h h h = h h h h h h h h h h タ h タ タ h h h h h h h h h タ タ h h h h タ h h h h h RVER / "/>

/ oMeisterenterprise.invocation>Web.config type, that is, the name, red represents the Assembly name, is the name of the Assembly in an engineering property, If two classes are under the same project, then their assembly parts are the same, different lies in their class name. What is used in app.config is their class name

转载请注明原文地址:https://www.9cbs.com/read-80292.html

New Post(0)