Skip to main content
January 5, 2012
Question

"System/Security/IPermission" when trying to access a file from .Net

  • January 5, 2012
  • 1 reply
  • 622 views

Hello guys,

I use a library that has a class x which has a method y. The method gets a string to a file and opens the file.

The CF code looks like that:


<cfobject type=".NET" name="x" class="TestSpace.X" assembly="C:\TestSpace.dll">

<cfset x.open("D:\file.txt")>

At the second line the exception is thrown. Locally (Windows 7 64-Bit) that works, but on our productive system (Windows 2008 64Bit) it is not working.

On both systems I use ColdFusion 9.

Has anybody an idea what I can do?

Thanks!

This topic has been closed for replies.

1 reply

Inspiring
January 5, 2012
Has anybody an idea what I can do?

Yep.  To start with, what exactly is the error msg?

Can you get this to work OK on a different Win7 machine?  It'd be good to isolat whether it's a difference between your environment and the other environment, or whether it's a Windows version thing.

--

Adam

January 5, 2012

It is the error from the title:

System/Security/IPermission null

Nothing more I get.

It is working on all our development PCs. Just on the production system it is not working.

Inspiring
January 5, 2012

Ah, OK, I see.

I googled "System/Security/IPermission null" and it's a reference to some .NET interface.  It might pay to have a shufti around the google results for that.  But it's a .NET error that CF is bubbling up, not a CF error per se.

One thing to check I can think of... do you have the same version of the .NET framework on both environments?

Maybe also ask on a .NET forum?

I know I'm not being much help, sorry.

--

Adam