mcneel / ghpython

A Grasshopper component for Rhino.Python
http://www.food4rhino.com/project/ghpython
117 stars 34 forks source link

.Net 4.0 Security Error - GhPython Load Error - Rhino 5 #48

Closed peterschlem closed 10 years ago

peterschlem commented 11 years ago

Grasshopper fails to load the GhPython scripting plugin and the error message below is displayed:

Exception System.NotSupportedException: Message: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.

Followed MS recommendations and added a CAS configuration file in the Rhino System directory and the error is no longer reported but the component will not load. Visual Studio Shell 2010 is installed to develop WTF IronPython applications and this might be the cause of the conflict.

Followed all other MS recommendations - unblocked the plugin file etc.

angellinares commented 11 years ago

Same error here :(

piac commented 10 years ago

There is nothing that can be done from here, sorry, except pointing to the fact that .dlls need to be unblocked and cannot be loaded from the network. Just make sure you are unblocking a file you have control over, and unblocking will be effective.

All examples of this problem that I have seen so far were fixed by this. Please email me if this does not work.

Giulio

for Robert McNeel & Associates giulio@mcneel.com

piac commented 10 years ago

...to unblock, keep only one copy of the file. Right-click it, choose Properties, and then Unblock. Then do the proceedure again, and check that there is no "Unblock" button there, any longer.