"Microsoft.Sdc.Tasks.Web.Website.UpdateHttpErrorSetting"을 사용하여 원격 IIS 웹 사이트의 http 오류 메시지를 변경하려고합니다. 특히이 작업에 대한 설명서가 다소 부족하고 성공적으로 사용하는 방법을 찾지 못했습니다. http 404 오류가 기본 404b.html 파일 대신 URL을로드하고 싶습니다. 나는 같은 작업을 사용하여 시도했다 :MSBuild를 사용하여 원격 IIS6 웹 사이트의 사용자 지정 오류를 수정하는 방법
Using "Microsoft.Sdc.Tasks.Web.Website.UpdateHttpErrorSetting" task from assembly "c:\Microsoft.Sdc.Tasks.dll".
Task "Microsoft.Sdc.Tasks.Web.Website.UpdateHttpErrorSetting"
error : A task error has occured.
error : Message = Object reference not set to an instance of an object.
error : ErrorCode = 404
error : SubErrorCode = <String.Empty>
error : Uri = /errors/mycustom404.htm
error : Type = URL
error : DirectoryType = WebDir
error : MachineName = testMachineName
error : WebSiteName = testSiteName
error : Path = .
error : DirectoryName = <String.Empty>
error :
error : at Microsoft.Sdc.Tasks.Web.WebSite.UpdateHttpErrorSetting.InternalExecute()
또한 통찰력은 매우 환영합니다 :
<Microsoft.Sdc.Tasks.Web.Website.UpdateHttpErrorSetting
ErrorCode="404"
MachineName="$(MachineName)"
WebSiteName="$(SiteName)"
Path="."
Uri="/errors/mycustom404.htm"
Type="URL"
DirectoryType="WebDir" />
작업이 실행하지만 난 내가 무엇을 누락에 명확하지있을 때 나는 예외가 .