B
Bill Zickmantel
I have seen a couple of posts identifying a similar problem with no posted
solutions.
Essentially we are using .NET Remoting hosted in IIS for server to server
communication. We are using Windows authenticated access to the virtual
directory and are setting DefaultCredentials or specific credentials on the
Proxy object. Our clients are varied but are persistant.
Everything works fine most of the time, but occasionally we get 401 errors.
Looking at the IIS Log we see that the client is not sending credentials at
all. When things are working properly (most of the time) the user account is
present in the IIS logs. Once things start to fail the only solution is to
restart the client applications.
Each time we create an object (server activated) we set the credentials
using code similar to:
obj = Activator.GetObject(
objType,
String.Format( "{0}://{1}/VirtualDirectory/{2}.rem",
strProtocol,
strServerName,
objType.FullName ) );
IDictionary objProperties =
ChannelServices.GetChannelSinkProperties( obj );
objProperties["preauthenticate"] = true;
objProperties["credentials"] =
CredentialCache.DefaultCredentials;
Another post on this same subject is:
From: Mark Walker ([email protected])
Subject: Sporadic HTTP 401 Permission Denied Error
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
Date: 2003-03-27 12:19:51 PST
This post references a case number SRX030327604751. The solution was and I
quote "the problem is solved by avoidance rather than understanding and
implementation".
solutions.
Essentially we are using .NET Remoting hosted in IIS for server to server
communication. We are using Windows authenticated access to the virtual
directory and are setting DefaultCredentials or specific credentials on the
Proxy object. Our clients are varied but are persistant.
Everything works fine most of the time, but occasionally we get 401 errors.
Looking at the IIS Log we see that the client is not sending credentials at
all. When things are working properly (most of the time) the user account is
present in the IIS logs. Once things start to fail the only solution is to
restart the client applications.
Each time we create an object (server activated) we set the credentials
using code similar to:
obj = Activator.GetObject(
objType,
String.Format( "{0}://{1}/VirtualDirectory/{2}.rem",
strProtocol,
strServerName,
objType.FullName ) );
IDictionary objProperties =
ChannelServices.GetChannelSinkProperties( obj );
objProperties["preauthenticate"] = true;
objProperties["credentials"] =
CredentialCache.DefaultCredentials;
Another post on this same subject is:
From: Mark Walker ([email protected])
Subject: Sporadic HTTP 401 Permission Denied Error
Newsgroups: microsoft.public.dotnet.framework.aspnet.security
Date: 2003-03-27 12:19:51 PST
This post references a case number SRX030327604751. The solution was and I
quote "the problem is solved by avoidance rather than understanding and
implementation".