Hello,
I have created a small test program based on .NET Remoting feature.
When running on a specific computer, I get the following exception:
mpRemotingServer.exe Assert Failure
mpRemotingServer.exe - Assert Failure
Expression: [mscorlib recursive resource lookup bug]
Description: Infinite recursion during resource lookup within mscorlib. This may be a bug in mscorlib, or potentially in certain extensibility points such as assembly resolve events or Culturelnfo names.
Resource name: Security_GenericNoType
The source code can be found at the following
github link.
The usage is simple, it just invokes a sum on the server side.
When the computer is connected onto the company domain, it seems to work. It looks to me maybe an issue at the tcp level. I have tried adding security on the server side which is the one generating the exception but the problem persists.
Does somebody have already experience such issue.
Thank you very much in advance
Best regards.
MiQi
What I have tried:
On the server code, I have changed:
RemotingConfiguration.RegisterWellKnownServiceType(typeof (mpRemotingClass.RemoteOperations), "RemoteOperations", WellKnownObjectMode.Singleton);
var remoteOperations = new mpRemotingClass.RemoteOperations(1);
RemotingServices.Marshal(remoteOperations, "RemoteOperations");
and the object definition is now:
public interface ICountingService
{
int Increment();
}
[Serializable]
public class RemoteOperations : MarshalByRefObject, ICountingService
{
private static int _value = 0;
public RemoteOperations(int startValue)
{
_value = startValue;
}
public int Increment()
{
_value++;
return _value;
}
[System.Security.SecurityCritical]
public int sum(int a, int b)
{
return a + b;
}
}
This still works fine on my test computer, but now sure so far it that will work on the target computer.
Do you have an advise to share with me ?
Thank you very much in advance