2012-03-07 2 views
4

출석없이 연중 무휴로 실행되는 응용 프로그램이 있습니다. ClickOnce을 통해 배포되었으며 업데이트를 확인하고 다운로드해야합니다. 응용 프로그램 시작시 및 야간에 예정된 시간에 업데이트를 확인합니다. 시동시에는 완벽하게 작동합니다.ClickOnce 배포 CheckForDetailedUpdate가 예외를 throw합니다.

그러나 예약 된 시간에 실행하면 충돌이 발생합니다. 두 경우 모두 정확히 동일한 코드를 사용합니다. Windows   7에서 실행 중이며 UAC과 관련이있을 수 있습니다. 컴퓨터가 유휴 상태 일 때 파일 시스템에 액세스 할 수 없다고 생각합니까? 나는 그것을 고칠 필요가있다. 다음은 예외 사항은 다음과 같습니다

메시지 : 서비스가 서비스 계정 구성에 존재하지 않습니다 올바르게 작동하는 데 필요한

특권. 서비스 MMC (Microsoft Management Console) 스냅인 (services.msc)과 로컬 보안 설정 MMC 스냅인 (secpol.msc)을 사용하여 서비스 구성과 계정 구성을 볼 수 있습니다. (HRESULT에서 예외 : 0x80070511)

스택 추적 :

at System.Deployment.Internal.Isolation.IStore.GetAssemblyInformation(UInt32 Flags, IDefinitionIdentity DefinitionIdentity, Guid& riid) 
at System.Deployment.Internal.Isolation.Store.GetAssemblyManifest(UInt32 Flags, IDefinitionIdentity DefinitionIdentity) 
    at System.Deployment.Application.ComponentStore.GetAssemblyManifest(DefinitionIdentity asmId) 
    at System.Deployment.Application.ComponentStore.GetSubscriptionStateInternal(DefinitionIdentity subId) 
    at System.Deployment.Application.SubscriptionStore.GetSubscriptionStateInternal(SubscriptionState subState) 
    at System.Deployment.Application.DeploymentManager.BindCoreWithAppId(Boolean blocking, FileStream& refTransaction, String& productName) 
    at System.Deployment.Application.DeploymentManager.BindCore(Boolean blocking, TempFile& tempDeploy, TempDirectory& tempAppDir, FileStream& refTransaction, String& productName) 
    at System.Deployment.Application.DeploymentManager.Bind() 
    at System.Deployment.Application.ApplicationDeployment.CheckForDetailedUpdate(Boolean persistUpdateCheckResult) 
    at AdvancedKiosks.Utils.Updating.Updater.get_UpdateAvailabilityStatus() 
    at AdvancedKiosks.Utils.Updating.Updater.get_CanUpdate() 
    at AdvancedKiosks.DKMS.ViewModel.MainViewModel.<.ctor>b__6() 
    at System.Threading.ThreadHelper.ThreadStart_Context(Object state) 
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx) 
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 
    at System.Threading.ThreadHelper.ThreadStart() 

편집 : 나는 원인이 하드 디스크 드라이브가 유휴 상태 시스템의 시간 후 해제되는 것 같아요. 업데이트 (C# 사용)를 확인하기 전에 프로그래밍 방식으로 하드 디스크 드라이브를 켜는 방법이 있습니까?

+0

예약 된 작업의 속성 대화 상자를 엽니 다. '작업을 실행할 때 다음 사용자 계정을 사용하십시오 :'라는 설정이 있습니다. 사용자 계정이 선택되어 있습니까? 그렇지 않은 경우 문제의 원인 일 수 있습니다. 계정으로 변경하면 문제가 해결 될 것입니다. – RLH

+0

나는 업데이트 및 자체 재시작을 감지하는 GUI 응용 프로그램과 동일한 문제가 있습니다. 매번이 오류로 다시 시작할 때마다 충돌이 발생합니다. 대화식으로 실행 중이므로 시스템에 대한 관리 권한이있는 현재 사용자의 계정을 사용해야합니다. – Newtopian

+0

사용중인 Visual Studio 버전은 무엇입니까? –

답변

4

나는이 링크를 레코드 용으로 여기에 넣겠습니다 : link to MSDN forum. 그것에 따르면, CheckOutputedUpdate() 함수에 대한 특정 횟수의 호출 후에이 오류가 발생하는 것은 ClickOnce 내부의 버그입니다.