When I am running the application I can access the file.. When I am running the executable that is created, I cannot access the file.. Any suggestions?
The error I am getting is : access to the path 'E:\Javascript.js' is denied.
When I am running the application I can access the file.. When I am running the executable that is created, I cannot access the file.. Any suggestions?
The error I am getting is : access to the path 'E:\Javascript.js' is denied.
I would check:
The default permissions for an executable sometimes depend on where the executable is located (e.g., a network share vs. local hard drive) and where it came from (e.g., downloaded from the Internet). Check the properties of the executable file.
You should also check Control Panel->Administrative Tools->.Net Framework 2.0 Configuration->Configure Code Access Security Policy.
How are you accessing the file?
Are you executing it or are you reading it?
If you're reading it, what filemode and sharemodes are you using?
Is it possible that some other process has an open handle to the file (a previous instance of your application that's still running perhaps, or the editor used to create the file)?