Win32Exception (0x80004005): Access is denied Error.
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Win32Exception (0x80004005): Access is denied Error.

  1. #1
    Join Date
    Jan 2009
    Posts
    3

    Unhappy Win32Exception (0x80004005): Access is denied Error.

    Hi All,
    Need help urgently. I have the following code in my c# script:
    foreach (System.Diagnostics.Process mBeforeExcelProc in mBeforeExcelProcs)
    {
    if (mBeforeExcelProc.ProcessName == "EXCEL")
    {
    mBeforeProcArray.Add(mBeforeExcelProc.Id.ToString());
    }
    }

    It is giving the error mentioned in the title. It runs fine on windows2K, but give this access denied error in WindowsXP SP2. I am trying to capture all open .xls processes on the machine in the begining of the script, create an .xls spreadsheet and at the end close only this process, leaving all other .xls processes running.

  2. #2
    Join Date
    Jul 2006
    Posts
    97

    Re: Win32Exception (0x80004005): Access is denied Error.

    Can it be that you are running on a limited windows account?

    Oh, and use CODE tag for you code.
    Using .NET 2.0

  3. #3
    Join Date
    Jan 2009
    Posts
    3

    Re: Win32Exception (0x80004005): Access is denied Error.

    Thanks gecka for looking at it, but the user I am using is local admin. Could it be something to do with raised security levels on WinXP SP-2. Also this issue started only when I got new laptop. UserID and its privileges are same and is on same domain.
    Last edited by vpawar; January 30th, 2009 at 08:40 AM.

  4. #4
    Join Date
    Jan 2009
    Posts
    3

    Talking Re: Win32Exception (0x80004005): Access is denied Error.

    I found it. I just had to set the Impersonation right in the webconfig.

    <identity impersonate="true" />

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center