locked
cannot access application folder in service (c#) RRS feed

  • Question

  • Hi I've written a windows service that needs to look into a application folder, which I have already created using WHSInfoClass.CreateApplicationFolder, this folder is created in the console code.

    The service needs to look into this folder, and I do this by first calling WHSInfoClass.GetApplicationFolder. During the debug in VS it works fine. But when the service is copied to the Windows homeserver folder and the service is installed and run, I am catching this error in my log file -> 


    System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) at Microsoft.HomeServer.SDK.Interop.v1.WHSInfoClass.GetApplicationFolder(Guid UniqueID)

    How can it work in a step through debug in VS, but not when deployed?

    Thanks for your help
    Saturday, February 28, 2009 9:38 AM

Answers