473,499 Members | 1,710 Online
Bytes | Software Development & Data Engineering Community
+ 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 3846
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
535
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
488
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
19597
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
7168
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
10561
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
6025
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
2725
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...
0
7132
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
7009
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...
0
7223
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...
0
7390
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...
0
5475
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,...
1
4919
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...
0
3103
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
1427
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 ...
1
665
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.