I m trying to use "Microsoft.Sdc.Tasks.Web.Website.UpdateHttpErrorSetting" to change the http error messages of a remote IIS website. The documentation for this task in particular is somewhat lacking and I haven t found a way to use it succesfully. I d like the http 404 error to load a url instead of the default 404b.html file. I ve tried using the task as such:
<Microsoft.Sdc.Tasks.Web.Website.UpdateHttpErrorSetting
ErrorCode="404"
MachineName="$(MachineName)"
WebSiteName="$(SiteName)"
Path="."
Uri="/errors/mycustom404.htm"
Type="URL"
DirectoryType="WebDir" />
I get an exception when the task runs but I m not clear on what I m missing:
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()
Further insight is very welcome.