1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Medium Trust Initialize dataconneciton

Medium Trust Initialize dataconneciton

2 posts, 0 answered
  1. bnye
    bnye avatar
    332 posts
    Registered:
    22 Sep 2005
    20 Sep 2007
    Link to this post

    Is there another way to initialize the dataconnection in medium trust mode for a custom module. Reflection is locked out. Currently I am using the following:

    Dim
    assem As Assembly
    assem=
    GetType(Custom).Assembly
    DataConnection.Initialize(
    False, assem)


    Sincerely,

    Ben
  2. Bob
    Bob avatar
    330 posts
    Registered:
    30 Dec 2016
    20 Sep 2007
    Link to this post
    Hello Ben,

    Data connection initialize method calls GetTypes for the assembly. Therefore the assembly should not contain any classes that require a higher trust level. My suggestion is to keep all dbclasses in a separate assembly. This way you can ensure that the assembly does not contain any restricted classes.

    Best wishes,
    Bob
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
2 posts, 0 answered