473,396 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

.net remoting config

I have this sample configuration file for a remoting app:

<service>
<wellknown mode="SingleCall"
type="Microsoft.Samples.Runtime.Remoting.Security. Sample.Server.Foo,
Microsoft.Samples.Runtime.Remoting.Security.Sample .Server"
objectUri="Foo.rem" />
</service>

<channels>
<channel ref="http">
<serverProviders>
<provider type="Microsoft.Samples.Runtime.Remoting.Security.
SecurityServerChannelSinkProvider,
Microsoft.Samples.Runtime.Remoting.Security"
securityPackage="negotiate" />
<formatter ref="soap" />
</serverProviders>
</channel>
</channels>

But what i want is the equivalent of this done programatically
how can this be done exactly like the config file but programmticaly?

pls help

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 15 '05 #1
1 3948
You have to build up a chain so I guess it would look something like this:

IDictionary props = new Hashtable();
props["name"] = "MyHttpChannel";

SoapServerFormatterSinkProvider soap = new
SoapServerFormatterSinkProvider();
Microsoft.Samples.Runtime.Remoting.Security.Securi tyServerChannelSinkProvide
r security =
new
Microsoft.Samples.Runtime.Remoting.Security.Securi tyServerChannelSinkProvide
r(/*may be some params here*/);

soap.NextSink = security;
HttpChannel channel = new HttpChannel(
props,
null,
soap);
ChannelServices.RegisterChannel(channel);

Hope this helps,

Colin
--
Colin Beales - Microsoft UK

This posting is provided "AS IS" with no warranties, and confers no rights

"Paul Fi" <na*******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
I have this sample configuration file for a remoting app:

<service>
<wellknown mode="SingleCall"
type="Microsoft.Samples.Runtime.Remoting.Security. Sample.Server.Foo,
Microsoft.Samples.Runtime.Remoting.Security.Sample .Server"
objectUri="Foo.rem" />
</service>

<channels>
<channel ref="http">
<serverProviders>
<provider type="Microsoft.Samples.Runtime.Remoting.Security.
SecurityServerChannelSinkProvider,
Microsoft.Samples.Runtime.Remoting.Security"
securityPackage="negotiate" />
<formatter ref="soap" />
</serverProviders>
</channel>
</channels>

But what i want is the equivalent of this done programatically
how can this be done exactly like the config file but programmticaly?

pls help

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Sean Newton | last post by:
I am absolutely bewildered by now by the Microsoft.Samples SSPI and Security assemblies. I've been trying to set these up in a very straightforward harness in the way that I'd like to be able to...
15
by: anders | last post by:
Hi! I have a config file that looks like this: <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.runtime.remoting> <application> <service> <wellknown mode="SingleCall"...
0
by: Martijn Damen | last post by:
Hi, At the moment I am trying to develop an application that uses another app over .net remoting and having some problems with it (ok, that is ofcourse why I am here), hope somebody can shine a...
0
by: MS Newsgroups | last post by:
Hi, I am trying to get my head around remoting. I have managed to configure the samples on MSDN and that is working fine. I have now tried to build my own remoting application to test this and i...
15
by: Ron L | last post by:
We are working on a distributed VB.Net application which will access a SQL database located on a known server. Each client will run on the user's local machine. To implement this, we are trying...
9
by: Nak | last post by:
Hi there, I have been messing around with remoting in an attempt to create a "shared application" as mentioned in another thread by that name. I have created a singleton object just like the...
2
by: gregory_may | last post by:
I am using remoting via TCPChannels. Sometimes, I get this message: "Server encountered an internal error. For more information, turn on customErrors in the server's .config file." I don't...
0
by: Dave A | last post by:
When I register a remoting service programmatically things work great but when I register the service using a config file I get the error "Requested Service not found" when invoking a server...
6
by: Palvinder Singh | last post by:
Hello google group peeps, I am new to remoting, but have a grasp of it. I am trying to create a server/client application, which will be deployed over an intranet. I have upwards of five...
2
by: erbilkonuk | last post by:
Hi, I am very new to .NET Remoting and I try to run a simple program to subscribe to an event raised by Remoting Class. The Remoting Server initiates an instance of Remoting Class as Singleton /...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.