|
Remoting issue Hey Guys,
I get this error running the last line of this code 'Exception calling
"GetType" with "2" arguement(s): "could not load type
'Gateway.Crp.Service.IMarketInfoService' from assembly
'Sytem.Management.Automation, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35'."
[System.Reflection.Assembly]::LoadWithPartialName("mscorlib")
[System.Reflection.Assembly]::LoadFile("D:\_Gateway\dll\Gateway.Crp.dll")
[System.Reflection.Assembly]::LoadWithPartialName("System.Runtime.Remoting")
$MarketGatewayURI = "tcp://172.16.1.112:8085/MarketInfoService"
$Remoting = New-Object System.Runtime.Remoting.Channels.Tcp.TcpChannel
[System.Runtime.Remoting.Channels.ChannelServices]::RegisterChannel($Remoting, 0);
$QuoteRequest = New-Object Gateway.Crp.Structure.QuoteRequestDTO
$QuoteResponse = New-Object Gateway.Crp.Structure.QuoteResponseDTO
$MarketInfo = [Gateway.Crp.Service.IMarketInfoService]
[System.Activator]::GetObject([System.Type]::GetType([Gateway.Crp.Service.IMarketInfoService], "tcp://172.16.1.112:8085/MarketInfoService")) |