473,325 Members | 2,771 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

File Permission

Hello, I have an Console Application (my first endevor in Console
applications) which works fine when I and using Visual Studio to run it on my
workstation. Now I take the application and move it to a "server". I
created a ".bat" file to invoke the application, but now when I run I get a
security violation error when I run it from my workstation (not the server).
SO to be clear, from my workstation, i naviagate the the shared drive on my
server and double click on the ".bat" file and I get the following error....

Message: Request for the permission of type
System.Security.Permissions.FileIOP
ermission, mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c5
61934e089 failed.

If I log onto the server and run the bat file, it runs just fine, but I am
not able do do the same from my workstation.

So what do I need to do to be able to run this in that manner?
Nov 16 '05 #1
1 4663
Jim,

From the batch file, are you calling the executable on a share, or
something of that nature? When you do this, the runtime realizes that the
executable is not from the local machine, and executes it with a diminished
permission set (one of those permissions being file IO). You would have to
go to the .NET administration tool, and give it the appropriate permissions.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jim Heavey" <Ji*******@discussions.microsoft.com> wrote in message
news:30**********************************@microsof t.com...
Hello, I have an Console Application (my first endevor in Console
applications) which works fine when I and using Visual Studio to run it on
my
workstation. Now I take the application and move it to a "server". I
created a ".bat" file to invoke the application, but now when I run I get
a
security violation error when I run it from my workstation (not the
server).
SO to be clear, from my workstation, i naviagate the the shared drive on
my
server and double click on the ".bat" file and I get the following
error....

Message: Request for the permission of type
System.Security.Permissions.FileIOP
ermission, mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c5
61934e089 failed.

If I log onto the server and run the bat file, it runs just fine, but I am
not able do do the same from my workstation.

So what do I need to do to be able to run this in that manner?

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: Dino | last post by:
dear all, i've created an application for a customer where the customer can upload ..csv-files into a specified ftp-directory. on the server, a php-script, triggered by a cronjob, reads all the...
2
by: ykgoh | last post by:
Hi. I've a problem of being able to create and remove a directory but unable to write a file inside the created directory for some strange reason. I suspect that this problem could be vaguely...
3
by: David Thielen | last post by:
Hi; I created a virtual directory in IIS 6.0 and my asp.net app runs fine. But when it tries to write a file I get: Access to the path is denied. - C:\Inetpub\wwwroot\RunReportASP\images ...
15
by: David Thielen | last post by:
Hi; My ASP.NET app (C# calling J# under .net 2.0) creates a png file in a subdirectory to display as part of the created page. However, the bitmap will not display due to a security violation. ...
10
by: John Salerno | last post by:
I always read about how you need to set certain file permissions (for cgi files, for example), but it's never been clear to me *how* you do this. I know you can run the line chmod 755...
0
by: dphill | last post by:
Hello all I am a beginner .Net programmer so please forgive my ignorance. In brief, I am trying to read from xml file stored in a SQL database table’s field. This is what I used to create...
1
by: doctorhardik | last post by:
other interesting thing i observe during my work which i describe below: i am using dotproject2.0.4 on fc3. it is working fine. but i want to generate pdf file report during this time i face...
3
by: Mike | last post by:
Hi I have problem as folow: Caught Exception: System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Request for the permission of type...
1
by: lPrentice | last post by:
Hello, After all this time, Linux file permissions still confuse me at times. I have a Python web-based application with an file (images) upload module. The application is running on two remote...
3
by: vb2008 | last post by:
So I am trying to figure out a new part now but I am getting stuck once again and yes I have been reading up on things and I think I know what my problem is I am just not sure how to fix it. Below is...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.