Problems on calling advapi

M

Marco Herrn

Hi,

I am developing an ASP.NET Application in C#. I am using the library
Win32Security from
http://www.gotdotnet.com/Community/...mpleGuid=e6098575-dda0-48b8-9abf-e0705af065d9
to set permissions on folders from withing this application. That
works on one server. On another server (in a different domain, in fact
even a different company) I get Access Denied Errors:

Exception: System.UnauthorizedAccessException
Message: Access is denied.
Source: mscorlib
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32
errorCode, IntPtr errorInfo)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32
errorCode)
at Microsoft.Win32.Security.Win32.ThrowLastError() in
c:\inetpub\wwwroot\Win32Security_v5.0\Win32Security\Win32Interop.cs:line 71
at Microsoft.Win32.Security.Sid.LookupSid(String userName, String
machineName) in
c:\inetpub\wwwroot\Win32Security_v5.0\Win32Security\Sid.cs:line 85
at Microsoft.Win32.Security.Sid..ctor(String userName, String
machineName) in
c:\inetpub\wwwroot\Win32Security_v5.0\Win32Security\Sid.cs:line 53
at Microsoft.Win32.Security.Sid..ctor(String userName) in
c:\inetpub\wwwroot\Win32Security_v5.0\Win32Security\Sid.cs:line 58


The exception comes from a call to a method in advapi.dll. The same
error sometimes occurs on other method calls to this dll. But it doesn't
happen all the times. Sometimes it just works and later fails again. It
seemed that a restart of the whole server fixes the problem for a short
time.

Now I saw some Error in the Event-Log of windows:

Logon Failure:
Reason: Unknown user name or bad password
User Name: 02_S010
Domain: BLNN278A
Logon Type: 8
Logon Process: Advapi
Authentication Package: Negotiate
Workstation Name: BLNN278A
Caller User Name: NETWORK SERVICE
Caller Domain: NT AUTHORITY
Caller Logon ID: (0x0,0x3E4)
Caller Process ID: 5672
Transited Services: -
Source Network Address: -
Source Port: -#

I do not know whether these two problems are the same, but it is
possible. The user name 02_s010 is correct. That is the user the whole
application runs under (I do this by impersonating to it in the
web.config). Obviously the password is correct, since the application
runs quite well, except for the mentioned problems. So why does it lose
the password? And, the process here is also advapi, so it seems that
something goes wrong accessing this library.

Has anybody any ideas where the problem can come from or how to find out
more?

Regards
Marco
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top