473,714 Members | 2,552 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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....(norma l)

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 FileIOPermissio n, EnvirronementPe rmissionAttribu te,
.....
for exemple : <Assembly: FileIOPermissio n(SecurityActio n.RequestMinimu m,
Unrestricted:=T rue)>
but nothing works (the program ask me for a debug)
I also found this code :

Dim fp As EnvironmentPerm ission
Try
fp = New EnvironmentPerm ission(Permissi onState.Unrestr icted)
fp.Demand()
Catch e1 As Exception
MessageBox.Show (e1.Message)
End Try

BUT nothing works!
I have something like :
System.Security .Permissions.Fi leIOPermission, mscorlib,
Version=1.0.330 0.0, Culture=neutral , PublicKeyToken= b77a5c561934e08 9
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 8284
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.MER DE.fr> wrote in message
news:OE******** ******@TK2MSFTN GP11.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....(norma l)

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 FileIOPermissio n, EnvirronementPe rmissionAttribu te,
....
for exemple : <Assembly: FileIOPermissio n(SecurityActio n.RequestMinimu m,
Unrestricted:=T rue)>
but nothing works (the program ask me for a debug)
I also found this code :

Dim fp As EnvironmentPerm ission
Try
fp = New EnvironmentPerm ission(Permissi onState.Unrestr icted)
fp.Demand()
Catch e1 As Exception
MessageBox.Show (e1.Message)
End Try

BUT nothing works!
I have something like :
System.Security .Permissions.Fi leIOPermission, mscorlib,
Version=1.0.330 0.0, Culture=neutral , PublicKeyToken= b77a5c561934e08 9
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******** ******@TK2MSFTN GP11.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.MER DE.fr> wrote in message
news:OE******** ******@TK2MSFTN GP11.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....(norma l)

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 FileIOPermissio n, EnvirronementPe rmissionAttribu te, ....
for exemple : <Assembly: FileIOPermissio n(SecurityActio n.RequestMinimu m,
Unrestricted:=T rue)>
but nothing works (the program ask me for a debug)
I also found this code :

Dim fp As EnvironmentPerm ission
Try
fp = New EnvironmentPerm ission(Permissi onState.Unrestr icted)
fp.Demand()
Catch e1 As Exception
MessageBox.Show (e1.Message)
End Try

BUT nothing works!
I have something like :
System.Security .Permissions.Fi leIOPermission, mscorlib,
Version=1.0.330 0.0, Culture=neutral , PublicKeyToken= b77a5c561934e08 9
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1126
by: Andreas Pauley | last post by:
Hi all, I'm starting with a Point of Sale system (QT gui, MySQL db) and I'm wondering if there are any user management/user security modules available that can be reused independently of the specific system that you write. I think something similar to the roles & permission scheme of Zope would work, were I can assign certain functionality/permissions to a role, and then assign each user a role.
2
1332
by: mark | r | last post by:
we're working on a cms system that allows the admin to upload files to the server - the host (supplied by the client) says that opening write permissions means that windows is open to exploits. we're using FSO to move the file anyone know a way of locking down this so its not 'open to exploits' ? thanks
0
1508
by: K Finegan | last post by:
I have an archival process on a large database that runs once a month. At the beginning of the process the triggers and indexes on the tables whose data is moved are dropped, the data is moved and then the triggers and indexes are recreated at the end. This produces a massive improvement in performance. The problem is the process is supposed to run on users accounts (thats the way the front-end is set up) and they don't have the...
4
3023
by: Luklrc | last post by:
Hi, I'm having to create a querysting with javascript. My problem is that javscript turns the "&" characher into "&amp;" when it gets used as a querystring in the url EG: /mypage.asp?value1=1&amp;value2=4&amp; ... which of course means nothing to asp.
8
2510
by: Tim Marshall | last post by:
I have a problem in that users can't seem to access menu bars created by a developer in the admins group. Details are as follows: I'm following the MS Access Secirty FAQ version 2.41 and I can't seem to find an answer to the following problem in an A97 FE on a Oracle database (Pretty sure Oracle has nothing to do with this, but thought I'd mention it). My users are members of one of three groups (plus there is the admins group of...
1
1621
by: Jerry Negrelli | last post by:
I'm running an ASP.NET application which uses impersonation & Windows authentication to set the current Principal. One of my methods was taking an awful long time to run, so I decided to launch it in a new thread using the following two lines of code: Thread bob = new Thread(new ThreadStart(MyMethodName)); bob.Start(); When MyMethodName is executed, it attempts to make a
2
3251
by: Matthew Lee | last post by:
I am using a C# / ASP.NET application to fire an XCOPY job from the webserver to a UNC share. This setup works fine when copying to a local machine but refuses to work on the remote copy. The process executes correctly, but XCOPY returns "invalid drive specification", which I'm guessing actually means that the current user context (ASP.NET application) can't access the share (e.g. \\someserver\c$\mydir\) Anyway, here's where I'm at...
2
284
by: lobrys | last post by:
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!
3
2503
by: Roger F | last post by:
Help Please When I insert code into my database ie. This & That I see it is the same in the data base but when I go to view it, it as changed into. This &amp; That What is happening, rather a noob here sorry.. Here are my page's.
0
8801
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8707
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9314
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9174
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9015
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6634
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5947
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4464
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4725
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.