FileInfo not working on only one site

zero

Perch
I'm using the following line of code to check the existance of a file on the box:

FileInfo thisFile = new FileInfo(filePath);

**Where filePath is a valid path on the server (which shouldn't even matter if it's not). I'm getting the following error:

Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.


I've been back and forth with support since last night, but still no resolution. I have this exact same code working on two other accounts with no issue.

I've tried reducing the trust level through the web.config file, but that has apparently been blocked through an "inherited config file".

Any other ideas?


.brit
 
Hello Brit,

You can not access files outside of your application directory, if it is trying to do this, it won't work.
 
It is trying to do this. I currently do this on two other sites hosted at Jodo. What gives? Why the change?

Thanks for the reply and explanation.


thanks,
.brit
 
Hello Brit,

It is for security in the long term, it is far safer to be locked to only the $appdir setting. It was a new server, and a good time to bring in a minor new change.
 
Stephen said:
Hello Brit,

It is for security in the long term, it is far safer to be locked to only the $appdir setting. It was a new server, and a good time to bring in a minor new change.
Understandable. I trust your judgement. I'm not the only one here. I would rather things stay safe for everybody, even if I have to re-write my admin package now. :)

Keep up the good work.


thanks,
.brit
 
Sorry for the inconvenience there, and for understanding.

The last thing we all want/need is hackers/defacers being able to access outside of the app dir(like they actually can in asp) to other folders and causing a file overwrite mess in one users account.
 
Back
Top