Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

C# WebService and User rights

Options
  • 07-07-2005 1:31pm
    #1
    Registered Users Posts: 2,758 ✭✭✭


    I have a C# Web Service which has a COM reference (3rd party object). The object makes a call to log into a payroll program. To do this it must access a registry key.

    I keep getting the following error:
    "RegOpenKeyEx Failed (Local): The system cannot find the file specified." - This is the error when i call the .Test ,ethod of the object.

    I should say now, that the object works fine in a couple of desktop app's i've written.

    I did try to Impersonate another user that has network/registry access but couldn't get it to work.

    I'm wondering if its the fact that the web service uses a local system account which may not have access to the registry. If so how can i remedy this problem.

    Anyone been in this situation before? Any thoughts/help/comments appreciated.


Comments

  • Registered Users Posts: 2,758 ✭✭✭Peace


    As it turns out the web service does not have rights to access the current user area of the registry. Moved the key to the local mahince and it works fine now.


  • Registered Users Posts: 640 ✭✭✭Kernel32


    There are free utilities available on http://www.sysinternals.com/ that can monitor file access, registry access and lots of other stuff. I have used them to solve cryptic security problems before.


  • Registered Users Posts: 7,468 ✭✭✭Evil Phil


    Me too, the sysinternals tools are essential kit.


Advertisement