VB.NET Assembly denied access to System.Web. Help!
From: AFN (DELETEnewsgroupCAPSaccount_at_yahoo.com)
Date: 06/11/04
- Previous message: Joe Kaplan \(MVP - ADSI\): "Re: Valid Certificate Authority"
- Next in thread: Joe Kaplan \(MVP - ADSI\): "Re: VB.NET Assembly denied access to System.Web. Help!"
- Reply: Joe Kaplan \(MVP - ADSI\): "Re: VB.NET Assembly denied access to System.Web. Help!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 10 Jun 2004 22:29:22 GMT
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?
- Previous message: Joe Kaplan \(MVP - ADSI\): "Re: Valid Certificate Authority"
- Next in thread: Joe Kaplan \(MVP - ADSI\): "Re: VB.NET Assembly denied access to System.Web. Help!"
- Reply: Joe Kaplan \(MVP - ADSI\): "Re: VB.NET Assembly denied access to System.Web. Help!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|