473,468 Members | 1,519 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Unshared folder access.

Hello all. I have a program that manages (delete, copy, open, etc) several
files inside a shared folder in a server, but the users some times use the
Windows Explorer to open and work with files, I do not want it, because my
program opens the files and store some data in a SQL database, so, if the
users open the files with Windows Explorer, my databse is not updated.
If I unshare this folder, in order to eliminate the access with Win
Explorer, how can I access with my program? I mean, my program has to read,
copy, delete, etc. files inside an unshared folder.

Thanks in advance,
William GS
Mar 18 '06 #1
2 2883
> Hello all. I have a program that manages (delete, copy, open, etc) several
files inside a shared folder in a server, but the users some times use the
Windows Explorer to open and work with files, I do not want it, because my
program opens the files and store some data in a SQL database, so, if the
users open the files with Windows Explorer, my databse is not updated.
If I unshare this folder, in order to eliminate the access with Win
Explorer, how can I access with my program? I mean, my program has to
read,
copy, delete, etc. files inside an unshared folder.


What you could do is use impersonation.
I.e. your app changes its security context to a special user that is the
only user that has privileges on that share. That user has to be allowed to
update the folder.

That way regular users cannot modify the share, but only your user (your
program) can.
www.codeproject.com has several articles on impersonation. one of them is
this:
http://www.codeproject.com/csharp/cpimpersonation1.asp
it is for C#, but if you are using C++/CLI or MC++ you can easily translate
it.

Another way would be to user RPC, or to write a service on your server that
listens to commands from your app, and then performs the action. Those
solutions require some more programming, but you don't need the share
anymore.

--
Kind regards,
Bruno van Dooren
br**********************@hotmail.com
Remove only "_nos_pam"
Mar 19 '06 #2
Bruno, thank you so much for your help.

William GS
"Bruno van Dooren" wrote:
What you could do is use impersonation.
I.e. your app changes its security context to a special user that is the
only user that has privileges on that share. That user has to be allowed to
update the folder.

That way regular users cannot modify the share, but only your user (your
program) can.
www.codeproject.com has several articles on impersonation. one of them is
this:
http://www.codeproject.com/csharp/cpimpersonation1.asp
it is for C#, but if you are using C++/CLI or MC++ you can easily translate
it.

Another way would be to user RPC, or to write a service on your server that
listens to commands from your app, and then performs the action. Those
solutions require some more programming, but you don't need the share
anymore.

--
Kind regards,
Bruno van Dooren
br**********************@hotmail.com
Remove only "_nos_pam"

Mar 19 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Tom | last post by:
Can anyone give me any advice on how to secure a folder on a network server so that documents in the folder can only be opened through an Access database or by the database admin. I need to store...
2
by: | last post by:
Let me explain step wise. 1.. I have a site running on port 5555 2.. If contains web.config file with contains <Forms> authentication. 3.. The site contains a sub-folder named "MembersArea"...
2
by: flat_ross | last post by:
Hi, I am in a shop where developers are required to work off of a network share. This is so that code is backed up nightly. So I am testing running an ASP.NET Web application with a Class...
2
by: Jon L. Lovesky | last post by:
Hello all, I am attempting to access a remote folder from an asp.net application (all within the same domain). The application is configured for windows authentication in IIS and the asp.net...
5
by: hiram | last post by:
I have a folder on a local machine that has the access security settings set in Windows so that only the administrator can perform write or create operations on the folder. Everyone else is given...
5
by: Mitchell S. Honnert | last post by:
Is there a way, given the full path of a folder on a network, that one can programatically tell if you have Read access to that folder? I have an application where the user is able to select a...
17
by: rdemyan via AccessMonster.com | last post by:
With A2003, I'm having trouble accessing files in a folder on another computer where back-end files, update files, etc are located. Here's the scenario: 1) Computer #1 - A2003 2) Computer #2 -...
9
by: Nick 'The Database Guy' | last post by:
Hi All, I want to browse to a particular folder, not a particular file. The reason for this is that I have a utility that asks people to browse to a certain file, and I want them to be able to...
6
by: ManagedCoder | last post by:
Hi, My requirement is as follows: I need to set the HttpExpires (enable content expiration - set to 7 days) on a folder within a virtual directory. I have been able to set the HttpExpires...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...
0
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...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.