microsoft / ApplicationInsights-SDK-Labs

Application Insights experimental projects repository
MIT License
61 stars 48 forks source link

Type 'Microsoft.ApplicationInsights.Wcf.Implementation.WcfOperationContext' in Assembly 'Microsoft.AI.Wcf, Version=0.26.0.60740, Culture=neutral, PublicKeyToken=31bf3856ad364e35' is not marked as serializable. #92

Closed CanerPatir closed 7 years ago

CanerPatir commented 7 years ago

I get the following exception when using SqlServer.SMO libraries. Type 'Microsoft.ApplicationInsights.Wcf.Implementation.WcfOperationContext' in Assembly 'Microsoft.AI.Wcf, Version=0.26.0.60740, Culture=neutral, PublicKeyToken=31bf3856ad364e35' is not marked as serializable.

tomasr commented 7 years ago

Could you tell me what your code is doing with the SMO libraries? That might give a hint as what is going on.

I suspect the issue is that it's using a second AppDomain and trying to marshal the call context across them.

tomasr commented 7 years ago

@CanerPatir We've published version 0.26.1-build00103 of the package on MyGet with the changes. Could you test and see if it fixes the issue for you?

CanerPatir commented 7 years ago

Thank you, it looks working successfully anymore.