c# - Error validating exception when using System.Reflection -
we're developing sharepoint webpart sandboxed solution in visual studio 2013 sharepoint online. use external dll library itextsharp
reading , writing pdf. having problem when activating our solution.
our error message is:
error validating assembly
itextsharp.dll
.
this solution references prohibited type system.reflection.bindingflags
, cannot used on site collection.
you've answered question already:
this solution references prohibited type system.reflection.bindingflags , cannot used on site collection.
you can't use system.reflection
namespace sharepoint online solutions (for part). allowed members system.reflection
are:
- getvalue name
- getcustomattributes
- propertytype
- getvalue setvalue
i recommend taking @ microsoft's documentation developing sharepoint online solutions (link) there quite few namespaces available sharepoint development prohibited.
here's microsoft has this:
because multi-tenant environment, when upload sandboxed solution solution gallery, sharepoint online performs further round of validation checks, in addition performed on-premise sharepoint installations. sandboxed solution cannot activated if contains code calling of following namespaces:
and here's list of prohibited namespaces (see documentation exceptions):
- microsoft.sqlserver
- microsoft.win32
- system.data.sql
- system.data.sqlclient
- system.data.sqltypes
- system.io.pipes
- system.io.ports
- system.reflection
- system.runtime.interopservices
- system.runtime.remoting
- system.threading
- array.createinstance()
- system.delegate
- type.gettype(string)
- type.invokemember()
Comments
Post a Comment