473,513 Members | 3,317 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Security issue in .NET 2.0 app on Network drive

Our company deploys our .NET 2.0 apps to a network drive for them to be run.
We are having issues with security in getting these to run. Below is a sample
output for a job that is trying to call a DLL and failing.

Since the .NET 2.0 Config control panel applet is no longer included with
the framework, we ran the following command line to allow full trust on Local
Intranet apps:

c:\windows\microsoft.net\framework\v2.0.50727\casp ol.exe -cg
LocalIntranet_Zone FullTrust

However, looking at the error output, it seems as though it's putting our
assembly into the Internet zone, even though it's on a local network? Does
this mean we need to modify the Internet Options to explicitly allow that
network path? Why doesn't it automatically recognize that this is a Local
Intranet location, since it is internal to our AD domain?

Here is the error output:

-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
Unhandled Exception: System.Security.SecurityException: Request for the
permission of type 'System.Security.Permissions.FileIOPermission, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.Security.CodeAccessSecurityEngine.Check(Obj ect demand,
StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.Reflection.Assembly.VerifyCodeBaseDiscovery (String codeBase)
at System.Reflection.Assembly.GetName(Boolean copiedName)
at System.Reflection.Assembly.GetName()
at Mono.GetOptions.OptionList.ExtractEntryAssemblyInf o(Type optionsType)
at Mono.GetOptions.OptionList..ctor(Options optionBundle)
at Mono.GetOptions.Options.ProcessArgs(String[] args)
at TuitionSupervisorEmail.Program.Main(String[] args)
The action that failed was:
Demand
The type of the first permission that failed was:
System.Security.Permissions.FileIOPermission
The first permission that failed was:

The demand was for:

The granted set of the failing assembly was:

The assembly or AppDomain that failed was:
Mono.GetOptions, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
The method that caused the failure was:
Void ExtractEntryAssemblyInfo(System.Type)
The Zone of the assembly that failed was:
Internet
The Url of the assembly that failed was:
file://path/to/app/folder/Mono.GetOptions.DLL
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~

Thanks,
toby
Feb 14 '07 #1
3 5672
PS

"toby" <to**@discussions.microsoft.comwrote in message
news:3A**********************************@microsof t.com...
Our company deploys our .NET 2.0 apps to a network drive for them to be
run.
We are having issues with security in getting these to run. Below is a
sample
output for a job that is trying to call a DLL and failing.

Since the .NET 2.0 Config control panel applet is no longer included with
the framework, we ran the following command line to allow full trust on
Local
Intranet apps:

c:\windows\microsoft.net\framework\v2.0.50727\casp ol.exe -cg
LocalIntranet_Zone FullTrust
Is an IP address used in the path to the assembly? Are any machines running
Vista?

PS
>
However, looking at the error output, it seems as though it's putting our
assembly into the Internet zone, even though it's on a local network? Does
this mean we need to modify the Internet Options to explicitly allow that
network path? Why doesn't it automatically recognize that this is a Local
Intranet location, since it is internal to our AD domain?

Here is the error output:

-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
Unhandled Exception: System.Security.SecurityException: Request for the
permission of type 'System.Security.Permissions.FileIOPermission,
mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.Security.CodeAccessSecurityEngine.Check(Obj ect demand,
StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.Reflection.Assembly.VerifyCodeBaseDiscovery (String codeBase)
at System.Reflection.Assembly.GetName(Boolean copiedName)
at System.Reflection.Assembly.GetName()
at Mono.GetOptions.OptionList.ExtractEntryAssemblyInf o(Type optionsType)
at Mono.GetOptions.OptionList..ctor(Options optionBundle)
at Mono.GetOptions.Options.ProcessArgs(String[] args)
at TuitionSupervisorEmail.Program.Main(String[] args)
The action that failed was:
Demand
The type of the first permission that failed was:
System.Security.Permissions.FileIOPermission
The first permission that failed was:

The demand was for:

The granted set of the failing assembly was:

The assembly or AppDomain that failed was:
Mono.GetOptions, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
The method that caused the failure was:
Void ExtractEntryAssemblyInfo(System.Type)
The Zone of the assembly that failed was:
Internet
The Url of the assembly that failed was:
file://path/to/app/folder/Mono.GetOptions.DLL
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~

Thanks,
toby

Feb 15 '07 #2


"PS" wrote:
>
"toby" <to**@discussions.microsoft.comwrote in message
news:3A**********************************@microsof t.com...
Our company deploys our .NET 2.0 apps to a network drive for them to be
run.
We are having issues with security in getting these to run. Below is a
sample
output for a job that is trying to call a DLL and failing.

Since the .NET 2.0 Config control panel applet is no longer included with
the framework, we ran the following command line to allow full trust on
Local
Intranet apps:

c:\windows\microsoft.net\framework\v2.0.50727\casp ol.exe -cg
LocalIntranet_Zone FullTrust

Is an IP address used in the path to the assembly? Are any machines running
Vista?

PS
Hello,

No, we were using a UNC path to run the app. I was able to work around this
by adding "file://server" to the Local Intranet zone under Internet Options.
I'm still not sure though, why this was turned into a file URI in the first
place.
Feb 15 '07 #3
PS

"toby" <to**@discussions.microsoft.comwrote in message
news:42**********************************@microsof t.com...
>

"PS" wrote:
>>
"toby" <to**@discussions.microsoft.comwrote in message
news:3A**********************************@microso ft.com...
Our company deploys our .NET 2.0 apps to a network drive for them to be
run.
We are having issues with security in getting these to run. Below is a
sample
output for a job that is trying to call a DLL and failing.

Since the .NET 2.0 Config control panel applet is no longer included
with
the framework, we ran the following command line to allow full trust on
Local
Intranet apps:

c:\windows\microsoft.net\framework\v2.0.50727\casp ol.exe -cg
LocalIntranet_Zone FullTrust

Is an IP address used in the path to the assembly? Are any machines
running
Vista?

PS

Hello,

No, we were using a UNC path to run the app. I was able to work around
this
by adding "file://server" to the Local Intranet zone under Internet
Options.
I'm still not sure though, why this was turned into a file URI in the
first
place.
I assume the computers were running IE7?

PS
Feb 15 '07 #4

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

Similar topics

4
490
by: Seeheng | last post by:
I've created a VB.Net program running perfectly under local hard drive. But when move it to a network path (both UNC name and drive mapping tested), it gave "An exception 'System.Security.SecurityException' has occurred". Anybody has any idea to resolve this issue? Appreciate any advise.
1
2338
by: Namratha Shah \(Nasha\) | last post by:
Hey Guys, Before we start with our sample app we need to view the security configuration files on the machine. You will find them under <drive>\WInNT\Microsoft.NET\FrameWork\<version>\Config Enterprise Level Security configuration file is :- enterprise.config Machine Level Security configuration file is :- security.config
5
1140
by: David W. Fenton | last post by:
I am posting this to the newsgroup because I wasted some time on Friday troubleshooting a problem of my own making. Other people might benefit from hearing about it. I'm working on the final touches to an app that's going to be run by 3 people in an office from their workstations, and about 10 other people remotely via Windows Terminal...
8
3341
by: Brian | last post by:
I have a vb.net application which runs fine when installed locally on a user machine but when the application is run from a network drive a security exception error occurs. I've set the intranet zone through the .Net Configuration wizard to Full Trust and the app still has a security exception. I've turned on Just in Time Debugging and...
2
2144
by: Steven | last post by:
I have developed an application using VB.NET, it works fine in my local drive. However, security exception is flowed when I try to run the release program under a network drive. I have signed the exe and dll files with sn.exe and configure the security policy in the dot net framework configuration. Finally, I can run the program successfully...
10
1657
by: Richard MSL | last post by:
I am having problems working with .net security. I have been attempting to use the Microsoft .Net Framework 2.0 Configuration tool (version 2.0.50727.42), but it won't work for me. I have a simple test application that works, when I run to Manage Applications - View Assembly Dependencies, I get an error that says: Unfortunately, the .NET...
6
5680
by: alex | last post by:
Hi, this always works: private ConsoleToTextbox myConsole; Console.SetOut(myConsole); But now (a few weeks later i started this project again) i get a non handeld security exception from system.security.permissions.securitypermission when i try to run the program.
7
5595
by: GMiller | last post by:
I am fairly new to .NET programming so this may be a simplistic question. I wrote a C# application that reads and writes files. If the program resides on a local drive everything is fine. If the program resides on a network drive then I get the following error. System.Security.SecurityException: Request for the permission of type...
18
2005
by: Earl Anderson | last post by:
First, I feel somewhat embarrassed and apologetic that this post is lengthy, but in an effort to furnish sufficient information (as opposed to too little information) to you, I wanted to supply all of the relevant facts. Second, despite the fact that I think the obvious 'quick' answer to my question would be 'Yes', I am seeking your wisdom...
0
7177
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7394
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, 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. ...
0
7559
jinu1996
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...
0
7542
tracyyun
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...
0
5701
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5100
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4756
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...
0
3248
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...
1
811
muto222
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.