473,811 Members | 1,881 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\micr osoft.net\frame work\v2.0.50727 \caspol.exe -cg
LocalIntranet_Z one 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 .SecurityExcept ion: Request for the
permission of type 'System.Securit y.Permissions.F ileIOPermission , mscorlib,
Version=2.0.0.0 , Culture=neutral , PublicKeyToken= b77a5c561934e08 9' failed.
at System.Security .CodeAccessSecu rityEngine.Chec k(Object demand,
StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security .CodeAccessPerm ission.Demand()
at System.Reflecti on.Assembly.Ver ifyCodeBaseDisc overy(String codeBase)
at System.Reflecti on.Assembly.Get Name(Boolean copiedName)
at System.Reflecti on.Assembly.Get Name()
at Mono.GetOptions .OptionList.Ext ractEntryAssemb lyInfo(Type optionsType)
at Mono.GetOptions .OptionList..ct or(Options optionBundle)
at Mono.GetOptions .Options.Proces sArgs(String[] args)
at TuitionSupervis orEmail.Program .Main(String[] args)
The action that failed was:
Demand
The type of the first permission that failed was:
System.Security .Permissions.Fi leIOPermission
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 ExtractEntryAss emblyInfo(Syste m.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 5700
PS

"toby" <to**@discussio ns.microsoft.co mwrote in message
news:3A******** *************** ***********@mic rosoft.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\micr osoft.net\frame work\v2.0.50727 \caspol.exe -cg
LocalIntranet_Z one 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 .SecurityExcept ion: Request for the
permission of type 'System.Securit y.Permissions.F ileIOPermission ,
mscorlib,
Version=2.0.0.0 , Culture=neutral , PublicKeyToken= b77a5c561934e08 9' failed.
at System.Security .CodeAccessSecu rityEngine.Chec k(Object demand,
StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security .CodeAccessPerm ission.Demand()
at System.Reflecti on.Assembly.Ver ifyCodeBaseDisc overy(String codeBase)
at System.Reflecti on.Assembly.Get Name(Boolean copiedName)
at System.Reflecti on.Assembly.Get Name()
at Mono.GetOptions .OptionList.Ext ractEntryAssemb lyInfo(Type optionsType)
at Mono.GetOptions .OptionList..ct or(Options optionBundle)
at Mono.GetOptions .Options.Proces sArgs(String[] args)
at TuitionSupervis orEmail.Program .Main(String[] args)
The action that failed was:
Demand
The type of the first permission that failed was:
System.Security .Permissions.Fi leIOPermission
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 ExtractEntryAss emblyInfo(Syste m.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**@discussio ns.microsoft.co mwrote in message
news:3A******** *************** ***********@mic rosoft.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\micr osoft.net\frame work\v2.0.50727 \caspol.exe -cg
LocalIntranet_Z one 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**@discussio ns.microsoft.co mwrote in message
news:42******** *************** ***********@mic rosoft.com...
>

"PS" wrote:
>>
"toby" <to**@discussio ns.microsoft.co mwrote in message
news:3A******* *************** ************@mi crosoft.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\micr osoft.net\frame work\v2.0.50727 \caspol.exe -cg
LocalIntranet_Z one 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
2367
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
1159
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 Server. The TS is set up and operating beautifully (I'm not the client's sysadmin, but I *trained* the...
8
3349
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 noticed the security exception is happening at that below line of code. Dim rs As New...
2
2169
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 on the network drive. My question is how can I create the security in the dot net framework...
10
1683
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 Framework Configuration tool cannot show this list of assembly dependencies for this application due...
6
5704
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
5613
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 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral,...
18
2039
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 and recommendation to the question as to this particular set of circumstances. I have 20 Security...
0
9728
marktang
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9605
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10648
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10135
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9205
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6890
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5692
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4339
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
3
3018
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.