servicestack

Why isn't ServiceStack.Text being copied to Bin?

好久不见. 提交于 2019-12-23 09:21:10
问题 I have added ServiceStack.Redis via Nuget to an assembly that I have. That package has a dependency on ServiceStack.Common which has a dependency on ServiceStack.Text this project is referenced from my web project, but when I build the Website and load it in a browser I get the error Could not load file or assembly 'ServiceStack.Text, Version=3.9.24.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. Sure enough, when I go to the Bin

ServiceStack Ormlite: System.InvalidProgramException JIT Compiler encountered an internal limitation

守給你的承諾、 提交于 2019-12-23 07:47:31
问题 Hi i'm running ServiceStack with Ormlite and I encountered this error. Previously it is working fine. I'm not sure what I have changed that caused this error. I just used a simple db.Select() call and it throws this error. I tried various ways, like updating the nuget packages, clean and rebuild the project, etc and none of them works. System.InvalidProgramException was caught _HResult=-2146233030 _message=JIT Compiler encountered an internal limitation. HResult=-2146233030 IsTransient=false

How do I execute a SQL statement with parameters in ServiceStack.OrmLite?

对着背影说爱祢 提交于 2019-12-23 06:41:39
问题 I want to execute SQL statement with paraemeters in ServiceStack ormlite String.Format("SELECT OBJECT_ID(@name)", name); I want the best way. 回答1: If you need the POCO result you can use: List<Person> results = db.SqlList<Person>("SELECT * FROM Person WHERE Age < @age", new { age=50}); Reference: https://github.com/ServiceStack/ServiceStack.OrmLite#typed-sqlexpressions-with-custom-sql-apis 回答2: You can use SqlScalar<T> where T is int . Then simply pass an anonymous object with your parameter.

What would it take to build a simple proxy server using ServiceStack? [closed]

隐身守侯 提交于 2019-12-23 05:47:12
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . I'm wondering how difficult it would be to build a proxy service upon/with ServiceStack. Considering how fast ServiceStack is with Redis / serialization / etc., and how simple it is to implement the stack in general, this seems very tempting. Anyone else attempt this? How

How can I overwrite Login Url in ServiceStack.MVC authentication?

此生再无相见时 提交于 2019-12-23 04:19:09
问题 How can I override login Url? Could you add it to AuthenticateAttribute as property? 回答1: When using ServiceStacks' authentication mechanism you inherit from either ServiceStackController or ServiceStackController<T> which in turn inherits the former. The login URL is dictated by the LoginRedirectUrl property of ServiceStackController . public virtual string LoginRedirectUrl { get { return "/login?redirect={0}"; } } Since it is virtual you can simply override it in your own Controller. Or

How do I get ServiceStack binaries for use with the FOSS exception?

て烟熏妆下的殇ゞ 提交于 2019-12-23 02:36:53
问题 I am trying to build ServiceStack binaries for use with an open source project. First, I tried following the recommendations in this SO answer, by using the DLLs in the lib folder of the ServiceStack repo. However, amongst others, ServiceStack.Logging and some of the OrmLite DLLs are missing there. I then tried building the missing DLLs from the source code, but the OrmLite projects refer to a signed ServiceStack.Interfaces DLL in the lib folder, while for instance ServiceStack.Logging.NLog

How do I get Multiple raw Http Request Input Stream using IRequiresRequestStream?

余生颓废 提交于 2019-12-23 01:05:11
问题 I am trying upload multiple file using service stack. Below code is working fine for one file upload. I want to upload multiple file. Please let me know what change should be required so that below codes work for multiple files upload also. public class Hello : IRequiresRequestStream { Stream RequestStream { get; set; } } At client side I am using 'multipart/form-data' for file upload. 回答1: See the documentation on Uploading Files, IRequiresRequestStream is only for accessing the Request Body

How do I get Multiple raw Http Request Input Stream using IRequiresRequestStream?

主宰稳场 提交于 2019-12-23 01:04:14
问题 I am trying upload multiple file using service stack. Below code is working fine for one file upload. I want to upload multiple file. Please let me know what change should be required so that below codes work for multiple files upload also. public class Hello : IRequiresRequestStream { Stream RequestStream { get; set; } } At client side I am using 'multipart/form-data' for file upload. 回答1: See the documentation on Uploading Files, IRequiresRequestStream is only for accessing the Request Body

Two service stack APIs on the same IIS server

对着背影说爱祢 提交于 2019-12-22 18:00:06
问题 I'm currently in a situation where I need to deploy multiple Service Stack API's to the same server and getting an 'AppHostBase. Instance has already been set'. I've found this link: ServiceStack AppHost Is a Singleton? but it seems to be related to multiple versions of related APIs or versioned APIs. This is not my scenario. How can I (or is there a way to) configure multiple Service Stack API's which are completely unrelated and do not have any knowledge of each other to run simultaneously

servicestack self-hosted service uses chunked encoding - is unbuffered?

我怕爱的太早我们不能终老 提交于 2019-12-22 12:39:31
问题 I am trying to learn ServiceStack with the hello world examples and self-hosted example. I am making requests for JSON content. I have noticed the following in the response headers: Basic service hosted in an ASP.Net project: HTTP/1.1 200 OK Server: ASP.NET Development Server/10.0.0.0 Date: Wed, 10 Apr 2013 12:49:46 GMT X-AspNet-Version: 4.0.30319 X-Powered-By: ServiceStack/3.943 Win32NT/.NET Cache-Control: private Content-Type: application/json; charset=utf-8 Content-Length: 16 <------------