3
我正在使用ServiceStack,並有我自己的處理程序來處理拋出的任何異常,這些異常都很好用。但是,我似乎無法找出如何覆蓋從ServiceStack返回的默認404錯誤頁面。目前Body看起來像這樣:如何覆蓋ServiceStack中的默認404頁面?
Handler for Request not found:
Request.ApplicationPath:/
Request.CurrentExecutionFilePath: /Test/123
Request.FilePath: /Test/123
Request.HttpMethod: GET
Request.MapPath('~'): C:\Test-Web\src\Web.Service\
Request.Path: /Test/123
Request.PathInfo:
Request.ResolvedPathInfo: /Test/123
Request.PhysicalPath: C:\Test-Web\src\Web.Service\Test\123
Request.PhysicalApplicationPath: C:\Test-Web\src\Web.Service\
Request.QueryString:
Request.RawUrl: /Test/123
Request.Url.AbsoluteUri: http://localhost:65079/Test/123
Request.Url.AbsolutePath: /Test/123
Request.Url.Fragment:
Request.Url.Host: localhost
Request.Url.LocalPath: /Test/123
Request.Url.Port: 65079
Request.Url.Query:
Request.Url.Scheme: http
Request.Url.Segments: System.String[]
App.IsIntegratedPipeline: False
App.WebHostPhysicalPath: C:\Test-Web\src\Web.Service
App.WebHostRootFileNames: [extensions.cs,global.asax,global.asax.cs,Web.Service.csproj,Web.Service.csproj.user,Web.Service.ncrunchproject,packages.config,servicestack.common.dll,servicestack.common.pdb,servicestack.common.xml,servicestack.interfaces.dll,servicestack.interfaces.pdb,servicestack.interfaces.xml,servicestack.redis.dll,web.config,web.debug.config,web.release.config,bin,dto,exceptions,interfaces,mongo,obj,pipeline,properties,resources,serialization,servicestack,supporting,validators,windsor]
App.DefaultHandler: metadata
App.DebugLastHandlerArgs: GET|/Test/123|C:\Test-Web\src\Web.Service\Test\123
顯然是一個404狀態碼。
任何幫助或方向,我需要重寫或更改將不勝感激。如果您還需要我的進一步詳情,請隨時詢問,我會盡快回復。
我已經做到了這一點,並在IIS中的偉大工程快遞在我的本地機器上,但我怎麼得到它覆蓋IIS 7在服務器上的IIS 404? –