Security / Permissions problems running over network!

L

leeedw

Hi All,

I have a windows app that runs perfectly on my machine, but when I try
to run it over the network it bombs. I get a permissions error.

Here is the code, I even tried adding FileIOPermission code but to no
avail:

objFilePermission = FileIOPermission
(Security.Permissions.FileIOPermissionAccess.AllAccess, sFileName)

objFilePermission.Demand()

objStreamReader = New System.IO.StreamReader(sFileName)
*** Bombs right here ***

The error I get is:
Request for the permission of type
System.Security.Permissions.FileIOPermission, mscorlib,
Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
failed.

I even added my entire computer to the FullTrust permission using:
caspol -ag 1. -site myservername FullTrust

I also tried adding modifying the Runtime Security
Policy->Machine->Code Groups->All_Code->LocalIntranet_Zone to FullTrust
as well.

What am I missing here? Can anyone help?

Thanks
 
K

Ken Tucker [MVP]

Hi,

Try caspol -enterprise -addfulltrust yourassembly
Remember you can never give your application right to something the windows
user account does not allow.

Ken
 
L

luxspes

Ken said:
Hi,

Try caspol -enterprise -addfulltrust yourassembly
Remember you can never give your application right to something the windows
user account does not allow.
I have had a similar trouble with restricted users "Users" o "Guests"
(not power users)
How can I get the "list" of allowed ".NET Permissions" for the current
account? (So that I can know exactly which restriction I am violating,
and decide whether I should change my code or increase the privileges of
the user?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top