You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This error occurs if I use CallContext.LogicalSetData before method IsolatedRazorEngineService.Create() and set an entity that is not marked [Serializable].
here is a demo to produce this error.
using RazorEngine.Templating;
using System.Runtime.Remoting.Messaging;
namespace WorkerRole
{
public class User
{
public string Name { get; set; }
}
internal class Program
{
static void Main(string[] args)
{
var user = new User();
CallContext.LogicalSetData("123", user);
using (var service = IsolatedRazorEngineService.Create())
{
}
}
}
}
error is
System.Runtime.Serialization.SerializationException: 'Type 'WorkerRole.User' in assembly 'WorkerRole, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable.'
The text was updated successfully, but these errors were encountered:
This error occurs if I use
CallContext.LogicalSetData
before methodIsolatedRazorEngineService.Create()
and set an entity that is not marked [Serializable].here is a demo to produce this error.
error is
The text was updated successfully, but these errors were encountered: