cancel
Showing results for 
Search instead for 
Did you mean: 

.NET Proxy exe giving error when executed from shared folder

Former Member
0 Kudos

Hi All,

I'm facing a rather unique problem. I've created a .NET exe using SAP .NET Connector that calls a RFC function module and fetches some data from SAP.

The problem that I'm facing is when I execute this exe from any folder (having all the dll in the same folder), it just runs fine and gets the data. But when I execute the same exe from a shared folder (actually the same folder and the same exe; accessed thru shared folder) it gives me the following error - Required permissions cannot be acquired. (Type - System.Security.Policy.PolicyException)

E.g.- Execute from C:\folder\proxy.exe - runs fine

Execute from
mymachine\folder\proxy.exe - bombs out

Can anybody help me out with this.

Thanks and regards,

Ashin

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

See if this helps,

You can either relax the .Net security policy or define a code group that includes the specific share that you want to allow code to run from.

Start "Microsoft .Net Framework 1.1 Configuration" under "Administrative Tools" in the start menu or control panel. Select "Configure Code Access Security Policy" from the Tasks on the "My Computer". select the "Adjust Zone Security" and play around.

Thanks and Regards,

Aniruddha Gargya

reiner_hille-doering
Active Contributor
0 Kudos

In addition to the very good answer from Aniruddha, let me add the following information:

- SAP.Connector.Rfc needs usually full trust, because it calls into the unmanaged DLL LIBRFC32.DLL. SAP.Connector.dll does not need special trust - if you use SOAP instead of RFC, your program should also run with partial trust.

- A good way to quickly eliminate .NET security related problems is to turn .NET security off: "caspol -s off". Of cause you should turn it on again later .