By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,474 Members | 939 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,474 IT Pros & Developers. It's quick & easy.

Running aplication from share on other server

P: n/a
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.CheckHelp er(PermissionSet
granted
Set, PermissionSet deniedSet, CodeAccessPermission demand, PermissionToken
permT
oken)
at System.Security.CodeAccessSecurityEngine.Check(Per missionToken
permToken,
CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 checkFrames,
Int32
unrestrictedOverride)
at System.Security.CodeAccessSecurityEngine.Check(Cod eAccessPermission
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.EnvironmentPerm ission,
mscorlib
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Read="Path"/>
Nov 22 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
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.

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

Marek wrote:
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.CheckHelp er(PermissionSet
granted
Set, PermissionSet deniedSet, CodeAccessPermission demand, PermissionToken
permT
oken)
at System.Security.CodeAccessSecurityEngine.Check(Per missionToken
permToken,
CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 checkFrames,
Int32
unrestrictedOverride)
at System.Security.CodeAccessSecurityEngine.Check(Cod eAccessPermission
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.EnvironmentPerm ission,
mscorlib
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Read="Path"/>

Nov 22 '05 #2

P: n/a

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

"Marek" wrote:
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.CheckHelp er(PermissionSet
granted
Set, PermissionSet deniedSet, CodeAccessPermission demand, PermissionToken
permT
oken)
at System.Security.CodeAccessSecurityEngine.Check(Per missionToken
permToken,
CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 checkFrames,
Int32
unrestrictedOverride)
at System.Security.CodeAccessSecurityEngine.Check(Cod eAccessPermission
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.EnvironmentPerm ission,
mscorlib
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Read="Path"/>

Nov 22 '05 #3

P: n/a
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" <Na****@discussions.microsoft.com> napisał w wiadomości
news:4B**********************************@microsof t.com...

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

"Marek" wrote:
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.CheckHelp er(PermissionSet
granted
Set, PermissionSet deniedSet, CodeAccessPermission demand,
PermissionToken
permT
oken)
at System.Security.CodeAccessSecurityEngine.Check(Per missionToken
permToken,
CodeAccessPermission demand, StackCrawlMark& stackMark, Int32
checkFrames,
Int32
unrestrictedOverride)
at System.Security.CodeAccessSecurityEngine.Check(Cod eAccessPermission
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.EnvironmentPerm ission,
mscorlib
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Read="Path"/>

Nov 22 '05 #4

P: n/a
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" <Na****@discussions.microsoft.com> napisał w wiadomości
news:4B**********************************@microsof t.com...
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

"Marek" wrote:

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.EnvironmentPermissi on, mscorlib,
Version=1.0.5000.
0, Culture=neutral, PublicKeyToken=b77a5c561934e089 not succed.
at System.Security.CodeAccessSecurityEngine.CheckHelp er(PermissionSet
granted
Set, PermissionSet deniedSet, CodeAccessPermission demand,
PermissionToken
permT
oken)
at System.Security.CodeAccessSecurityEngine.Check(Per missionToken
permToken,
CodeAccessPermission demand, StackCrawlMark& stackMark, Int32
checkFrames,
Int32
unrestrictedOverride)
at System.Security.CodeAccessSecurityEngine.Check(Cod eAccessPermission
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.EnvironmentPerm ission,
mscorlib
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Read="Path"/>


Nov 22 '05 #5

P: n/a
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]""
<pa******************************@home.se> napisal w wiadomosci
news:uL**************@TK2MSFTNGP10.phx.gbl...
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" <Na****@discussions.microsoft.com> napisał w
wiadomości news:4B**********************************@microsof t.com...
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

"Marek" wrote:
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.EnvironmentPermiss ion, mscorlib,
Version=1.0.5000.
0, Culture=neutral, PublicKeyToken=b77a5c561934e089 not succed.
at System.Security.CodeAccessSecurityEngine.CheckHelp er(PermissionSet
granted
Set, PermissionSet deniedSet, CodeAccessPermission demand,
PermissionToken
permT
oken)
at System.Security.CodeAccessSecurityEngine.Check(Per missionToken
permToken,
CodeAccessPermission demand, StackCrawlMark& stackMark, Int32
checkFrames,
Int32
unrestrictedOverride)
at
System.Security.CodeAccessSecurityEngine.Check(Cod eAccessPermission
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.EnvironmentPerm ission,
mscorlib
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Read="Path"/>


Nov 22 '05 #6

P: n/a
Marek wrote:
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]""
<pa******************************@home.se> napisal w wiadomosci
news:uL**************@TK2MSFTNGP10.phx.gbl...
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" <Na****@discussions.microsoft.com> napisał w
wiadomości news:4B**********************************@microsof t.com...
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

"Marek" wrote:

>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.EnvironmentPermis sion, mscorlib,
>Version=1.0.5000.
>0, Culture=neutral, PublicKeyToken=b77a5c561934e089 not succed.
> at System.Security.CodeAccessSecurityEngine.CheckHelp er(PermissionSet
>granted
>Set, PermissionSet deniedSet, CodeAccessPermission demand,
>PermissionToken
>permT
>oken)
> at System.Security.CodeAccessSecurityEngine.Check(Per missionToken
>permToken,
>CodeAccessPermission demand, StackCrawlMark& stackMark, Int32
>checkFrames,
>Int32
>unrestrictedOverride)
> at
>System.Security.CodeAccessSecurityEngine.Chec k(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.EnvironmentPerm ission,
>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?

--
Rinze van Huizen
C-Services Holland b.v.
Nov 22 '05 #7

P: n/a
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." <cs*@REMOVEcsh4u.nl> napisal w
wiadomosci news:PO********************@zeelandnet.nl...
Marek wrote:
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]""
<pa******************************@home.se> napisal w wiadomosci
news:uL**************@TK2MSFTNGP10.phx.gbl...
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" <Na****@discussions.microsoft.com> napisał w
wiadomości news:4B**********************************@microsof t.com...
>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
>
>"Marek" wrote:
>
>
>
>>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.EnvironmentPermi ssion, mscorlib,
>>Version=1.0.5000.
>>0, Culture=neutral, PublicKeyToken=b77a5c561934e089 not succed.
>> at
>> System.Security.CodeAccessSecurityEngine.CheckHelp er(PermissionSet
>>granted
>>Set, PermissionSet deniedSet, CodeAccessPermission demand,
>>PermissionToken
>>permT
>>oken)
>> at System.Security.CodeAccessSecurityEngine.Check(Per missionToken
>>permToken,
>>CodeAccessPermission demand, StackCrawlMark& stackMark, Int32
>>checkFrames,
>>Int32
>>unrestrictedOverride)
>> at
>> System.Security.CodeAccessSecurityEngine.Check(Cod eAccessPermission
>>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.EnvironmentPerm ission,
>>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?

--
Rinze van Huizen
C-Services Holland b.v.

Nov 22 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.