Error trying to run MVC3/4 Application

This is an error:

Attempt by security transparent method ‘System.Runtime.Diagnostics.DiagnosticTrace..ctor(System.String, System.Guid)’ to access security critical method ‘System.Runtime.Diagnostics.EtwDiagnosticTrace..ctor(System.String, System.Guid)’ failed.
Assembly ‘System.ServiceModel.Internals, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ is marked with the AllowPartiallyTrustedCallersAttribute, and uses the level 2 security transparency model.  Level 2 transparency causes all methods in AllowPartiallyTrustedCallers assemblies to become security transparent by default, which may be the cause of this exception.

To fix this error you will do by flow:

1. uninstall .net framework 4.0 and heigher

2. reinstall .net framework 4.0

3. rerun your app.

This entry was posted in ASP.NET MVC. Bookmark the permalink.

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s