VB.NET Assembly denied access to System.Web. Help!

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default VB.NET Assembly denied access to System.Web. Help!

    I have a VB6 Windows Form application that calls a VB.NET Assembly. I can
    successfully call any test method in the assembly (like return "hello
    world"), but one method in the assembly uses calls to
    System.Web.HttpUtility.UrlEncode. That causes this error to be returned
    back to the VB6 app:

    Request for the permission of type System.Web.AspNetHostingPermission,
    System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    failed.

    I don't know if it is related to vb6 being the calling app or not. I
    haven't tried working around vb6 for testing because I have to call it from
    vb6 anyway. How can I resolve the above problem? I don't know much about
    ..net security configuration to fix this. An old newsgroup post suggested I
    add this code before the UrlEncode method line, but this didn't help:

    Dim Perm As New
    System.Web.AspNetHostingPermission(System.Security .Permissions.PermissionSta
    te.Unrestricted)
    Perm.Assert()

    What can I do to fix this security problem?


    AFN Guest

  2. Similar Questions and Discussions

    1. Assembly acessing StrongNamed assembly getting "Access Denied" intermitently
      I have an ASP.NET application that is using a code library our development team uses. The code library is a few web controls in a Strong Named...
    2. Access is denied on DC System Event log
      When I am running computer management of any of our Windosw Server 2003 Domain controllers & I attempt to view the System Event Log, I recieve this...
    3. Weird problem with assembly (Access denied)
      I have few components (dlls) I'm using that have been written by other developers on my team. I add reference to them in my asp.net project and it...
    4. System.UnauthorizedAccessException: Access is denied.
      Exception Details: System.UnauthorizedAccessException: Access is denied. ASP.NET is not authorized to access the requested resource. Consider...
    5. access to system registry denied
      Hi, I have a problem with the method "EventLog.CreateEventSource" because I received one error message (access to system registry denied). I...
  3. #2

    Default Re: VB.NET Assembly denied access to System.Web. Help!

    Your application is running with partial trust somehow. Is it being run
    from a network share?

    Joe K.

    "AFN" <DELETEnewsgroupCAPSaccount@yahoo.com> wrote in message
    news:6h5yc.8116$Ko5.1886@twister.socal.rr.com...
    > I have a VB6 Windows Form application that calls a VB.NET Assembly. I
    can
    > successfully call any test method in the assembly (like return "hello
    > world"), but one method in the assembly uses calls to
    > System.Web.HttpUtility.UrlEncode. That causes this error to be returned
    > back to the VB6 app:
    >
    > Request for the permission of type System.Web.AspNetHostingPermission,
    > System, Version=1.0.5000.0, Culture=neutral,
    PublicKeyToken=b77a5c561934e089
    > failed.
    >
    > I don't know if it is related to vb6 being the calling app or not. I
    > haven't tried working around vb6 for testing because I have to call it
    from
    > vb6 anyway. How can I resolve the above problem? I don't know much
    about
    > .net security configuration to fix this. An old newsgroup post suggested
    I
    > add this code before the UrlEncode method line, but this didn't help:
    >
    > Dim Perm As New
    >
    System.Web.AspNetHostingPermission(System.Security .Permissions.PermissionSta
    > te.Unrestricted)
    > Perm.Assert()
    >
    > What can I do to fix this security problem?
    >
    >

    Joe Kaplan \(MVP - ADSI\) Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139