Wimdows.NET

Wim's .NET blog

ASP.NET Code Impersonation - problems with W2K

We have a Windows Server 2000 (SP4) as web server and are trying to upload
documents to a NAS using code impersonation, following the sample as can be
found at: http://support.microsoft.com/default.aspx?scid=kb;EN-US;306158 .

ACL's are correctly set, and the domain account credentials we use are
correct as well. The ASP.NET app works fine on Windows 2003 (tested on two
W2K3 boxes). On Windows 2000 however (also tested on two boxes),
impersonation fails miserably.

On Windows 2000, it always fails with the following Win32 API error message:
"The specified procedure could not be found."

Subsequent calls (after web app startup) result in either one of two Win32
API error messages:

"Overlapped I/O operation is in progress."

Or

"The system cannot find the file specified."

The directory to upload to has been added as virtual directory with the path
to the NAS and the right credentials. ASPNET account has privileges 'Act as
part of OS'.

Any idea why this is working fine on Windows 2003, but not on Windows 2000?

Any comments and suggestions most welcome!

Thanks!

Posted: Jun 11 2004, 04:33 PM by Wim | with 9 comment(s)
Filed under: ,

Comments

kevin white said:

which box is logging the error message? The Win2K box or the NAS? Also what OS is the NAS running?
# June 11, 2004 11:39 AM

Wim said:

Thanks for your comment.

The web server (W2K) is logging the message, not the NAS.

I believe the NAS is running a Linux OS.
# June 11, 2004 11:48 AM

kevin white said:

Have you tried to reproduce the problem in a Win2k -> Win2K test? I would also try a NAS -> Win2K test. These would be my next steps.

There may be some funkiness going on in the SMB call between Win2k and whatever version of Samba is running on the NAS. The Samba group has a bunch of decent tools that ship with Samba that you can use to peek at the transmission.

http://www.samba.org/samba/docs/man/samba.7.html
# June 11, 2004 12:01 PM

Wim said:

The problem is not related to the NAS. It's the impersonation that fails, before the app even tries to access the NAS.

My initial post might have been a bit misleading. The account impersonation from the W2K box doesn't work, whereas from the Windows 2003 box, it works fine.
# June 11, 2004 12:15 PM

stefan demetz said:

impersonation works different for W2K SP3, W2K SP4, W2K3

I'd avoid impersonation and use ftp if you only need to move a file: easier, platform neutral protocl and easier to setup
# June 11, 2004 12:18 PM

Wim said:

Stefan,

We're using upload functionality from the browser, so it makes sense to save it straight-away, rather than saving in a temp location and then having an FTP process move the file to the NAS...

Cheers,
Wim
# June 11, 2004 12:25 PM

TrackBack said:

# July 12, 2004 1:45 AM

Gillian said:

Give please. Each body has its art. Help me! Can not find sites on the: Window coverings ideas. I found only this - <a href="window-covering-store.biz/.../">window coverings brackets</a>. The video we learn brings our years in entertaining permission and existing n't, window covering. Ever, there was multiple walleye to close the path that dna was the normal risk, window covering. Waiting for a reply :eek:, Gillian from Western.

# March 28, 2010 1:29 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)