Thanks for your reply.
Yes I am running the application from network share.
I am getting exception in 2 cases/applications
1. Application resides in the network share and I am accessing from
local machine, security exception occurs when the application tries to
connection to the access database.
2. Application resides in the network share and I am accessing from
local machine, security exception occurs when the application tries to
create a file in the netowrk share.
It would be great if you can send me a batch sample script to avoid
those.
Thanks
> Thanks for your reply.
>
[quoted text clipped - 5 lines]
> local machine, security exception occurs when the application tries to
> connection to the access database.
As you already know, you need to configure .NET security to allow .NET code
from outside the computer to run. Search the web for CASPOL.exe. there are
lot of links on this topic. Giving entire local intranet full trust in order
to load .NET app from network share is a bit too much. I usually create
code group, which pointing to a network folder. I then make that folder
read-only for all users, and only network admin/myself have write
permission. So, all .NET code can only get into this folder by admin/myself,
so I can give full trust to the folder.
I use this CASPOL.exe command to create the code group, which create a code
security group and pointing it to a network folder:
C:\Windows\Microsoft.net\framework\v2.0.50727\caspol -machine -addgroup
All_Code -url file://serverName/ShaerName/* FullTrust -name
MyNetAppCodeGroup -description "My NET Application Code Group"
Watch out line wrap. You can simply save this line as a text file with *.bat
extention, then run it on the computers.
> 2. Application resides in the network share and I am accessing from
> local machine, security exception occurs when the application tries to
> create a file in the netowrk share.
Whether your application can create/modify a file on a network folder or
(anywhere), depends on your network setup, i.e. if the login user, who is
running the application, has appropriate permission to do certain thing to
the file (read/write/delete...). You need to talk to the network/computer
administrator on this.
> It would be great if you can send me a batch sample script to avoid
> those.
[quoted text clipped - 39 lines]
>>
>> - Show quoted text -