Hi All,
I have a class A which is derived from ServicesComponent to participate in automatic transaction with falg Transaction.Required. Class A is exposed to client through remoting on Http channal hosting into IIS.
There is a class B which is also available through remoting hosted on IIS on the same URI. B creates new of A inside a function. It succeed and able to create instance of A inside B first time. But it failes in 2nd attempt when we retry to create the instance of A inside B. But if we restart the IIS then we are able to create instance of A first time.
Instance of Class B is created from a script written inside the MS exchange server.
Please help us to find the reason behind it.
exact exception which we had traced is:
"An error occured: Unable to cast object of type
Hclt.HydraPlatform.CoreServices.ServerSOAPBinary.A dministration.MaintainServerService to type
Hclt.HydraPlatform.CoreServices.ServerSOAPBinary.A dministration.MaintainServerService.
Source: mscorlib
Message: Unable to cast object of type
Hclt.HydraPlatform.CoreServices.ServerSOAPBinary.A dministration.MaintainServerService to type
Hclt.HydraPlatform.CoreServices.ServerSOAPBinary.A dministration.MaintainServerService.
StackTrace: at System.Runtime.InteropServices.Marshal.GetTypedObj ectForIUnknown(IntPtr
pUnk, Type t)
at System.EnterpriseServices.ServicedComponentProxyAt tribute.CreateInstance(Type
serverType)
at
System.Runtime.Remoting.Activation.ActivationServi ces.CreateInstanceWithLinkDemand(ProxyAttri
bute pa, Type serverType)
at System.Runtime.Remoting.Activation.ActivationServi ces.IsCurrentContextOK(Type
serverType, Object[] props)
at Hclt.HydraPlatform.Dts.OperationTI.DTSExposedOpera tions.SendUserIntervention(String
inSender, String sProjectCode, Int32 nDefectId, String sPhase, String sModuleId, Int32
iProcessId, Int32 nInterveneType, String sOwner, String sRole)"
Any help would be incredible for us becasue it making our application inconsistant behaviour.
regads,
Pankaj Jain,
Project Leader,
HCL Technologies India