473,466 Members | 1,394 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Application fails to load from network drive with PolicyException

In my app I use some COM objects and as long as this app is on local C drive
it loads fine. As soon as I copy the app to a mapped network drive it fails
to load with "System.Security.Policy.PolicyException: Required permissions
cannot be acquired."
Why would that happen?
Jul 21 '05 #1
6 3844
Because when you run it from the mapped drive, your code is assigned to
local intranet code group which is not allowed to call unmanaged code.

-Valery.

http://www.harper.no/valery

"Maksim Chepel" <ma****@datacap.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
In my app I use some COM objects and as long as this app is on local C
drive
it loads fine. As soon as I copy the app to a mapped network drive it
fails
to load with "System.Security.Policy.PolicyException: Required permissions
cannot be acquired."
Why would that happen?

Jul 21 '05 #2
So what to do?

"Valery Pryamikov" <Va****@nospam.harper.no> wrote in message
news:uz**************@TK2MSFTNGP12.phx.gbl...
Because when you run it from the mapped drive, your code is assigned to
local intranet code group which is not allowed to call unmanaged code.

-Valery.

http://www.harper.no/valery

"Maksim Chepel" <ma****@datacap.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
In my app I use some COM objects and as long as this app is on local C
drive
it loads fine. As soon as I copy the app to a mapped network drive it
fails
to load with "System.Security.Policy.PolicyException: Required permissions
cannot be acquired."
Why would that happen?


Jul 21 '05 #3
You can either run your code from local computer zone or use Microsoft .Net
Framework Wizards or Configuration (from Administrative Tools) to raise
trust for your assembly.

-Valery

http://www.harper.no/valery

"Maksim Chepel" <ma****@datacap.com> wrote in message
news:eT**************@tk2msftngp13.phx.gbl...
So what to do?

"Valery Pryamikov" <Va****@nospam.harper.no> wrote in message
news:uz**************@TK2MSFTNGP12.phx.gbl...
Because when you run it from the mapped drive, your code is assigned to
local intranet code group which is not allowed to call unmanaged code.

-Valery.

http://www.harper.no/valery

"Maksim Chepel" <ma****@datacap.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
In my app I use some COM objects and as long as this app is on local C
drive
it loads fine. As soon as I copy the app to a mapped network drive it
fails
to load with "System.Security.Policy.PolicyException: Required
permissions
cannot be acquired."
Why would that happen?


Jul 21 '05 #4
O! Ok! I see! Is it possible to adjust these automaticaly like during
instalation?
"Valery Pryamikov" <Va****@nospam.harper.no> wrote in message
news:eP*************@tk2msftngp13.phx.gbl...
You can either run your code from local computer zone or use Microsoft .Net
Framework Wizards or Configuration (from Administrative Tools) to raise
trust for your assembly.

-Valery

http://www.harper.no/valery

"Maksim Chepel" <ma****@datacap.com> wrote in message
news:eT**************@tk2msftngp13.phx.gbl...
So what to do?

"Valery Pryamikov" <Va****@nospam.harper.no> wrote in message
news:uz**************@TK2MSFTNGP12.phx.gbl...
Because when you run it from the mapped drive, your code is assigned to
local intranet code group which is not allowed to call unmanaged code.

-Valery.

http://www.harper.no/valery

"Maksim Chepel" <ma****@datacap.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
In my app I use some COM objects and as long as this app is on local C
drive
it loads fine. As soon as I copy the app to a mapped network drive it
fails
to load with "System.Security.Policy.PolicyException: Required
permissions
cannot be acquired."
Why would that happen?



Jul 21 '05 #5
Yes it is possible if you have setup/msi install file.
You can find such sample msi setup on Chris Sells's web site
http://www.sellsbrothers.com/wahoo/

-Valery.

http://www.harper.no/valery

"Maksim Chepel" <ma****@datacap.com> wrote in message
news:ub*****************@TK2MSFTNGP10.phx.gbl...
O! Ok! I see! Is it possible to adjust these automaticaly like during
instalation?
"Valery Pryamikov" <Va****@nospam.harper.no> wrote in message
news:eP*************@tk2msftngp13.phx.gbl...
You can either run your code from local computer zone or use Microsoft
.Net
Framework Wizards or Configuration (from Administrative Tools) to raise
trust for your assembly.

-Valery

http://www.harper.no/valery

"Maksim Chepel" <ma****@datacap.com> wrote in message
news:eT**************@tk2msftngp13.phx.gbl...
So what to do?

"Valery Pryamikov" <Va****@nospam.harper.no> wrote in message
news:uz**************@TK2MSFTNGP12.phx.gbl...
Because when you run it from the mapped drive, your code is assigned to
local intranet code group which is not allowed to call unmanaged code.

-Valery.

http://www.harper.no/valery

"Maksim Chepel" <ma****@datacap.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
In my app I use some COM objects and as long as this app is on local C
drive
it loads fine. As soon as I copy the app to a mapped network drive it
fails
to load with "System.Security.Policy.PolicyException: Required
permissions
cannot be acquired."
Why would that happen?



Jul 21 '05 #6
Thanks a lot! I'm guessing it's doable from the .NET studio, right?

"Valery Pryamikov" <Va****@nospam.harper.no> wrote in message
news:eu**************@TK2MSFTNGP12.phx.gbl...
Yes it is possible if you have setup/msi install file.
You can find such sample msi setup on Chris Sells's web site
http://www.sellsbrothers.com/wahoo/

-Valery.

http://www.harper.no/valery

"Maksim Chepel" <ma****@datacap.com> wrote in message
news:ub*****************@TK2MSFTNGP10.phx.gbl...
O! Ok! I see! Is it possible to adjust these automaticaly like during
instalation?
"Valery Pryamikov" <Va****@nospam.harper.no> wrote in message
news:eP*************@tk2msftngp13.phx.gbl...
You can either run your code from local computer zone or use Microsoft
.Net
Framework Wizards or Configuration (from Administrative Tools) to raise
trust for your assembly.

-Valery

http://www.harper.no/valery

"Maksim Chepel" <ma****@datacap.com> wrote in message
news:eT**************@tk2msftngp13.phx.gbl...
So what to do?

"Valery Pryamikov" <Va****@nospam.harper.no> wrote in message
news:uz**************@TK2MSFTNGP12.phx.gbl...
Because when you run it from the mapped drive, your code is assigned to
local intranet code group which is not allowed to call unmanaged code.

-Valery.

http://www.harper.no/valery

"Maksim Chepel" <ma****@datacap.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
In my app I use some COM objects and as long as this app is on local C
drive
it loads fine. As soon as I copy the app to a mapped network drive it
fails
to load with "System.Security.Policy.PolicyException: Required
permissions
cannot be acquired."
Why would that happen?




Jul 21 '05 #7

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

Similar topics

6
by: Maksim Chepel | last post by:
In my app I use some COM objects and as long as this app is on local C drive it loads fine. As soon as I copy the app to a mapped network drive it fails to load with...
5
by: Bob L. | last post by:
Hi everyone, I have two small applications I have written that I am trying run from a network directory. Both applications have a dependency on another assembly (.dll), and I have .NET security...
7
by: Eric.Jones | last post by:
I've encountered a strange error with loading delimited files from a Samba (SMB) network drive, has anyone else seen this before? (Platform: WinXP Pro, UDB PE 8015, level 02060106, SAMPLE db) ...
14
by: Jasonkimberson | last post by:
Currently I am having a problem creating a windows service that monitors a mapped drive for events (using the FileSystemEventHandler). The service complies but fails to start: "The XMLWatcher...
3
by: James N | last post by:
My ASP.NET application needs read/write permissions for drive "Z:", which is mapped to my Linksys Gigadrive (Network Attached Storage...if anyone is familiar with that). If I configure the...
8
by: mike2036 | last post by:
I have an application (that has unmanaged code) and when I launch it without 'FullTrust' permissions (LocalIntranet_Zone), it crashes. When I set 'FullTrust' permissions, it launches fine. Is...
2
by: jphelan | last post by:
Ever since I successfully applied some techniques for increasing the speed of my 17 meg. Application; it has only made me hunger for more. First, let me list what I have done so far: 1. Split...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
0
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.