File Access Error

G

Guest

I have a .Net Console Application. I installed it on a server. I created a
bat file on the server which passes the appropriate parms to the program to
run. This application accesses and updates other files on mapped drives.
When I am logged on to the server and run the application, it runs just fine.

When I log on and run from my workstation and double clicking on the bat
file to invoke the application, I get the following error:

System.Security.Permissions.FileIOPermission, mscorlib, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089
failed.

This is referencing a file on the shared drive, which the application is
attempting to open or create and then update. I have update access to this
shared drive from my workstation.

I have signed onto the server where the application is and used the .Net
Wizard to grant the application full trust.

So what am I missing in order to enable me to sign on to my workstation and
double click the bat file to enable me to successfully run the application?

Thanks in advance for your assistance!!
 
W

Willy Denoyette [MVP]

Jim Heavey said:
I have a .Net Console Application. I installed it on a server. I created
a
bat file on the server which passes the appropriate parms to the program
to
run. This application accesses and updates other files on mapped drives.
When I am logged on to the server and run the application, it runs just
fine.

When I log on and run from my workstation and double clicking on the bat
file to invoke the application, I get the following error:

System.Security.Permissions.FileIOPermission, mscorlib,
Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089
failed.

This is referencing a file on the shared drive, which the application is
attempting to open or create and then update. I have update access to
this
shared drive from my workstation.

I have signed onto the server where the application is and used the .Net
Wizard to grant the application full trust.

You have to do this on the client, not on the server where the application
is located, applications loaded from a local drive have full trust by
default.

Willy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top