[Mono-list] Opening a file from .aspx
tymoteuszmajewski at yahoo.com.au
Tue Jul 20 07:36:30 EDT 2010
This is on ubuntu, Mono JIT compiler version 18.104.22.168
I have mono setup which I can run c# scripts properly, but I cannot open files.
string file = "Config/1.txt";
file = Server.MapPath (file);
File.Open (file, FileMode.Open);
Access to the path "/MyPages/website/Config/1.txt" is denied.
The file is accessible through apache, meaning I can go to
"http://192.168.1.125/Config/1.txt" and I can read the file.
If I run the same code from a mono app (not from .aspx page) it works fine.
I read quite a lot about trustLevels, securityPolicy in web.config files, but
things just don't seem to have any effect.
When I tried to establish the current policy level from the page itself it
reports as Unrestricted which is an issue on its own, but that's an issue for
I tried to find something about trust levels in mono asp but I cannot find
The bottom line is I would like to:
a) open and read a file from within the website's directory.
b) open and read a file from a specified directory not in the application's dir
(website's root dir).
Thank you in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-list