servicestack

Standalone ServiceStack service for Web & Native Mobile App

天涯浪子 提交于 2019-12-11 06:06:26
问题 Our architecture consists of several backend (non-ServiceStack) services and applications that send data to our system via ServiceStack service hosted in asp.net - this is currently a standalone ServiceProject project containing our required Services/Repository/DTOs following the structure of all the provided ServiceStack samples. With our backend complete we're now designing our two front-end requirements consisting of a web application and native mobile application. For the web application

ServiceStack communications with Windows Service

旧巷老猫 提交于 2019-12-11 05:49:46
问题 I have an multi layered application that I have developed. I communicate with the windows service using http with ServiceStack (AppHostHttpListenerBase). While this works fine in clean environments, I often find that customers computers are not so clean and one of the first problem areas is the introduction of an unwanted Proxy with causes my application not to run. I get alot of bad press that the application does not work well, when in reality it is a result of a hidden issue on the

ServiceStack: Accessing the IRequest in the Service returns null

三世轮回 提交于 2019-12-11 05:16:30
问题 I am using Servicestack. I have a base class for my Services, like so: public abstract class ServiceHandlerBase : Service and then some methods and properties in there of interest. I already have several methods that accesses the IRequest object, like: protected AlfaOnline GetContactItem() { string deviceUUID = Request.Headers.Get(Constants.DEVICE_UUID); // <-- calling this method from constructor will give NullRef on Request here string authToken = Request.Headers.Get(Constants.AUTH_TOKEN);

Servicestack user session not working

大兔子大兔子 提交于 2019-12-11 04:51:17
问题 I have an API written in ServiceStack and I am attempting to build in authentication for clients. At the moment this API will only be accessed by Android clients (Xamarin / C#). The API itself is running on a Debian server with Apache / mod_mono After reading up on Github, I am still not 100% sure how to put this together in such a way that... once the client has provided valid credentials (For testing, basic HTTP authentication) the user gets a session and the credentials are not checked

How can I prevent access to specific path with ServiceStack Authentication?

江枫思渺然 提交于 2019-12-11 04:41:08
问题 When we want to prevent access to specific path with default asp.net authentication, we do: <location path="routes.axd"> <system.web> <authorization> <allow roles="Agent"/> <deny users="*"/> </authorization> </system.web> How can we do with ServiceStack? 回答1: There is no configuration to protect /paths in ServiceStack. Using the [Authenticate] Attribute You can protect services by adding the [Authenticate] attribute on either the Action: class MyService : Service { [Authenticate] public

How can I set WebHostUrl in ServiceStack?

假装没事ソ 提交于 2019-12-11 03:55:59
问题 I'm using ServiceStack 4.0.17 and the Host.Instance.Config.WebHostUrl is always null. I'm using ServiceStack as a standalone web application - no MVC or ASP.NET - that is being served by IIS Express (VS2013) in integrated mode. Is there any required configuration to run ServiceStack as a standalone web application that I may be missing? If someone is having the same issue I created a temporary workaround that can be used in the Application_BeginRequest: private void SetApplicationUrl() { if (

Consuming wsdl soap service with servicestack

痴心易碎 提交于 2019-12-11 03:47:58
问题 I have been trying to consume wsdl soap service with asp.net C# mvc5 application. The original service is written in php which should ideally not matter but I have not been able to make this work. I have just learnt that servicestack is an alternative that works well with mvc architecture. I am looking for pointers on how to consume wsdl soap service with servicestack any help on this will be appreciated. I am happy to buy books that will guide me on how to any of these two methods will work

Protocol errors, “no more data” errors, “Zero length response” errors while using servicestack.redis in a high volume scenario

久未见 提交于 2019-12-11 03:47:28
问题 Would really help if someone tell me if there are issues with PooledRedisClientManager under high volume scenarios? I am using a singleton client manager that gets called for GetClient() by multiple WCF threads 1000's of times in a min and each thread can read/update/insert into a Redis collection (am using redis hash collection). Intermittently i see these errors and usually go away on Retries. All GetClient() calls are within Using statements. Thanks Rb Here are the errors I see from the

ServiceStack BSD version 3.9.71 and protobuf-net version

Deadly 提交于 2019-12-11 03:47:17
问题 I downloaded the ServiceStack BSD version 3.9.71 from Nuget using the commmands Install-Package ServiceStack -Version 3.9.71 and Install-Package ServiceStack.Plugins.ProtoBuf -Version 3.9.71 I installed also the protobuf-net Install-Package protobuf-net but I have problem because the ServiceStack 3.9.71 try to find the protobuf-net ver.2.0.0.640, when the last version of protobuf from Nuget is 2.0.0.668 回答1: The NuGet packages doesn't specify a version constraint on them so they get the

ServiceStack, CORS, and OPTIONS (No Access-Control-Allow-Origin header)

你离开我真会死。 提交于 2019-12-11 03:39:30
问题 We're hitting a bit of a snag with CORS features of a restful API in ServiceStack 4. We want to be sneding cookies to the api since the SS session is in the cookies, so we make AJAX calles with "WithCredentials" = true in our angular clients that hit the API. Since Chrome (at least) doesn't like Access-Control-Allow-Origin wildcards with WithCredentials, we've added a pre-request filter to echo back the requester's origin in the Access-Control-Allow-Origin header like so: private void