servicestack

Accessing AspNetRequest

半腔热情 提交于 2021-01-29 03:09:10
问题 I have a global filters which adds a token to the request.Items collection which subsequent filters can also access. The problem I am having is when trying to get a hold of the request.Items when I am within an injected class. When trying to access the Items array this injected class using var req = HostContext.TryGetCurrentRequest(); my item is no longer available. I have discovered that this is because in the filters, the provided IRequest.Items array is a cloned copy of HttpContext.Current

Is there a thing like HTTPContextEnricher thats works with Servicestack and Serilog

て烟熏妆下的殇ゞ 提交于 2021-01-28 05:40:35
问题 I'm using Servicestack (.Core) and it's connection to Serilog. Is there a way to automatically enrich all Log-Entries with things like SessionId, UserId, etc.. The serilog-enrichers will not work due servicestack uses it's own session and user handling. kind regards Michael 回答1: I use a similar configuration. This code is called on Application_Start if (Settings.SeqEnabled) Log.Logger = new LoggerConfiguration() .Enrich.With<HttpRequestClientHostIPEnricher>() .Enrich.With

Request hangs after RefreshToken expires JsonHttpClient ServiceStack

若如初见. 提交于 2021-01-28 04:07:25
问题 I'm using ServiceStack JsonHttpClient client (5.9.0) in my Xamarin.Forms mobile app. Client is set like this: client = new JsonHttpClient(App.BaseEndpoint) { RefreshToken = RefreshToken, }; var httpClient = client.GetHttpClient(); httpClient.Timeout = new TimeSpan(0, timeout, 0); Refreshing of Bearer token works perfect, but after Refresh Token expires request just hangs with no response and without any exception. here is request example: public async Task GetAsync(string uri) { try { var

Could not load file or assembly 'ServiceStack' or one of its dependencies. The system cannot find the file specified

安稳与你 提交于 2021-01-27 16:00:22
问题 I was trying to launch my web application to server, Server : Vindows Server 2008 R2 Enterprise IIS version : 7.5 Framework version : 4.0.30319.17929 But the following error appears: Server Error in '/salavirtual' Application. Could not load file or assembly 'ServiceStack' or one of its dependencies. The system cannot find the file specified. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about

Could not load file or assembly 'ServiceStack' or one of its dependencies. The system cannot find the file specified

会有一股神秘感。 提交于 2021-01-27 15:53:11
问题 I was trying to launch my web application to server, Server : Vindows Server 2008 R2 Enterprise IIS version : 7.5 Framework version : 4.0.30319.17929 But the following error appears: Server Error in '/salavirtual' Application. Could not load file or assembly 'ServiceStack' or one of its dependencies. The system cannot find the file specified. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about

Could not load file or assembly 'ServiceStack' or one of its dependencies. The system cannot find the file specified

天大地大妈咪最大 提交于 2021-01-27 15:20:09
问题 I was trying to launch my web application to server, Server : Vindows Server 2008 R2 Enterprise IIS version : 7.5 Framework version : 4.0.30319.17929 But the following error appears: Server Error in '/salavirtual' Application. Could not load file or assembly 'ServiceStack' or one of its dependencies. The system cannot find the file specified. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about

ServiceStack 项目实例 006 通过官方示例总结的项目结构方案

前提是你 提交于 2020-11-24 04:39:35
研读了官方示例的ServiceStack.Examples 和 ServiceStack.Northwind,总结如下的项目方案结构,这种方式比较适合较大的项目,并且规范化很好,易于扩展和对接。 项目结构规范要求 根据ServiceStack官方示例项目,总结出如下项目规范: 项目目录结构,以产品管理模块示例: 需要建立三个项目: >> Product.Web >> Product.ServiceInterface >> Product.ServiceModel 1 对外接口 Product.Web 中提供对外API接口,以及一般处理程序,也可以将测试页面和简单界面放在这个项目中。 全局环境配置Gloabl.asax在Product.Web 项目中,这个项目提供的服务可以对接到其他的手机、软件及第三方网站。 2 内部服务和接口 Product.ServiceInterface 中放置服务,同时也是内部调用的(dll模式)接口。 定义的服务例如 public class OrdersService : ServiceStack.ServiceInterface.Service 3 类定义文件(包括POJO类和DTO类) Product.ServiceModel 是入口类定义和出口类定义,及实体类的定义 入口类、路由定义在Operations目录下的文件中,例如Operations