Running aplication from share on other server

M

Marek

Whe i'm running my .net aplication from share on other server, i've got an
error. Can someone explain what i must do?

Unhandle exception:System.Security.SecurityException: Permission demand type
System.Security.Permissions.EnvironmentPermission, mscorlib,
Version=1.0.5000.
0, Culture=neutral, PublicKeyToken=b77a5c561934e089 not succed.
at System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet
granted
Set, PermissionSet deniedSet, CodeAccessPermission demand, PermissionToken
permT
oken)
at System.Security.CodeAccessSecurityEngine.Check(PermissionToken
permToken,
CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 checkFrames,
Int32
unrestrictedOverride)
at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission
cap, S
tackCrawlMark& stackMark)
at System.Security.CodeAccessPermission.Demand()
at System.Environment.GetCommandLineArgs()
at KANA_Szperacz.Module1.Main()

Permission state, which wans't granted:
<IPermission class="System.Security.Permissions.EnvironmentPermission,
mscorlib
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Read="Path"/>
 
?

=?ISO-8859-1?Q?=22Patrik_L=F6wendahl_=5BC=23_MVP=5

This is the Code Access Security engine kicking in.

CAS don't really care who you are, just where your code runs from (or
who published the code). Since the share is considered a part of the
LocalIntranet Zone, it's blocked from doing certain operations.

CAS is configured in the .NET Configuraion tool (Administrative
tools->.NET Configuration).

What you need to do is to give your location better permissions. The key
to that is creating a new Code Group that matches your location.
 
G

Guest

Hi Marek...

This is because the default security policy of the CLR is to grant only
partial trust to any code that originates from a network location. In other
words, by default your application is only fully trusted if it originates
from a hard drive location in your local system. When partially trusted code
attempts an action that it is not permitted to perform, the results are which
you got ...a SecurityException.

You need to give "FULL" right to your application....

HTH

With Best Regards
Naveen K S
 
M

Marek

This aplication is on one server in our LAN. I'm running it from my station.
I have full access permission at server and at my station (local
administrator).
 
?

=?ISO-8859-1?Q?=22Patrik_L=F6wendahl_=5BC=23_MVP=5

Marek,

as I replied in my previous post, .NET security doesn't care what
permmissions you as a user has, it only care about what permission the
code itself has. When running from a Lan - server the code is'nt granted
to many permissions.
 
M

Marek

Can you show me, where i can find this tools?
Or where i can set privilages for my aplication?

Uzytkownik ""Patrik Löwendahl [C# MVP]""
Marek,

as I replied in my previous post, .NET security doesn't care what
permmissions you as a user has, it only care about what permission the
code itself has. When running from a Lan - server the code is'nt granted
to many permissions.

--
Patrik Löwendahl [C# MVP]
cshrp.net - 'Elegant code by witty programmers'
cornerstone.se 'IT Training for professionals'
This aplication is on one server in our LAN. I'm running it from my
station. I have full access permission at server and at my station (local
administrator).
 
C

C-Services Holland b.v.

Marek said:
Can you show me, where i can find this tools?
Or where i can set privilages for my aplication?

Marek,

as I replied in my previous post, .NET security doesn't care what
permmissions you as a user has, it only care about what permission the
code itself has. When running from a Lan - server the code is'nt granted
to many permissions.

--
Patrik Löwendahl [C# MVP]
cshrp.net - 'Elegant code by witty programmers'
cornerstone.se 'IT Training for professionals'
This aplication is on one server in our LAN. I'm running it from my
station. I have full access permission at server and at my station (local
administrator).

U¿ytkownik "Naveen" <[email protected]> napisa³ w
wiadomo¶ci

Hi Marek...

This is because the default security policy of the CLR is to grant only
partial trust to any code that originates from a network location. In
other
words, by default your application is only fully trusted if it originates

from a hard drive location in your local system. When partially trusted

code
attempts an action that it is not permitted to perform, the results are
which
you got ...a SecurityException.

You need to give "FULL" right to your application....

HTH

With Best Regards
Naveen K S

:



Whe i'm running my .net aplication from share on other server, i've got
an
error. Can someone explain what i must do?

Unhandle exception:System.Security.SecurityException: Permission demand
type
System.Security.Permissions.EnvironmentPermission, mscorlib,
Version=1.0.5000.
0, Culture=neutral, PublicKeyToken=b77a5c561934e089 not succed.
at System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet
granted
Set, PermissionSet deniedSet, CodeAccessPermission demand,
PermissionToken
permT
oken)
at System.Security.CodeAccessSecurityEngine.Check(PermissionToken
permToken,
CodeAccessPermission demand, StackCrawlMark& stackMark, Int32
checkFrames,
Int32
unrestrictedOverride)
at
System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission
cap, S
tackCrawlMark& stackMark)
at System.Security.CodeAccessPermission.Demand()
at System.Environment.GetCommandLineArgs()
at KANA_Szperacz.Module1.Main()

Permission state, which wans't granted:
<IPermission class="System.Security.Permissions.EnvironmentPermission,
mscorlib
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Read="Path"/>

I'm interested in this too. Can it be set from a setup program (probably
not due to security issues). Or should I just include it in the manual
on how to set it using the .net framework configuration?
 
M

Marek

In my application i'm trying only to run program. It runs with parameter or
without it. In this option(running from share) it runs without. It has
config file, but in this option it don't use it.
There is only one function that runs gpresult.exe build in Windows.
I tried with .NET Configuration, but it still doesn't work....


Uzytkownik "C-Services Holland b.v. said:
Marek said:
Can you show me, where i can find this tools?
Or where i can set privilages for my aplication?

Marek,

as I replied in my previous post, .NET security doesn't care what
permmissions you as a user has, it only care about what permission the
code itself has. When running from a Lan - server the code is'nt granted
to many permissions.

--
Patrik Löwendahl [C# MVP]
cshrp.net - 'Elegant code by witty programmers'
cornerstone.se 'IT Training for professionals'

Marek wrote:

This aplication is on one server in our LAN. I'm running it from my
station. I have full access permission at server and at my station
(local administrator).

U¿ytkownik "Naveen" <[email protected]> napisa³ w
wiadomo¶ci

Hi Marek...

This is because the default security policy of the CLR is to grant only
partial trust to any code that originates from a network location. In
other
words, by default your application is only fully trusted if it
originates

from a hard drive location in your local system. When partially trusted

code
attempts an action that it is not permitted to perform, the results are
which
you got ...a SecurityException.

You need to give "FULL" right to your application....

HTH

With Best Regards
Naveen K S

:



Whe i'm running my .net aplication from share on other server, i've
got an
error. Can someone explain what i must do?

Unhandle exception:System.Security.SecurityException: Permission
demand type
System.Security.Permissions.EnvironmentPermission, mscorlib,
Version=1.0.5000.
0, Culture=neutral, PublicKeyToken=b77a5c561934e089 not succed.
at
System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet
granted
Set, PermissionSet deniedSet, CodeAccessPermission demand,
PermissionToken
permT
oken)
at System.Security.CodeAccessSecurityEngine.Check(PermissionToken
permToken,
CodeAccessPermission demand, StackCrawlMark& stackMark, Int32
checkFrames,
Int32
unrestrictedOverride)
at
System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission
cap, S
tackCrawlMark& stackMark)
at System.Security.CodeAccessPermission.Demand()
at System.Environment.GetCommandLineArgs()
at KANA_Szperacz.Module1.Main()

Permission state, which wans't granted:
<IPermission class="System.Security.Permissions.EnvironmentPermission,
mscorlib
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Read="Path"/>

I'm interested in this too. Can it be set from a setup program (probably
not due to security issues). Or should I just include it in the manual on
how to set it using the .net framework configuration?
 

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