469,626 Members | 1,442 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,626 developers. It's quick & easy.

Permissions & security & vb.Net & my head sick

hi

I build a VB .NET application that makes file access, environnemet acess,
database access, etc....
If I ran the app locally, everything works....(normal)

If I copy the app on a server, and execute it, everything works until a
file/environnement/database access !.....

I just want that my app may run in every machine!
I dont want to use client app like caspol.exe or mscorcfg.msc...(because I
dont want to execute them in every computer!)

I found information on FileIOPermission, EnvirronementPermissionAttribute,
.....
for exemple : <Assembly: FileIOPermission(SecurityAction.RequestMinimum,
Unrestricted:=True)>
but nothing works (the program ask me for a debug)
I also found this code :

Dim fp As EnvironmentPermission
Try
fp = New EnvironmentPermission(PermissionState.Unrestricted )
fp.Demand()
Catch e1 As Exception
MessageBox.Show(e1.Message)
End Try

BUT nothing works!
I have something like :
System.Security.Permissions.FileIOPermission, mscorlib,
Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
failed.
I dont have found info on configuration files such as security.conf or
machine.conf...
Is it possible to resolve my problem with that?
so, my friends, you are my last chance....
What I must do?

thanks for your futur response

lobrys



Jul 21 '05 #1
2 8031
If it's loaded locally, then it's fully trusted and can do what you want. If
it's loaded from a server, it is kept within the Code Access Security
sandbox. Try going to Start | Administrative Tools | Microsoft .NET
Framework 1.1 Wizards, and then go through the steps to "Trust an Assembly"
to let it do whatever it wants. Otherwise you could tweak the permissions so
that it only lets the app access one specific directory, database, etc.

"lobrys" <PU************@SPAMfreeDE.MERDE.fr> wrote in message
news:OE**************@TK2MSFTNGP11.phx.gbl...
hi

I build a VB .NET application that makes file access, environnemet acess,
database access, etc....
If I ran the app locally, everything works....(normal)

If I copy the app on a server, and execute it, everything works until a
file/environnement/database access !.....

I just want that my app may run in every machine!
I dont want to use client app like caspol.exe or mscorcfg.msc...(because I
dont want to execute them in every computer!)

I found information on FileIOPermission, EnvirronementPermissionAttribute,
....
for exemple : <Assembly: FileIOPermission(SecurityAction.RequestMinimum,
Unrestricted:=True)>
but nothing works (the program ask me for a debug)
I also found this code :

Dim fp As EnvironmentPermission
Try
fp = New EnvironmentPermission(PermissionState.Unrestricted )
fp.Demand()
Catch e1 As Exception
MessageBox.Show(e1.Message)
End Try

BUT nothing works!
I have something like :
System.Security.Permissions.FileIOPermission, mscorlib,
Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
failed.
I dont have found info on configuration files such as security.conf or
machine.conf...
Is it possible to resolve my problem with that?
so, my friends, you are my last chance....
What I must do?

thanks for your futur response

lobrys


Jul 21 '05 #2
"Otherwise you could tweak the permissions so that it only lets the app
access one specific directory, database, etc."

How can you do that? (in the code?)

lobrys

"Ed Kaim [MSFT]" <ed****@online.microsoft.com> a écrit dans le message de
news:u5**************@TK2MSFTNGP11.phx.gbl...
If it's loaded locally, then it's fully trusted and can do what you want. If it's loaded from a server, it is kept within the Code Access Security
sandbox. Try going to Start | Administrative Tools | Microsoft .NET
Framework 1.1 Wizards, and then go through the steps to "Trust an Assembly" to let it do whatever it wants. Otherwise you could tweak the permissions so that it only lets the app access one specific directory, database, etc.

"lobrys" <PU************@SPAMfreeDE.MERDE.fr> wrote in message
news:OE**************@TK2MSFTNGP11.phx.gbl...
hi

I build a VB .NET application that makes file access, environnemet acess, database access, etc....
If I ran the app locally, everything works....(normal)

If I copy the app on a server, and execute it, everything works until a
file/environnement/database access !.....

I just want that my app may run in every machine!
I dont want to use client app like caspol.exe or mscorcfg.msc...(because I dont want to execute them in every computer!)

I found information on FileIOPermission, EnvirronementPermissionAttribute, ....
for exemple : <Assembly: FileIOPermission(SecurityAction.RequestMinimum,
Unrestricted:=True)>
but nothing works (the program ask me for a debug)
I also found this code :

Dim fp As EnvironmentPermission
Try
fp = New EnvironmentPermission(PermissionState.Unrestricted )
fp.Demand()
Catch e1 As Exception
MessageBox.Show(e1.Message)
End Try

BUT nothing works!
I have something like :
System.Security.Permissions.FileIOPermission, mscorlib,
Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
failed.
I dont have found info on configuration files such as security.conf or
machine.conf...
Is it possible to resolve my problem with that?
so, my friends, you are my last chance....
What I must do?

thanks for your futur response

lobrys



Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Andreas Pauley | last post: by
2 posts views Thread by mark | r | last post: by
8 posts views Thread by Tim Marshall | last post: by
1 post views Thread by Jerry Negrelli | last post: by
2 posts views Thread by Matthew Lee | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.