473,320 Members | 1,746 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Permissions to call LogonUser

I have been troubleshooting writing a log file to a fileshare on
another machine.... and I can't seem to find my way past the "Double
Hop" issue. I seem have narrowed it down to a failure of the
LogonUser call. On Windows 2000 with IIS 5 and ASP.NET 2.0 the
LogonUser call returns 0. From a Windows Forms client I can get the
LogonUser call to work fine (returns 1).

So what allows me to call LogonUser? Is there something I need to do
in the web.config or machine.config? I already tried the change where
you give ASPNET account the right to "Act as part of the OS".

Any other ideas? Articles? I'd like to get this working under IIS 5 if
possible.

Kelly Greer
ke*********@nospam.com
change nospam to yahoo
Nov 20 '07 #1
1 1223
you may need to revert to the process token, to allow impersonation.

RevertToSelf();

before calling logon

-- bruce (sqlwork.com)
"kellygreer1" wrote:
I have been troubleshooting writing a log file to a fileshare on
another machine.... and I can't seem to find my way past the "Double
Hop" issue. I seem have narrowed it down to a failure of the
LogonUser call. On Windows 2000 with IIS 5 and ASP.NET 2.0 the
LogonUser call returns 0. From a Windows Forms client I can get the
LogonUser call to work fine (returns 1).

So what allows me to call LogonUser? Is there something I need to do
in the web.config or machine.config? I already tried the change where
you give ASPNET account the right to "Act as part of the OS".

Any other ideas? Articles? I'd like to get this working under IIS 5 if
possible.

Kelly Greer
ke*********@nospam.com
change nospam to yahoo
Nov 20 '07 #2

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

Similar topics

1
by: Nimi | last post by:
When I run my application , the LogonUser method fails the exception is "LogonUser failed with error code :1314". I know the error is because of some privileges . I am using Windows 2000 sp4. I...
1
by: Rich | last post by:
I am running IIS6 on a Win2k3 server. I have an ASP.Net app (C#) that a user logs into and then I use LogonUser to validate them and log them onto the server. I have Windows Authentication ONLY...
3
by: Zeno Lee | last post by:
I'm trying to authenticate a user against a windows network. I want it to work across any kind of windows network from NT 4.0 up to Windows 2003 ADS. So far I've been using DirectoryEntry and...
4
by: Richard | last post by:
Hi all, Is there any class in .NET 1.x that will help me set file & folder permissions for a user? Aka - I would like to do the in code equivalent of right clicking a folder in file explorer...
8
by: Vai2000 | last post by:
Hi All, How do I access a shared Drive which requires username and password to access? I need to write a file in a folder within it TIA
4
by: CsharpGuy | last post by:
I need to call an exe that resides on a server on the network from a ASP.NET page. first, is this possible, and if so who would I go about doing it? What is need to do this and have the exe run...
0
by: olsen.chris | last post by:
At the place that I work to gain access to one of the databases we have been supplied with a COM+ proxy that will allow us to connect. To access the database we have impersonate a user to which...
3
by: Robinson | last post by:
May I be so bold as to run a scenario by you and solicit some advice on the best way to proceed? I have a database (SQL Server), which stores paths of image files on disk (on the server). I...
11
by: JCav | last post by:
I need to call a COM object from a remote machine using C#. I also need to pass on a different userID and password to the call. Has anyone done this? I've used Java to do this using JIntegra, but...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.