2016-10-31 3 views
0

나는 Azure WebJobs와 함께 ASP.NET MVC 애플리케이션을 가지고있다. 그리고 Azure Cloud에 WebJob을 자동 게시하도록 설정했습니다. 그러나 VS를 통해 WebJob을 게시 할 때 모달 대화 상자가 표시됩니다. 나는 TeamCity에서도 마찬가지라고 생각하지만 오류를 생성하고 게시에 실패합니다.모달 대화 상자를 보여주는 TeamCity

어떻게 비활성화하고 WebJob을 게시 할 수 있습니까?

 [Step 1/1] 
     [15:19:13][Step 1/1] Unhandled Exception: System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application. 
     [15:19:13][Step 1/1] at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.RunAsyncTask[T](Task`1 task) 
     [15:19:13][Step 1/1] at Microsoft.Web.WebJobs.Publish.Tasks.CreateScheduledWebJob.<>c__DisplayClass1f.<GetAuthorizationHeader>b__1e() 
     [15:19:13][Step 1/1] at System.Threading.ThreadHelper.ThreadStart_Context(Object state) 
     [15:19:13][Step 1/1] at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) 
     [15:19:13][Step 1/1] at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) 
     [15:19:13][Step 1/1] at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 
     [15:19:13][Step 1/1] at System.Threading.ThreadHelper.ThreadStart() 
     [15:19:16][Step 1/1] Process exited with code 255 
     [15:19:16][Step 1/1] Step Publish to Azure (with WebJobs) (Command Line) failed 
+0

이 제한 사항을 해결할 수 있었습니까? – Regis

답변

1

나는 동일한 문제가있었습니다. 기본적으로 푸른 일정에 액세스하기 위해서는 하늘빛 포털에 인증되어 자격 증명을 입력해야합니다. 나는이 블로그 다음 주위에 이동 관리 :

https://azure.microsoft.com/en-us/blog/enabling-command-line-or-continuous-delivery-of-azure-webjobs/

하여 푸른 포털 다운로드 페이지에 링크가 오래된 것입니다. 최신 링크는 here입니다.

일단 게시 설정 파일이 다운로드되면 프로젝트에 TC를 포함시키지 않기 위해 TC 서버에 복사했습니다.

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 
<Target Name="AfterSetScheduleProperties" AfterTargets="SetScheduleProperties"> 
    <PropertyGroup> 
     <PublishSettingsPath>C:\Local_Properties\Azure\FileName.publishsettings</PublishSettingsPath> 
     <SubscriptionId>XXXXXX-XXXX-XXXX-XXXXX-XXXXXXXX</SubscriptionId> 
    </PropertyGroup> 
</Target> 

내가 구독 ID를 발견 : 콘텐츠

그럼 내가 여기

enter image description here

프로젝트의 속성 폴더 아래에 webjobs.props 파일을 만든 것입니다 다운로드 한 게시 설정 파일에서 게시 설정 파일 경로는 TC 서버의 경로입니다.

Webjob을 게시 할 때 푸른 하늘에 일정이 올바르게 작성/업데이트됩니다.

희망 도움말

관련 문제