473,700 Members | 2,528 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Remoting Question dealing with Microsoft.Sampl es...SSPI,Secur ity

I am absolutely bewildered by now by the Microsoft.Sampl es 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 use them. No IIS. Use TCP,
binary. Standard server example with a console host and console client. .NET
1.1, windows XP. (I tried posting to the remoting newsgroup, no answers in
the last couple days, trying here in hopes that more people watch this

I've looked all over, trying to figure out what is going on. I've come
across people reporting similar issues, but no resolution ever seems to be
posted in response. The Host seems to start up fine and be listening. The
constructor for the server object even seems to be called ok. The code for a
particular method/property even seems to execute. I've traced the error into
the ChannelSinkCall Context.Deseria lizeStringToCha nnelSinkCallCon text shown
in the dump. For some reason, at some point, a call to
nextSink.Proces sMessage returns responseHeaders with no
"ChannelSinkCal lContext" header and this in turn passes on to
DeserializeStri ngToChannelSink CallContext as a null which blows up when
Convert.FromBas e64String tries to operate on it.

I've tried everything I can think of in the config files. any suggestions?
If I comment out the provider entities in the below configs everything runs
great. as soon as i try to enable the Security assembly, it blows chunks.
Does it not work with Framework 1.1? XP?

Everytime I try to call a method or property I end up with:

Unhandled Exception: System.Argument NullException: Value cannot be null.
Parameter name: InString

Server stack trace:
at System.Convert. FromBase64Strin g(String s)
Microsoft.Sampl es.Runtime.Remo ting.Security.C hannelSinkCallC ontext.Deserial i
zeStringToChann elSinkCallConte xt(String serializedGraph ) in
d:\code\msremot e\security\secu ritysink.cs:lin e 404
Microsoft.Sampl es.Runtime.Remo ting.Security.S ecurityChannelS ink.SendMessage T
oServerSink(Cli entContext clientContext, IClientChannelS ink nextSink,
ChannelSinkCall Context channelSinkCall Context, IMessage msg,
ITransportHeade rs requestHeaders, Stream requestStream,
ITransportHeade rs&responseHead ers, Stream& responseStream) in
d:\code\msremot e\security\secu ritysink.cs:lin e 643
Microsoft.Sampl es.Runtime.Remo ting.Security.S ecurityClientCh annelSink.Proce s
sMessage(IMessa ge msg, ITransportHeade rs requestHeaders,
StreamrequestSt ream, ITransportHeade rs& responseHeaders , Stream&
in d:\code\msremot e\security\secu ritysink.cs:lin e 940
System.Runtime. Remoting.Channe ls.BinaryClient FormatterSink.S yncProcessMessa g
e(IMessage msg)

Exception rethrown at [0]:
System.Runtime. Remoting.Proxie s.RealProxy.Han dleReturnMessag e(IMessagereqMs g
, IMessage retMsg)
System.Runtime. Remoting.Proxie s.RealProxy.Pri vateInvoke(Mess ageData&msgData ,
Int32 type)
at Server.ServerEx .DoNothing() in
d:\code\msremot e\server\server ex.cs:line 20
at Client.ClientEx .Main() in D:\Code\MSRemot e\Client\Client Ex.cs:line 13

<!-- Server Config -->
<configuratio n>
<system.runtime .remoting>
<debug loadTypes="true " />


<channel ref="tcp" port="8080">
<serverProvider s>
<formatter ref="binary" typeFilterLevel ="Full" />
type="Microsoft .Samples.Runtim e.Remoting.Secu rity.SecuritySe rverChannelSink P
rovider, Microsoft.Sampl es.Runtime.Remo ting.Security"
securityPackage ="ntlm" authenticationL evel="call" />
</serverProviders >

<wellknown mode="Singleton " type="Server.Se rverEx, Server"
objectUri="Serv er.rem"/>


</system.runtime. remoting>
<!-- Client Config -->
<configuratio n>
<system.runtime .remoting>
<debug loadTypes="true " />


<channel ref="tcp">
<clientProvider s>
<formatter ref="binary" />
type="Microsoft .Samples.Runtim e.Remoting.Secu rity.SecurityCl ientChannelSink P
rovider, Microsoft.Sampl es.Runtime.Remo ting.Security"
securityPackage ="ntlm" impersonationLe vel="impersonat e"
authenticationL evel="call" />
</clientProviders >

<wellknown type="Server.Se rverEx, Server"


</system.runtime. remoting>
// server code
using System;
using System.Diagnost ics;
namespace Server {
public class ServerEx : MarshalByRefObj ect {

private DateTime _dt = DateTime.Now;

public ServerEx() {
Debug.WriteLine ("constructor") ;

public void DoNothing() {
Debug.WriteLine ("did nothing");

public DateTime CreateTime {
get {
return _dt;
// host code
using System;
using System.Runtime. Remoting;
namespace Host {
public class HostEx {
public static void Main(){
RemotingConfigu ration.Configur e("Host.exe.con fig");
Console.WriteLi ne("Listening for requests. Press Enter to exit...");
Console.ReadLin e();
//client code
using System;
using System.Runtime. Remoting;
namespace Client {
public class ClientEx {
public static void Main(){
RemotingConfigu ration.Configur e("Client.exe.c onfig");
Server.ServerEx remoteObject = new Server.ServerEx ();
remoteObject.Do Nothing();
remoteObject.Do Nothing();
remoteObject.Do Nothing();
Console.WriteLi ne(remoteObject .CreateTime);
Console.ReadLin e();

Jul 21 '05 #1
0 2920

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

Similar topics

by: Sunny | last post by:
Hi all, I'm creating client/server app in C# (VS. 2003). So, I need the client to call the server with some auth info (user and pass). If the auth is OK, server will do some work and will prepare a zip-file and some other text and numeric data and will notify the client that everything is ready. And the client will fetch the data. So if it was all console/desktop application, I know what to do (in
by: Paul Fi | last post by:
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>
by: Jason | last post by:
I have implemented a C# class inherited from System.MarshalByRefObject and using RegisterWellKnownServiceType to allow a web app to communicate with a service on the same machine. I would like to limit remoting of this class to the same machine (i.e. I do NOT want external machines connecting to my class). Is there a way to set security permissions for System.MarshalByRefObject to allow local connections only?
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 to use remoting for our access to the SQL server, with the remoting being via IIS. Since all of our users will have accounts in the destination domain, we want to have IIS handle the security for us and not allow anonymous. We have set this up...
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 example in the 101 VB.NET examples. It works great, only 1 instance ever gets created and is shared by each client. I have a few questions though, * Can the singleton contain events? In such a way that when the
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 use them. No IIS. Use TCP, binary. Standard server example with a console host and console client. .NET 1.1, windows XP. (I tried posting to the remoting newsgroup, no answers in the last couple days, trying here in hopes that more people watch this...
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.