2

背景

我有一个使用 OpenRasta 构建的 API,它将 JSON 编码的数据提供给支持 HTML/AJAX 的界面。

问题

使用 IIS 6 托管时,我在查询资源时遇到间歇性 404 错误。应用程序池重启后一切正常;在几次成功请求后,404 错误开始并持续存在,直到应用程序池被回收。我已经确认在 IIS 6 中设置了 ISAPI 映射,我缺少什么?

间歇性失败请求的跟踪输出

Unregistering host of type OpenRasta.Hosting.AspNet.AspNetHost

成功比较请求的跟踪输出(命名空间和资源 URI 已编辑)

Registering host of type OpenRasta.Hosting.AspNet.AspNetHost
Using dependency resolver of type OpenRasta.DI.InternalDependencyResolver.
Registering host's root dependencies..
Using dependency registrar of type OpenRasta.Configuration.DefaultDependencyRegistrar..
Ignoring constructor, following dependencies didn't have a registration:OpenRasta.TypeSystem.Surrogates.ISurrogateBuilder[].
Registering host's leaf dependencies..
Using configuration source <namespace>.api.Configuration.
Ignoring constructor, following dependencies didn't have a registration:System.Func`1[System.Collections.Generic.IEnumerable`1[OpenRasta.Configuration.MetaModel.Handlers.IMetaModelHandler]].
Ignoring constructor, following dependencies didn't have a registration:System.Diagnostics.TraceSource.
Ignoring constructor, following dependencies didn't have a registration:OpenRasta.OperationModel.MethodBased.IMethodFilter[].
Incoming host request for http://<resource URI>.
Adding communication context data.
Entering OpenRastaRewriterHandler: Rewriting to original path.
Entering OpenRastaIntegratedHandler: Request for http://<resource URI>.
Incoming host request for http://<resource URI>.
Adding communication context data.
Found 1 operation(s) with a matching name..
Found 0 operation(s) with matching [HttpOperation] attribute..
Operation <handler>::Get() selected with 0 required members and 0 optional members, without request codec.
Ignoring constructor, following dependencies didn't have a registration:OpenRasta.OperationModel.Interceptors.IOperationInterceptor[].
Executing OperationResult OperationResult: type=OK, statusCode=200..
Selected codec JsonDataContractCodec out of 1 codecs for entity of type List`1 and negotiated media type application/json; q=0.5..
Codec JsonDataContractCodec selected..
Entering ResponseEntityWriterContributor: Generating response entity..
Setting Content-Length to 133.
Exiting ResponseEntityWriterContributor.
Writing http headers..
Exiting OpenRastaIntegratedHandler.
Exiting OpenRastaRewriterHandler.
Request finished..

从GitHub master构建的 OpenRasta.Hosting.AspNet.dll : OpenRasta.Hosting.AspNet.dll 版本

4

0 回答 0