473,491 Members | 1,965 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Use another login

I want have access to restrict folders when inside one application. A general
user using the browser does not have access to these folders, but using the
application is supposed have access to those folders.

Is possible the application use a specific login to have access to a
specific resource?

How can I use a different login in an application?

Thanks,
Rui
Nov 17 '05 #1
4 925
Rui Oliveira wrote:
How can I use a different login in an application?


- LogonUser
- ImpersonateLoggedOnUser
- RevertToSelf

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
Nov 17 '05 #2
I used these functions to logon like user administrator to have access to a
folder (with name “FolderAAA”) that a normal user do not have.

I have the following situation:
- When I logon in windows with user administrator, my application has access
to folder “FolderAAA” and the application use CopyFile function to copy files
from that folder.
- When I logon windows with a normal user that do not have access to that
folder, the application use functions “LogonUser/ImpersonateLoggedOnUser” to
logon like user administrator. But after these steps my application cannot
copy files anyway.

Is not suppose after call “LogonUser” and “ImpersonateLoggedOnUser”
functions have the user administrator permissions??

Tks,
Rui


Nov 17 '05 #3
I used these functions to logon like user administrator to have access to a
folder (with name “FolderAAA”) that a normal user do not have.

I have the following situation:
- When I logon in windows with user administrator, my application has access
to folder “FolderAAA” and the application use CopyFile function to copy files
from that folder.
- When I logon windows with a normal user that do not have access to that
folder, the application use functions “LogonUser/ImpersonateLoggedOnUser” to
logon like user administrator. But after these steps my application cannot
copy files anyway.

Is not suppose after call “LogonUser” and “ImpersonateLoggedOnUser”
functions have the user administrator permissions??

Tks,
Rui

Nov 17 '05 #4
"Rui Oliveira" <Ru*********@discussions.microsoft.com> wrote in message
news:6C**********************************@microsof t.com...
Is not suppose after call "LogonUser" and "ImpersonateLoggedOnUser"
functions have the user administrator permissions??


Did you check the return codes from those functions? What function are you
using to copy the file? What value did it return.

Regards,
Will
Nov 17 '05 #5

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

Similar topics

3
2833
by: koolyio | last post by:
Hey, could you please tell me what is wrong with my login script. I just started learning php. CODE: login.php <? session_start(); header("Cache-Control: private"); ?>
5
2956
by: Simon | last post by:
Hi, I have a Login.php page that logs the user in and out. I has two forms within the page, (depending on what we are trying to do), either one to log in or out. The form calls itself using a...
1
7864
by: Tom Jones | last post by:
Hi, I am using the HttpWebRequest and HttpWebResponse classes to pull information from a web server on the internet. I have an account on one of the webservers that I need to log into...
2
2762
by: Beginner | last post by:
I know this is an old question, but searching all over the internet plus several MS security conferences, still haven't got a straight anwser. Basically, the login.aspx is on one dedicated server...
4
2806
by: nicholas | last post by:
Hi, Got an asp.net application and I use the "forms" authentication mode defined in the web.config file. Everything works fine. But now I would like to add a second, different login page for...
2
4498
by: IdleBrain | last post by:
Hello All: I used a Login control to authenticate a user to login. The problem is that when I login with good username & password, the login view would say that the login was successful. But...
6
3316
by: AppleBag | last post by:
I'm having the worst time trying to login to myspace through code. Can someone tell me how to do this? Please try it yourself before replying, only because I have asked this a couple of times in...
4
4057
tolkienarda
by: tolkienarda | last post by:
Hi all I work for a small webdesign company and we have remote hosting. i built a mysql database with phpmyadmin on the server. i then downloaded and modified a php login page. i am continuing to...
3
6207
by: satishknight | last post by:
Hi, Can some one tell me how to change the validation sequence for the code pasted below, actually what I want it when any one enters the wrong login information (already registered users) then it...
13
4151
by: Apostle | last post by:
Hi all, after thinking for sometimes, I thought it will be great opportunity to learn if I will start from scratch and build my own register/login system. Here is the thread that I will be posting...
0
7115
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
6978
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...
0
7190
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...
1
6858
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7360
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...
1
4881
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...
0
3076
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
633
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
280
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.