Partager via


Indigo Lesson Learned: System.ServiceModel and Trust

Indigo's System.ServiceModel.dll assembly requires that it's callers be fully trusted. Installing SharePoint or other applications on a machine with the Indigo CTP may cause IIS to have its trust settings modified so that it does not run with full-trust.

Here is the error we were getting:

Error 1 Build (web):
Type 'System.ServiceModel.ServiceBuildProvider,
System.ServiceModel, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
cannot be instantiated under a partially trusted security policy (AllowPartiallyTrustedCallersAttribute is not present on the target assembly).

The problem went away once we added <trust level="full"/> to the local config file.

More info on modifying trust settings for ASP.NET:
 https://winfx.msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_aspnetgenref/html/eeed0fd3-5aaa-4196-94af-e6baea70dded.asp
 https://winfx.msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_aspnetgenref/html/729ab04c-03da-4ee5-86b1-be9d08a09369.asp