Connecting Tech Pros Worldwide Help | Site Map

"Unable to cast object of type" error

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 21st, 2005, 11:09 AM
Pankaj Jain
Guest
 
Posts: n/a
Default "Unable to cast object of type" error

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



 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.