Problem and Solution : Dynamic operations can only be performed in homogenous AppDomain.

Standard

If u have ever used “dynamic” keyword in your webpart code,its 100% possibility you will meet this error.

Its because using dynamic operation in same appdomain as sharepoint is not supported in new LegacyCASModel.

So heres a workaround i did to make it work:

if you wrote a timerjob, edit owstimer.config otherwise edit web.config:

Instead of this:
<trust level=”Full” originUrl=”” legacyCasModel=”true” />

Use this:
<trust level=”Full”  />

and add this to <configuration><runtime>:
<NetFx40_LegacySecurityPolicy enabled=”false”/>

Hope it helps

Advertisements

4 thoughts on “Problem and Solution : Dynamic operations can only be performed in homogenous AppDomain.

  1. Thanks for the tip, I am having similar error while using Office’s add-in with Sharepoint 2013 Online connection. I don’t know if I should place this configuration on the web that is running the app or the packet that is sent for sharepoint. I put it on both. But this part:

    I think instead of trust level you mean trustLevel and level would be name instead. Still I am having the same error described in here. Thanks for the help. 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s