I am using the SDL Template Builder 7.1 (build 7.1.0.114).

The template builder worked correctly for a long time but now I am getting the following error by every template I try to debug:

> System.Web.Services.Protocols.SoapException: Type
> System.Runtime.Remoting.ObjRef and the types derived from it (such as
> System.Runtime.Remoting.ObjRef) are not permitted to be deserialized
> at this security level.
> 
>    at
> System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
> message, WebResponse response, Stream responseStream, Boolean
> asyncCall)    at
> System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
> methodName, Object[] parameters)    at
> Tridion.ContentManager.Templating.CompoundTemplates.DomainModel.Proxy.CompoundTemplateWebService.StartDebuggingWithItemUri(String
> compoundTemplateId, String compoundTemplateXml, String itemId, Boolean
> includeSystemLog, TraceEventType logLevel)    at
> Tridion.ContentManager.Templating.CompoundTemplates.DomainModel.DebugObject.Start(Template
> template, Object debugItem, LoggingOptions loggingOptions)

In the Event Viewer I see the following error:

    Type System.Runtime.Remoting.ObjRef and the types derived from it (such as System.Runtime.Remoting.ObjRef) are not permitted to be deserialized at this security level. Component: CompoundTemplateWebService Errorcode: 0 User: NT AUTHORITY\NETWORK SERVICE StackTrace Information Details: Server stack trace: at System.Runtime.Serialization.FormatterServices.CheckTypeSecurity(Type t, TypeFilterLevel securityLevel) at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ParseObject(ParseRecord pr) at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped record) at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run() at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, IMethodCallMessage methodCallMessage) at System.Runtime.Remoting.Channels.CoreChannel.DeserializeBinaryRequestMessage(String objectUri, Stream inputStream, Boolean bStrictBinding, TypeFilterLevel securityLevel) at System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at Tridion.ContentManager.Templating.Debugging.DebuggerRemoteRunner.Ping() at Tridion.ContentManager.Templating.Debugging.Debugger.GetRemoteDebugger(String userName, String webServiceDirectory) at Tridion.ContentManager.Templating.Debugging.Debugger.StartNewDebugger(String compoundTemplateUri, String compoundTemplateContent, String itemUri, String packageContents, Boolean preview, String publicationTargetUri, String userName, Boolean logTridionClasses, TraceEventType logLevel) at Tridion.ContentManager.Templating.Debugging.Debugger.StartNewDebuggerForItemUri(String compoundTemplateUri, String compoundTemplateContent, String itemUri, Boolean preview, String publicationTargetUri, String userName, Boolean logTridionClasses, TraceEventType logLevel) at Tridion.ContentManager.Templating.WebService.CompoundTemplateWebService.StartDebuggingWithItemUri(String compoundTemplateId, String compoundTemplateXml, String itemId, Boolean includeSystemLog, TraceEventType logLevel) 

**What I already tried:**

- I tried the 'Log on As...' option but that didn't help.

- I checked some other StackExchange posts but couldn't find the same situation.

- I added the following section to the web.config in Tridion/templating directory (after a suggestion of Nuno)

[![template builder web.config][1]][1]

Update 06-02-2016
- I also added the "typeFilterLevel=Full" setting to the  TcmTemplateBuilder.exe.config

I am really convinced that is has to do with the TypeFilter setting because the following line in the event viewer:

*System.Runtime.Serialization.FormatterServices.CheckTypeSecurity(Type t, TypeFilterLevel securityLevel)*

Thanks in advance!

**update: ticket is @SDL R+D team right now**

  [1]: https://i.sstatic.net/f6EoT.png