Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FileIO permission problem with <ComClass()>

Status
Not open for further replies.

sunaj

Technical User
Feb 13, 2001
1,474
DK
Hi,
I've made a class that uses the system.IO streams to read and write files (it also interacts with an SQL server).
The program works fine when I run it with a vb.net interface, but when I mark it as <ComClass()> and run it throught VB6 I get the following error:

Request for the permission of type System.Security.Permissions.FileIOPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=#### failed.

I've tried adding a fileIO security request to the assembly:
Code:
<Assembly: FileIOPermission(SecurityAction.RequestMinimum)>
- but in vein

Anybody? Just the slightest clue might help me...


Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
Problem solved. By using regasm and gacutil to register the type library and installing the assembly, I got rid of the problem. Why that works better than letting the .NET IDE take care of things, I'll leave up to MS to explain.

Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top