473,394 Members | 1,701 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 3843
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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
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
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...

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.