How to do this configuration programatically
-
<?xml version="1.0" encoding="utf-8" ?> <configuration> <system.runtime.remoting> <application name="AuthorizationApp"> <service> <wellknown mode="SingleCall" type="Server.SampleService, Server" objectUri="Server.rem"/> </service> <channels> <channel ref="tcp" port="8001" secure="true" impersonate="true" authorizationModule="Server.AuthorizationModule,Server"/> </channels> </application> </system.runtime.remoting> </configuration> how to set the properties "impersonation" and "authorizationModule" inside my program .. im not using the configuration files.
-
<?xml version="1.0" encoding="utf-8" ?> <configuration> <system.runtime.remoting> <application name="AuthorizationApp"> <service> <wellknown mode="SingleCall" type="Server.SampleService, Server" objectUri="Server.rem"/> </service> <channels> <channel ref="tcp" port="8001" secure="true" impersonate="true" authorizationModule="Server.AuthorizationModule,Server"/> </channels> </application> </system.runtime.remoting> </configuration> how to set the properties "impersonation" and "authorizationModule" inside my program .. im not using the configuration files.
It's an XML document, so you could presumably use an XmlDocument, and the DOM.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
<?xml version="1.0" encoding="utf-8" ?> <configuration> <system.runtime.remoting> <application name="AuthorizationApp"> <service> <wellknown mode="SingleCall" type="Server.SampleService, Server" objectUri="Server.rem"/> </service> <channels> <channel ref="tcp" port="8001" secure="true" impersonate="true" authorizationModule="Server.AuthorizationModule,Server"/> </channels> </application> </system.runtime.remoting> </configuration> how to set the properties "impersonation" and "authorizationModule" inside my program .. im not using the configuration files.
-
<?xml version="1.0" encoding="utf-8" ?> <configuration> <system.runtime.remoting> <application name="AuthorizationApp"> <service> <wellknown mode="SingleCall" type="Server.SampleService, Server" objectUri="Server.rem"/> </service> <channels> <channel ref="tcp" port="8001" secure="true" impersonate="true" authorizationModule="Server.AuthorizationModule,Server"/> </channels> </application> </system.runtime.remoting> </configuration> how to set the properties "impersonation" and "authorizationModule" inside my program .. im not using the configuration files.
-
try the below link it may help http://msdn.microsoft.com/en-us/library/59hafwyt(VS.80).aspx[^]
If It Helps Click It as Answer
Hi, I have aready seen this .. but didn't post it here.. thanks for doing it I got my answer on this link only. I am putting my code for others reference static void Main(string[] args) { //TcpChannel channel = new TcpChannel(8080); IDictionary props = (IDictionary) new Hashtable(); props.Add("port", "8080"); props.Add("secure", "true"); //props.Add("impersonate", "true"); //props.Add("authorizationModule", "AuthorizeUser"); BinaryClientFormatterSinkProvider cp = new BinaryClientFormatterSinkProvider(); BinaryServerFormatterSinkProvider sp = new BinaryServerFormatterSinkProvider(); IChannel chan = new TcpChannel(props,cp,sp); ChannelServices.RegisterChannel(chan,true); RemotingConfiguration.RegisterWellKnownServiceType(typeof(ns_registeruser.cls_registeruser), "ApplicationMain", WellKnownObjectMode.Singleton); Console.WriteLine("Server Started .. "); Console.ReadLine();
-
<?xml version="1.0" encoding="utf-8" ?> <configuration> <system.runtime.remoting> <application name="AuthorizationApp"> <service> <wellknown mode="SingleCall" type="Server.SampleService, Server" objectUri="Server.rem"/> </service> <channels> <channel ref="tcp" port="8001" secure="true" impersonate="true" authorizationModule="Server.AuthorizationModule,Server"/> </channels> </application> </system.runtime.remoting> </configuration> how to set the properties "impersonation" and "authorizationModule" inside my program .. im not using the configuration files.