Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > VB.NET Assembly denied access to System.Web. Help!

Reply
Thread Tools

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

 
 
AFN
Guest
Posts: n/a
 
      06-10-2004
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?


 
Reply With Quote
 
 
 
 
Joe Kaplan \(MVP - ADSI\)
Guest
Posts: n/a
 
      06-11-2004
Your application is running with partial trust somehow. Is it being run
from a network share?

Joe K.

"AFN" <(E-Mail Removed)> wrote in message
news:6h5yc.8116$(E-Mail Removed)...
> 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?
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access Denied ... <add assembly="*"> Randy Paez ASP .Net 8 03-10-2010 04:44 PM
403 Forbidden: You were denied access because: Access denied by access control list Southern Kiwi NZ Computing 6 03-19-2006 05:19 AM
Access is denied - assembly could not be loaded joserobenator@gmail.com ASP .Net 1 06-05-2005 03:13 AM
Assembly acessing StrongNamed assembly getting "Access Denied" intermitently Chris Herring ASP .Net Security 0 05-04-2005 02:35 PM
Error Message - Access Denied to Assembly Brent ASP .Net 2 04-08-2004 07:25 PM



Advertisments