LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.NET Remoting and LabVIEW as a server

Hi

 

I'm trying to connect labview and c# application via .NET Remoting.

First I'll explain briefly the software structure.

There is an assembly which manages all about .NET Remoting.

By using this assembly, commnications among applications can be easily perfomed.

The application can be implemented by C# or labview. 

In labview app, it has nothing with .NET Remoting. Instead, it just instantiates

some class in the assembly which take care all about .NET Remoting.

When the labview app. communicates with other C# app. via .NET Remoting,

the problem is that when the c# app as a client tries to access to objects in labview app.

which is set up as a server, an error is ouccured like this :

 

"unable to find an assembly which includes the types which is set up as  .NET Remtoing server"

 

But, when the labview app. conducts as a client, communication works well.

This is, the access to .NET Remoting servers hosted by labview app. from other c# app. is blocked.

 

Any replies would be welcome.

Thank you in advance.

0 Kudos
Message 1 of 5
(3,582 Views)
first check the firewall....
0 Kudos
Message 2 of 5
(3,578 Views)

When communicating between C# app., everything is ok.

I think this means firewall doesn't matter.

However if labview has its own firewall function, it could be the cause.

0 Kudos
Message 3 of 5
(3,567 Views)

The error message is

 

System.Runtime.Serialization.SerializationException was unhandled
  Message="'CampJaus2008.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' unable to find the assembly.
  Source="mscorlib"
  StackTrace:
    Server stack trace:
       위치: System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.GetAssembly()
       위치: System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAssemblyInfo assemblyInfo, String name)
       위치: System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor(String objectName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[] typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 objectId, BinaryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable)
       위치: System.Runtime.Serialization.Formatters.Binary.ObjectMap.Create(String name, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[] typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 objectId, BinaryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable)
       위치: System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped record)
       위치: System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryHeaderEnum binaryHeaderEnum)
       위치: System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
       위치: System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
       위치: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
       위치: System.Runtime.Remoting.Channels.CoreChannel.DeserializeBinaryRequestMessage(String objectUri, Stream inputStream, Boolean bStrictBinding, TypeFilterLevel securityLevel)
       위치: System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)
    Exception rethrown at [0]:
       위치: System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       위치: System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       위치: CampJaus2008.Core.NodeElementService.SendMessage(JausMessage jausMessage)
       위치: CampJaus2008.Core.NodeElement.SendMessage(JausMessage jausMessage) 파일 H:\Documents\Development\CampJaus2008\CampJaus2008.Core\NodeElement.cs:줄 13
       위치: CampJaus2008.Core.BufferService.UnicastToEntity(JausMessage jm) 파일 H:\Documents\Development\CampJaus2008\CampJaus2008.Core\BufferService.cs:줄 112
       위치: CampJaus2008.Core.BufferService.DequeueMessage() 파일 H:\Documents\Development\CampJaus2008\CampJaus2008.Core\BufferService.cs:줄 84
       위치: System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       위치: System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       위치: System.Threading.ThreadHelper.ThreadStart()
  InnerException:

 

0 Kudos
Message 4 of 5
(3,534 Views)
I solved this problem by copying all necessary assemblies to the folder where the labview.exe file exists.
Message 5 of 5
(3,530 Views)