servicestack

Mono 3.0, Ubuntu 12.10, Nginx and ServiceStack

喜欢而已 提交于 2020-01-03 18:33:20
问题 According to the ServiceStack website, it should be easy to get ServiceStack up and running on Linux with Mono. I have installed nginx, mono 3.0 and fastcgi on the system (Ubuntu 12.10). I have used this tutorial to get Nginx and fastcgi running. In MonoDevelop I have right clicked on the project, then Tools -> Deploy to web. This generates the files I want to deploy. Then I have copied the dlls to /var/www/project_folder on Ubuntu. Next I started Nginx and fastcgi. My web.config file looks

Encoding issue service stack, quotes and angle bracket being stripped

ぐ巨炮叔叔 提交于 2020-01-03 17:56:06
问题 I have a service stack application, A test service receives a simple request, but I'm finding the value of the request once received isn't matching the original request. I send in: http://localhost/testapp/test?value=%22test%20data%22%20%3C12345%3E but the code outputs: test data" 12345> Note the missing first double quote and the missing left hand angle bracket. Any ideas why the application would be dropping the first " and the "<"? Is it part of some sort XSS protection? My code: public

ServiceStack Session always null in MVC Controller

可紊 提交于 2020-01-03 16:01:23
问题 I'm creating an ASP.NET MVC 4 app using the service stack MVC powerpack, utilizing service stack's auth and session providers. I'm copying lot of logic from the social bootstrap API project. My controllers inherit from the following base controller: public class ControllerBase : ServiceStackController<CustomUserSession> which is implemented as: public class ControllerBase : ServiceStackController<CustomUserSession> {} CustomUserSession inherits from AuthUserSession : public class

ServiceStack OrmLite Command Timeout

霸气de小男生 提交于 2020-01-03 09:46:26
问题 When using IDbConnection.ExecuteSql how do I set the Command Timeout? IDbConnection db = ConnectionFactory.OpenDbConnection(); db.ExecuteSql("..."); If I use the IDbCommand.ExecuteSql ( See below ) method I can set the Command Timeout, but I get a bunch of warnings about deprecated methods. IDbCommand comm = db.CreateCommand() comm.CommandTimeout = 240; comm.ExecuteSql("..."); 回答1: With the most recent change OrmLite no longer provides APIs around the IDbCommand object directly (which have

ServiceStack/ASP.NET: Global object to be access by all requests/worker processes?

人走茶凉 提交于 2020-01-03 05:12:14
问题 I am developing a web services project using the ServiceStack framework. I would like to create a global object(in my case, a SessionManager object for a GDS system I am working against, it has no relation to ASP.NET sessions) to be accessed by all incoming requests. However, I am facing a problem whereby ASP.NET will create a new instance of my application and thereby create a new instance of my SessionManager a few times in it's life cycle. I verified this by putting a debugging line on

Servicestack client/text licensing [closed]

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-02 10:23:29
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . We started using servicestack v4, rest assured that there where no licensing limits on the client. At least that's what I could read out of servicestack's download page. We are building our project according to mythz' answer to this question on servicestack how to structure an api. The generic client works (so

Authentication and Authorization with ServiceStack.MVC

霸气de小男生 提交于 2020-01-02 10:06:05
问题 AuthorizeAttribute is useless while using ServiceStack.Mvc AuthenticateAttribute is for DTO objects. There is no sample for AccountController with ServiceStack, Signout is not working in SocialBootStrapApi. Where is the basic Login,Logout,Authorize with Roles samples with ServiceStack.Mvc? (Not single page application, classic Asp.Net Mvc) 回答1: ServiceStack doesn't use the ASP.NET's or MVC's Authentication or anything that relies on it e.g. MVC's AccountController, it uses its own

how do I log requests and responses for debugging in servicestack

僤鯓⒐⒋嵵緔 提交于 2020-01-02 01:59:11
问题 I would like to log the entire request & response pair for a servicestack webservice. I've looked at the response filer, however the stream exposed is read only. 回答1: Have you seen ServiceStack's built-in Request Logger Plugin? It's a configurable in-memory Request Logger that maintains a log / (error responses) of the recent requests. If you would like a different behaviour, you can implement and register your own IRequestLogger, it gets called for every request. It's log method gets called

Send a large message to a ServiceStack service

爷,独闯天下 提交于 2020-01-01 19:13:07
问题 I need to create a service that will allow a client to send a message containing a large amount of data and I'm not sure how to structure the API. Let's say a client wants to save a new object which contains a variable number of related objects. For instance, an Order, which contains several line items contained in OrderDetail objects. An Order may have over a 1000 OrderDetail objects related to it, each of which may contain 20-40KB of data. The client needs to know that the service has

ServiceStack / ORM Lite - Foreign Key Relationships

有些话、适合烂在心里 提交于 2020-01-01 16:22:38
问题 I have the following POCO: [Alias("Posts")] public class Post : IReturn<Post> { [AutoIncrement] [PrimaryKey] public int PostId { get; set; } public DateTime CreatedDate { get; set; } [StringLength(50)] public string CreatedBy { get; set; } [StringLength(75)] public string Title { get; set; } public string Body { get; set; } public int UpVote { get; set; } public int DownVote { get; set; } public bool IsPublished { get; set; } public List<Comment> Comments { get; set; } public List<Tag> Tags {