This project is read-only.

How do I use UpdateHttpErrorSetting?

Dec 15, 2009 at 4:42 PM

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:

  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 = error : Uri = /errors/mycustom404.htm error : Type = URL error : DirectoryType = WebDir error : MachineName = testMachineName error : WebSiteName = testSiteName error : Path = . error : DirectoryName = error : error : at Microsoft.Sdc.Tasks.Web.WebSite.UpdateHttpErrorSetting.InternalExecute()

Further insight is very welcome.