servicestack

ServiceStack NuGet update 4.0.22 to 4.0.31 caused errors on deployment

青春壹個敷衍的年華 提交于 2019-12-02 05:40:31
I'm hoping not to be to vague here, but I've just done a NuGet update for ServiceStack, updating from version 4.0.22 to 4.0.31, the project compiles fine but once deployed to iis I'm getting this error when I hit the site. Method 'get_Cookies' in type 'ServiceStack.Host.AspNet.AspNetRequest' from assembly 'ServiceStack, Version=4.0.31.0, Culture=neutral, PublicKeyToken=null' does not have an implementation. Wondering if anyone else is having this error? A side-effect of ServiceStack converting ServiceStack.Interfaces.dll into a pure PCL dll in v4.0.30 is that projects that reference interfaces

Setting ServiceStack Cookie Domain in Web.Config Causes Session Id to Change on Every Request

廉价感情. 提交于 2019-12-02 05:08:15
问题 As per ServiceStack - Authentication for domain and subdomains, I set the cookie domain in the httpCookies section and it in fact works - it sets the domain of the cookie properly. But what I noticed is, once I add this line to the config, a new session id is generated on every request, regardless if the user has already been authenticated. My code is bare bones and simple. My app host code: public override void Configure(Funq.Container container) { Plugins.Add(new AuthFeature(() => new

ServiceStack IAuthSession empty after authentication with FacebookAuthProvider

左心房为你撑大大i 提交于 2019-12-02 04:42:49
I'm trying to get the user data through IAuthSession after a doing an authentication with facebook, when I try get the user with Request.GetSession(true) which returns AuthUserSession (implements IAuthSession) I get a partial subset of data like the following: I'm trying to use it in a service method [ClientCanSwapTemplates] [DefaultView("dashboard")] public DashboardResponse Get(FacebookRequest userRequest) { var user1 = Request.GetSession(true); return new DashboardResponse(); } I've added the auth providers my apphost as follows: Plugins.Add(new AuthFeature(() => new AuthUserSession(), new

Why does ToOptimizedResult throw “Requested feature is not implemented.” on Mono?

杀马特。学长 韩版系。学妹 提交于 2019-12-02 04:27:28
I am building my ServiceStack 4.0.8 service using Visual Studio. On Windows everything works perfectly, but when I try to run on Mono 2.10.8.1 / Ubuntu 13.10 with NGINX 1.4.1 and fastcgi-server4. I get an exception: The requested feature is not implemented. at System.Web.HttpContextWrapper.GetService (System.Type serviceType) [0x00000] in :0 at ServiceStack.Host.RequestPreferences.GetWorker (System.Web.HttpContextBase context) [0x00000] in :0 at ServiceStack.Host.RequestPreferences.get_HttpWorkerRequest () [0x00000] in :0 at ServiceStack.Host.RequestPreferences.get_AcceptEncoding () [0x00000]

ServiceStack Javascript JsonServiceClient missing properties

前提是你 提交于 2019-12-02 04:23:34
I am trying to connect to a JWT authenticated service using the Servicestack JsonServiceClient, however the Docs only describe how to do this using the C# client: http://docs.servicestack.net/jwt-authprovider In these docs, it indicates there should be a BearerToken property on the client like so: var client = new JsonServiceClient(baseUrl) { BearerToken = jwtToken }; However this seems to be missing on the Javascript Client. How can I assign the jwtToken when using the Javascript client? I have tried the following variations to get this to work: var jwtToken = this.auth.getAccessToken(); this

How to assign default value to a property

删除回忆录丶 提交于 2019-12-02 04:00:45
CustomerService is a webservice and it is getting called successfully but I am unable to access SelectCommand in the Any method. I think I am missing something here, could anyone suggest. public class CustomerService : Service { private readonly IDbConnection _dbConnection; // injected successfully public ServiceCommand SelectCommand {get;set;} public CustomerService(IDBConnection dbConnection) { _dbConnection = dbConnection; } public Customer Any(CustomerRequest request) { //_dbconnection is available //but selectcommand is null here //db operations } } [Route("/customers")] public class

Setting ServiceStack Cookie Domain in Web.Config Causes Session Id to Change on Every Request

删除回忆录丶 提交于 2019-12-02 03:24:28
As per ServiceStack - Authentication for domain and subdomains , I set the cookie domain in the httpCookies section and it in fact works - it sets the domain of the cookie properly. But what I noticed is, once I add this line to the config, a new session id is generated on every request, regardless if the user has already been authenticated. My code is bare bones and simple. My app host code: public override void Configure(Funq.Container container) { Plugins.Add(new AuthFeature(() => new CustomUserSession(), new IAuthProvider[] { new CustomCredentialsProvider(), })); container.Register

How to resolve type using ServiceStack Funq IoC

孤人 提交于 2019-12-02 03:16:27
问题 I'm trying to write a JobActivator for HangFire using ServiceStack IoC and I'm having trouble resolving from a type. I'm sure this will be an easy answer for someone with more experience with generics. The container I'm passing in is coming from HostContext.Container using Hangfire; using System; using System.Collections.Generic; using System.Linq; using ServiceStack; namespace Common.Hangfire { public class FunqJobActivator : JobActivator { private Funq.Container _container; public

Razor dependency issues in ServiceStack 4

浪尽此生 提交于 2019-12-02 02:49:11
I'm trying to upgrade an app to ServiceStack 4 but I'm getting an error with the reference to System.Web.WebPages.Razor in Web.config : Could not load file or assembly 'System.Web.WebPages.Razor, Version=1.0.0.0 , Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. The offending reference is the exact same that is included in various ServiceStack examples: <compilation targetFramework="4.5" debug="true"> <assemblies> <add assembly="System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

How to resolve type using ServiceStack Funq IoC

╄→гoц情女王★ 提交于 2019-12-02 02:31:44
I'm trying to write a JobActivator for HangFire using ServiceStack IoC and I'm having trouble resolving from a type. I'm sure this will be an easy answer for someone with more experience with generics. The container I'm passing in is coming from HostContext.Container using Hangfire; using System; using System.Collections.Generic; using System.Linq; using ServiceStack; namespace Common.Hangfire { public class FunqJobActivator : JobActivator { private Funq.Container _container; public FunqJobActivator(Funq.Container container) { if (container == null) { throw new ArgumentNullException("container