473,385 Members | 1,798 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,385 software developers and data experts.

How to delpoy a .Net application

I have build a .Net (C#) winform application. The application opens and
reads and writes to an xml file that is stored with the assembly.

When I run the program on my local PC everything works.
I have the need for a number of different people to run the application.
I copied the assembly and related files on a server I connected to the a
share on the server from my local PC and tried running the application I got
an error that said

The Application attempted to perform an operation not allowed by the
security policy. The operation required the secuirtyexception use the
Microsoft.Net security policy administration tool.
System.Security.SecurityException: Request for the permission of type
System.Security.Permissions.FileIOPermission, mscorlib,

if I run the application directly on the server then the application works.
I guess there is an issues running over the network.
The servers and my local pc is part of an Active directory domain
How can I solve this problem and what is the best way to deploy a .Net
application?

thanks in advance
Nov 15 '05 #1
1 2931
Hi,

The reason you're getting this error is applications that are loaded from a
network share are denied permission to do certain tasks. For example, the
error you received said that your application requested a
System.Security.Permissions.FileIOPermission (it wanted to read from your
local disk) but it was denied.

The technology in .NET that manages this is called Code Access Security
(CAS). Basically every time the CLR loads an assembly (EXE or DLL) it
gathers evidence about it like where the file was located, what it's public
key is, if it has a certain hash or digital signature and so on. Based on
this evidence it grants certain permissions to the code in the assembly and
denies others. Code loaded from your local hard drive has Full Trust,
meaning that the CLR will allow all code in the assembly to run (however
Windows security is still enforced).

As far as deployment goes, what you are trying to do is called No-Touch
Deployment or Smart Client Deployment. It is a great feature of .NET and it
allows full featured Windows Forms apps to be deployed almost as easily as a
web app.

There are tons of great articles and webcasts out there on these topics,
some of which are linked to at http://www.tvbug.com/diary/20030923.htm

--
Rob Windsor [MVP-VB]
G6 Consulting
Toronto, Canada

"Thorpe" <p_*****@hotmail.com> wrote in message
news:eL**************@TK2MSFTNGP10.phx.gbl...
I have build a .Net (C#) winform application. The application opens and
reads and writes to an xml file that is stored with the assembly.

When I run the program on my local PC everything works.
I have the need for a number of different people to run the application.
I copied the assembly and related files on a server I connected to the a
share on the server from my local PC and tried running the application I got an error that said

The Application attempted to perform an operation not allowed by the
security policy. The operation required the secuirtyexception use the
Microsoft.Net security policy administration tool.
System.Security.SecurityException: Request for the permission of type
System.Security.Permissions.FileIOPermission, mscorlib,

if I run the application directly on the server then the application works. I guess there is an issues running over the network.
The servers and my local pc is part of an Active directory domain
How can I solve this problem and what is the best way to deploy a .Net
application?

thanks in advance

Nov 15 '05 #2

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

Similar topics

33
by: aa | last post by:
I am migrating to PHP from ASP where there are the Application Scope variables which are accessible from any page on a website and which are used, in particular, for hit counters. Is there a similar...
9
by: J. Baute | last post by:
I'm caching data in the Application object to speed up certain pages on a website The main reason is that the retrieval of this data takes quite a while (a few seconds) and fetching the same data...
3
by: Amit Dedhia | last post by:
Hi I am developing a Dot net application (involving image processing) on a uni processor. It works well on my machine. I then take all my code on a multi processor, build and run the application...
1
by: Newbee Adam | last post by:
1. what is difference between buil and delpoy? 2. If I am finished with a web app lets say. how do I compile it and what type of a file will it be? .dll, aspx,... 3. how do I bundle an...
6
by: orekin | last post by:
Hi There I have been trying to come to grips with Application.Run(), Application.Exit() and the Message Pump and I would really appreciate some feedback on the following questions .. There are...
21
by: Chris | last post by:
I'm trying to get an existing VS.NET project up on my Win2003 server and I get the following error (on the actual website page): "It is an error to use a section registered as...
3
by: Carl Johansen | last post by:
I have a big ASP website (used by several thousand car dealers) that is a collection of lots of small and medium-sized applications. Now I want to start adding ASP.NET applications to it. I have...
20
by: Peter Oliphant | last post by:
How does one launch multiple forms in an application? Using Photoshop as an example, this application seems to be composed of many 'disjoint' forms. Yet, they all seem somewhat 'active' in...
6
by: Josef Brunner | last post by:
Hi, I published my application (VS 2005) and am now trying to install it when I get this error message. It worked before...even on a different machine. Here is the detailed description: ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.