0

I have created a webservice which also has a client (console app). This client is placed on a mapped drive. Calling the service results in an error with the log4net dll. The error is a ThrowSecurityException and the message it has is something like this (I only have the German text, so I have to translate): The assembly only allows callers which are fully trustworthy.

The dll is in the same directory as the client exe file. I tested on a normal drive and it works fine. Ideas here?

John Saunders
  • 160,644
  • 26
  • 247
  • 397
grady
  • 12,281
  • 28
  • 71
  • 110

2 Answers2

0

try to give the dll read permission to everyone http://technet.microsoft.com/en-us/library/bb727008.aspx you might need to do it from the original location. try to change the securityPolicy section in your config file to this:

<system.web>
  <securityPolicy>
    <trustLevel name="Minimal" policyFile="web_minimaltrust.config"/>
  </securityPolicy>
</system.web>

you can read about it here: http://msdn.microsoft.com/en-us/library/wyts434y.aspx

kleinohad
  • 5,800
  • 2
  • 26
  • 34
0

You need to assign FullTrust to the network drive (it has LocalIntranet by default). I think this should be similar as for a network share. See Using CasPol to Fully Trust a Share.

Edit:

Or try something like this:

caspol -q -machine -addgroup 1 -url file://X:/* FullTrust -name "X Drive"

(replace X with your mapped drive letter)

Jakub Januszkiewicz
  • 4,380
  • 2
  • 37
  • 54
  • Have you tried examining the security policy of the mapped drive and of individual assemblies that you execute? Did the `caspol` command that you ran have any effect on the security policy? – Jakub Januszkiewicz Aug 28 '11 at 20:48