Error While calling RestSharp from BizTalk.

47 views
Skip to first unread message

Niket Shrivastava

unread,
Mar 18, 2021, 9:10:04 AM3/18/21
to RestSharp
I am getting below exception while calling RestSharp from BizTalk and due to which messages are not getting suspend BizTalk admin console and I have to restart Host Instance every time.

Error:
'RestSharp.Serialization.Json.JsonSerializer' in Assembly 'RestSharp, Version=106.11.7.0, Culture=neutral, PublicKeyToken=e9f153842850f924' is not marked as serializable.

Thanks & Regards,
Niket

Niket Shrivastava

unread,
Mar 18, 2021, 9:13:47 AM3/18/21
to RestSharp
I think i have to make object of RestSharp.Serialization.Json.JsonSerialize as static.

Please correct me if I am wrong.

Tall Navy Guy

unread,
Mar 18, 2021, 7:55:45 PM3/18/21
to rest...@googlegroups.com
You have to add [Serializable] attribute.

-Brian Hart

--
You received this message because you are subscribed to the Google Groups "RestSharp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to restsharp+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/restsharp/fedd91e8-5a9e-4cc5-a04e-b9ace00009d0n%40googlegroups.com.

Niket Shrivastava

unread,
Mar 19, 2021, 1:10:30 AM3/19/21
to rest...@googlegroups.com
How could I modify RestSharp dll? I downloaded it from Nugets.

ENS Brian Hart

unread,
Mar 19, 2021, 7:32:04 AM3/19/21
to rest...@googlegroups.com
You should not have to.  

Why don't you post the code from your BizTalk library where you are getting the error?   It’s hard to help you without seeing that. 

V/R



Brian Hart 


On Mar 19, 2021, at 01:10, Niket Shrivastava <niket...@gmail.com> wrote:



Tall Navy Guy

unread,
Mar 19, 2021, 7:38:24 AM3/19/21
to rest...@googlegroups.com
You can also post an Issue on this GitHub:
https://github.com/restsharp/RestSharp/issues

Be specific, descriptive, and show the code where the error is coming from.  

I also can't figure out your use case.  In your issue, go into more details about exactly how BizTalk Server and RestSharp are communicating.

Show the line of your code where the Exception is happening.

-Brian

Niket Shrivastava

unread,
Mar 19, 2021, 10:50:31 AM3/19/21
to rest...@googlegroups.com
Making static object of RestSharp.Serialization.Json.JsonSerializer class has resolved my issue.

Reply all
Reply to author
Forward
0 new messages