473,561 Members | 3,128 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

about deploying


I have a simple application from a book where the actual applications
permission doesn't match the permission referenced from the book.
My question is written further down.
The book is saying the following : "The calculate permission button from the
security properties of Visual Studio analysis is
an application manifest that includes all required permissions. With Visual
Studio 2005, you can see the
application manifest with the name app.manifest below Properties in the
Solution Explorer. The content of this file is shown
here. The XML element <applicationReq uestMinimumdefi nes all required
permissions of the application.
The FileIOPermissio n is required because the application reads and writes
files using classes from System.IO namaspace."

Below is a copy of app.manifest.
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assemb ly manifestVersion ="1.0"
xmlns="urn:sche mas-microsoft-com:asm.v1"
xmlns:asmv1="ur n:schemas-microsoft-com:asm.v1"
xmlns:asmv2="ur n:schemas-microsoft-com:asm.v2"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance">
<trustInfo xmlns="urn:sche mas-microsoft-com:asm.v2">
<applicationReq uestMinimum>
<defaultAssembl yRequest permissionSetRe ference="Custom " />
<PermissionSe t class="System.S ecurity.Permiss ionSet" version="1"
ID="Custom" SameSite="site" >
class="System.S ecurity.Permiss ions.Reflection Permission, mscorlib,
Version= , Culture=neutral , PublicKeyToken= b77a5c561934e08 9"
version="1" Unrestricted="t rue" />
class="System.S ecurity.Permiss ions.SecurityPe rmission, mscorlib,
Version= , Culture=neutral , PublicKeyToken= b77a5c561934e08 9"
version="1" Flags="Unmanage dCode, Execution, ControlEvidence " />
<IPermission class="System.S ecurity.Permiss ions.UIPermissi on,
mscorlib, Version= , Culture=neutral , PublicKeyToken= b77a5c561934e08 9"
version="1" Unrestricted="t rue" />
class="System.S ecurity.Permiss ions.KeyContain erPermission, mscorlib,
Version= , Culture=neutral , PublicKeyToken= b77a5c561934e08 9"
version="1" Unrestricted="t rue" />
</applicationRequ estMinimum>
Below is the main class and as you can see I use file IO operation so the
application needs the FileIOPermissio n.
Now to my question: When I click on the "calculate Permission" button in the
sequrity after choosing the property for the
project the FileIOPermissio n is not selected as a requirement for the
application but according to the book the appliaction
needs this requirement and I must agree with the book in this case.

Can anyone explain the reason why the sequrity button named calculate
permission doesn't include FileIOPermissio n for
the application as a permission requirement ?

using System;
using System.Collecti ons.Generic;
using System.Componen tModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.IO;
using System.Windows. Forms;
using System.Drawing. Printing;

namespace SimpleEditor
public partial class SimpleEditorFor m : Form
private string filename = "Untitled";
private string[] lines;
private int linesPrinted;
private Brush printBrush;

public SimpleEditorFor m() //User defined C-tor
{ InitializeCompo nent(); }

protected void OpenFile()
textBoxEdit.Cle ar();
textBoxEdit.Tex t = File.ReadAllTex t(filename);
catch(IOExcepti on ex)
MessageBox.Show (ex.Message, "Simple Editor",
MessageBoxButto ns.OK, MessageBoxIcon. Exclamation);

private void OnFileNew(objec t sender, EventArgs e)
filename = "Untitled";
textBoxEdit.Cle ar(); // clear textbox

private void OnFileOpen(obje ct sender, EventArgs e)
if (dlgOpenFile.Sh owDialog() == DialogResult.OK )
filename = dlgOpenFile.Fil eName;

private void OnFileSave(obje ct sender, EventArgs e)
if (filename == "Untitled")
OnFileSaveAs(se nder, e);


private void OnFileSaveAs(ob ject sender, EventArgs e)
if (dlgSaveFile.Sh owDialog() == DialogResult.OK )
filename = dlgSaveFile.Fil eName;

private void SaveFile()
File.WriteAllTe xt(filename, this.textBoxEdi t.Text);
catch(IOExcepti on ex)
MessageBox.Show (ex.Message, "Simple Editor",
MessageBoxButto ns.AbortRetryIg nore,MessageBox Icon.Hand);

protected void SetFormTitle()
Text = new FileInfo(filena me).Name + "- Simple Editor";

private void OnFilePrint(obj ect sender, EventArgs e)
if (this.textBoxEd it.SelectedText != "")
dlgPrint.AllowS election = true;

if (dlgPrint.ShowD ialog() == DialogResult.OK )
printDocument.P rint();

private void OnFilePrintPrev iew(object sender, EventArgs e)
{ dlgPrintPreview .ShowDialog(); }

private void OnFilePageSetup (object sender, EventArgs e)
{ dlgPageSetup.Sh owDialog(); }

private void OnExit(object sender, EventArgs e)
{ Application.Exi t(); }

private void OnPrintPage(obj ect sender, PrintPageEventA rgs e)
int x = e.MarginBounds. Left;
int y = e.MarginBounds. Top;

while (linesPrinted < lines.Length) //antal rader att printa
e.Graphics.Draw String(lines[linesPrinted++],
this.fontDialog .Font, printBrush, x, y);
y += textBoxEdit.Fon t.Height;

if (y >= e.MarginBounds. Bottom)
e.HasMorePages = true;

private void OnBeginPrint(ob ject sender, PrintEventArgs e)
char[] param = { '\n' };

if (dlgPrint.Print erSettings.Prin tRange == PrintRange.Sele ction)
lines = textBoxEdit.Sel ectedText.Split (param);
lines = textBoxEdit.Tex t.Split(param);

//int i = 0;
//char[] trimParam = { '\r' };

//foreach (string s in lines)
// lines[i++] = s.TrimEnd(trimP aram);
if (this.dlgPrint. PrinterSettings .SupportsColor)
printBrush = new SolidBrush(text BoxEdit.ForeCol or);
printBrush = Brushes.Black;

private void OnEndPrint(obje ct sender, PrintEventArgs e)
{ lines = null; }
private void fontToolStripMe nuItem_Click(ob ject sender, EventArgs e)
if (fontDialog.Sho wDialog() == DialogResult.OK )
textBoxEdit.Fon t = fontDialog.Font ;

private void colorToolStripM enuItem_Click(o bject sender, EventArgs
if (colorDialog.Sh owDialog() == DialogResult.OK )
textBoxEdit.For eColor = colorDialog.Col or;

Jul 21 '08 #1
0 1161

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

Similar topics

by: Sean Campbell | last post by:
Hi, My group have a ASP.NET based application ( currently running on 1.0.3705 ). Ideally, we would like to deploy new components(asp files/assemblies/db updates) into a live environment without interuption. However, it appears that upon deploying new assemblies to \appbase\bin we immediately get 'Access is denied: xxx.dll' exceptions...
by: Terry H | last post by:
Hi I am deploying a winforms app via the windows installer and a VS.Net 2003 setup and deploymnet project. At the moment, I am adding launch conditions for the .Net Framework 1.1 and MDAC 2.7 or higher, and am prompting the user to run the relevant setup files if they're missing. I'm including these setup files on the CD. I can't work...
by: dansan | last post by:
We have a webservice that we have been deploying using the deployment project in Visual Studio. Now we are trying to deploy this service to a server that has multiple sites. I have looked everywhere in the deployement project to see where I can allow the person installing to choose the root, but I can't find anything. Is there a way to...
by: Flip | last post by:
I am deploying webapps using XP (IIS5) and deploying them to a Windows 2003 Server box (IIS6). So far so good. However, when I try to manage my w2k3 server from XP, I get an error message saying I can't manage an IIS6 box from IIS5. Is anyone else seeing this? Can I take my w2k3 server CDs and install IIS6 on my XP box? Do I have to...
by: Rachel | last post by:
Hi, I am using the data access application block successfully in our development environment, however when I deploy to our testing server as Private Assemblies I keep getting the following Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the...
by: john | last post by:
I think some of the changes to Asp.net are rediculous. Take the ability to deploy source code to production that is compiled on the fly. If this is such a great model, why not distribute your source code with your Windows Forms apps too? John Powell
by: Jeff | last post by:
Hey I've installed DotNetNuke Starter Kit (4.3.4) together with visual web developer 2005 express on my development computer So now I'm able to create DotNetNuke portals using vwd. But this is as I mention on my development computer with vwd. But what if I have a client which have asked me to create a DotNetNuke site for them. They of...
by: milind | last post by:
tell more about .net framework EggHeadCafe.com - .NET Developer Portal of Choice http://www.eggheadcafe.com
by: =?Utf-8?B?d2lsbGlhbQ==?= | last post by:
Hi All, I've seen a lot of articles which show you how to deploy asp.net web application and web service, but all of them deploy application/web service under default folder virtual directory. But I think it make more sense that deploying diffenrent application/web service as separate web site, so that it's easy for us to maintain later on....
by: RobinS | last post by:
My company is considering moving up from .Net 2.0 to .Net 3.5(SP1) as a prerequisite on the ClickOnce deployment for our application. Does anybody have any experience deploying .Net 3.5 either as a prerequisite, or just by itself? Have you had any problems installing it? One issue I've seen reported is when pushed as a prerequisite, it...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.