a·gen·tic a·gil·i·ty

Serialize Assembly for Service calls over Http

TL;DR; Explains how to transmit a .NET assembly over HTTP in a WCF service call, focusing on serialisation and deserialisation without using byte streams.

Published on
1 minute read
Image
https://nkdagility.com/resources/TgSz2FK5KBK
Subscribe

I want to send a .NET assembly as either an System.Reflection.Assembly or as a string over the wire through a Windows Communication Foundation web service. It seems that the class System.Reflection.Assembly can serialize, but is unable to deserialize at the other end. How can this be achieved without sending as a straem of Byte.

I would prefer:

<OperationContract(IsOneWay:=True)> _
Sub AddEventHandlerAssembly(ByVal Assembly As System.Reflection.Assembly)

Or:
<OperationContract(IsOneWay:=True)> _
Sub AddEventHandlerAssembly(ByVal Assembly As String)

But not:

<OperationContract(IsOneWay:=True)> _
Sub AddEventHandlerAssembly(ByVal Assembly As Byte())

I have tralled the web for a while now, trying to find a solution. I have even decompiled the Assembly class and the problem is that it implements System.Runtime.Serialization.ISerializable but does not provide the constructor for the deserialize.

Does anyone have a solution for this?

Technorati Tags: .NET

Subscribe

Connect with Martin Hinshelwood

If you've made it this far, it's worth connecting with our principal consultant and coach, Martin Hinshelwood, for a 30-minute 'ask me anything' call.

Our Happy Clients​

We partner with businesses across diverse industries, including finance, insurance, healthcare, pharmaceuticals, technology, engineering, transportation, hospitality, entertainment, legal, government, and military sectors.​

MacDonald Humfrey (Automation) Ltd. Logo

MacDonald Humfrey (Automation) Ltd.

Big Data for Humans Logo

Big Data for Humans

Trayport Logo

Trayport

DFDS Logo

DFDS

Akaditi Logo

Akaditi

YearUp.org Logo

YearUp.org

Flowmaster (a Mentor Graphics Company) Logo

Flowmaster (a Mentor Graphics Company)

Boxit Document Solutions

Schlumberger Logo

Schlumberger

CR2

Microsoft Logo

Microsoft

ALS Life Sciences Logo

ALS Life Sciences

Workday Logo

Workday

Qualco Logo

Qualco

Freadom Logo

Freadom

Teleplan Logo

Teleplan

Hubtel Ghana Logo

Hubtel Ghana

Slaughter and May Logo

Slaughter and May

Ghana Police Service Logo

Ghana Police Service

New Hampshire Supreme Court Logo

New Hampshire Supreme Court

Department of Work and Pensions (UK) Logo

Department of Work and Pensions (UK)

Royal Air Force Logo

Royal Air Force

Washington Department of Transport Logo

Washington Department of Transport

Washington Department of Enterprise Services Logo

Washington Department of Enterprise Services

Flowmaster (a Mentor Graphics Company) Logo

Flowmaster (a Mentor Graphics Company)

Graham & Brown Logo

Graham & Brown

CR2

Cognizant Microsoft Business Group (MBG) Logo

Cognizant Microsoft Business Group (MBG)

Lockheed Martin Logo

Lockheed Martin

Deliotte Logo

Deliotte