Deployment Permissions

R

RSH

I have built a VB application for distribution and I used the Setup builder
in Visual Studio. I had no problems compiling and installing the
application on two different machines. However on one machine (as luck
would have it...my bosses!) I am getting a .Net security warning that wont
allow a few important features to work.

Basically I am attempting to check for Commandline parameters...it doesn't
like that at all and after displaying the error message it shuts down my
app. If I comment out the check for Commandline parameters, the application
loads and runs until they use the open a directory function which displays
the same error.

I also get the error when attempting to open a connection to SQL Server.

Here is the error text:


"The application attempted to perform an operation not allowed by the
security policy. The operation required the SecurityException. To grant
this application the required permission please contact your system
administrator, or use the Microsoft .Net security policy administrator tool.

Request for the permission of type
System.Security.Permissions.FileIOPermission, mscorlib, version1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5561934e089 failed."



Thanks for any insight you might be able to offer.
RSH
 
K

Ken Tucker [MVP]

Hi,

Try requesting the permission in your code.
http://msdn.microsoft.com/library/d...nsFileIOPermissionAttributeClassctorTopic.asp

Ken
-----------------
I have built a VB application for distribution and I used the Setup builder
in Visual Studio. I had no problems compiling and installing the
application on two different machines. However on one machine (as luck
would have it...my bosses!) I am getting a .Net security warning that wont
allow a few important features to work.

Basically I am attempting to check for Commandline parameters...it doesn't
like that at all and after displaying the error message it shuts down my
app. If I comment out the check for Commandline parameters, the application
loads and runs until they use the open a directory function which displays
the same error.

I also get the error when attempting to open a connection to SQL Server.

Here is the error text:


"The application attempted to perform an operation not allowed by the
security policy. The operation required the SecurityException. To grant
this application the required permission please contact your system
administrator, or use the Microsoft .Net security policy administrator tool.

Request for the permission of type
System.Security.Permissions.FileIOPermission, mscorlib, version1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5561934e089 failed."



Thanks for any insight you might be able to offer.
RSH
 

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