Stream

Join this community to post or comment
 
We're using SS authentication and are running afould of Safari's "don't allow cookies from sites I've never visited" rule.

We have an SSO facility at api.mycompany.com/sso that is used to authenticate users, and it sets the standard ss cookies, which visits to foo.mycompany.com work fine for, but we have a web app at www.foo.com as well, and it fails to log in users if they've never visited *.mycompany.com in their safari browser because of this rule.

What is the recommended way of dealing with this? To date our sites have all been *.mycompany.com so accessing api.mycompany.com worked fine, but we're about to start making www.foo.com, www.bar.com, etc. and want to use the same API everywhere across our family of sites.
1
Add a comment...

Demis Bellot
owner

Announcements  - 
 
v4.0.40 Released!
https://servicestack.net/release-notes

Java and Android Studio
We're happy to announce our new Native Types support for Java and Android Studio!
The ServiceStack IDEA plugin integrates with Android Studio to enable Add ServiceStack Reference functionality to provide a terse, typed and productive API for consuming ServiceStack Services from Android Apps.

TechStacks Android App
To demonstrate Java Native Types in action we've ported the Swift TechStacks iOS App to a native Java Android App to showcase the responsiveness and easy-of-use of leveraging Java Add ServiceStack Reference in Android Projects.

iOS-inspired Data Binding Example
As there's no formal data-binding solution in Android we've adopted a lightweight iOS-inspired Key-Value-Observable-like data-binding approach in Android TechStacks that should ease porting between native Swift iOS and Java Android Apps.

Functional Java Utils
The Func.java static class in the Java ServiceStack Client Library contains a number of common functional API's providing a cleaner and more robust alternative to working with Data than equivalent imperative code which is especially useful when working with Java 7 in Android which lacks any language or library support for functional programming.

Customer Forums moved to Discourse
We've moved the ServiceStack Customer Forums from Google+ over to Discourse as it provides better readability, richer markup, support for code samples, better searching and discoverability. The new Customer Forums is available at: https://forums.servicestack.net When Signing up you'll need to ensure to use the exact same email that's registered in your active ServiceStack account or that's listed as a support contact at: https://servicestack.net/account/support

Swift Native Types upgraded to Swift 1.2
The latest stable release of Xcode 6.3 includes the new Swift 1.2 release that had a number of breaking language changes from the previous version. In this release both the Swift generated types in ServiceStack and the JsonServiceClient.swift client library have been upgraded to support Swift 1.2 language changes.

Merge Disconnected POCO Data Sets
There's a new `Merge` extension method can stitch disconnected POCO collections together as per their relationships defined in OrmLite's POCO References.

Other
There are a number of other changes and enhancements added throughout the ServiceStack, details available in the release notes: https://servicestack.net/release-notes
4
Graham Clark's profile photo
 
Quick question about the release notes - it says "Updated to the latest Swagger API", what exactly does this mean? Swagger 2.0?
Add a comment...

Stephen Patten

Discussion  - 
 
I like to use ServiceStack to load test a database (oracle) in a staging environment, without cluttering up the existing schema with bogus data. Is there a way to get the Northwind schema and data loaded by using just OrmLite and some helper functions? If my memory serves me correctly I think I saw a similar feature in the RedisAdminUI, which I investigate shorty. 

Thank you,
Stephen
1
Add a comment...

Ryan Britton

Discussion  - 
 
I posted this question on SO. Any input/experience in this regard would be appreciated....
1
Ryan Britton's profile photoBlake Blackshear's profile photo
5 comments
 
We are going to run with mono as a self host daemon in production anyways. I hate managing Windows servers. I think our load is small enough. The load testing will let us know.
Add a comment...

Demis Bellot
owner

Announcements  - 
 
AutoQuery Viewer Released!

Hi everyone, just a quick note to announce that our new AutoQuery Viewer iPad app is now available for free download on the AppStore :) https://github.com/ServiceStackApps/AutoQueryViewer

AutoQuery Viewer lets you query your AutoQuery Services from a native iPad App. It's also highly customizable so you can tailor it to provide a unique experience for your Services.

Full details of the customization available and examples are available in the GitHub project repo: 
https://github.com/ServiceStackApps/AutoQueryViewer

Feedback is Welcome!
AutoQueryViewer - Native iPad App for browsing, inspecting and querying any ServiceStack AutoQuery Service
4
1
Darren Reid's profile photo
Add a comment...

Demis Bellot
owner

Announcements  - 
 
v4.0.38 Released!
https://servicestack.net/release-notes

Swift!
We're excited to announce our new support for Apple's new Swift Programming language in this release to provide the most productive way to consume typed web services from iOS and OSX Apps!

If you've previously used *Add ServiceStack Reference* for .NET or TypeScript projects you'll feel instantly familiar with the new solution for Swift iOS and OSX projects which includes an XCode Plugin that provides the Add Reference Dialog from XCode. After adding the url to the remote ServiceStack instance, the generated Swift DTO's are added to your project with the filename specified as well as a JsonServiceClient.swift file (aka JSC from ServiceStack.Client NuGet pkg) which encapsulates a typed JsonServiceClient with API's based from the .NET JsonServiceClient.

TechStacks App
To illustrate how nice the new Swift support is we've developed a native iOS App for techstacks.io and go through some of techniques we used to build a responsive, non-blocking iOS App. 

TechStacks Desktop App
We've also developed an OSX Desktop App which is built around 2 simple AutoQuery Services showing how much querying functionality AutoQuery provides for free as well as how easy it is to call from Swift.

Built-in HTML/JS/CSS Minification
If you don't already have a built-in minification solution for your project this is an really easy and non-invasive solution to easily enable for an existing solution. It can be enabled for dynamic Razor views on the RazorFormat plugin and we also include an elegant solution using Virtual File System to pre-populate your ServiceStack instance on StartUp with minified css/js/html files.

New ServiceStack Cookbook
There's a new ServiceStack Cookbook by +Kyle Hodgson and +Darren Reid  showing 70 real-world recipies taking advantage of some of the neat features in ServiceStack.

Support for Bing's new RecycableMemoryStream
We've added support for switching to use Bing's new RecycableMemoryStream which is designed around re-using a pool of byte buffers.

Authentication
There is a new Microsoft Live OAuth2 Provider contributed by +Ivan Fioravanti 
and a new Instagram OAuth2 Provider contributed by Ricardo Brando

New url redirect filters enabled in all AuthProviders letting you inspect and customize the redirect urls sent by each AuthProvider.

There's also a few other minor features - please check the Release Notes for more details! https://servicestack.net/release-notes

Enjoy!
8
1
Demis Bellot's profile photoTobias Zürcher's profile photoDarren Reid's profile photo
3 comments
 
totally see your point. we started with swift a new project, but moved back to obj-c :) that's why i was asking. keep it up!
Add a comment...

Rob Schoenaker

Discussion  - 
 
Trying to minimize CSS en JS on the fly. After the HTML minification (last post, works like a charm) I would like to auto-minimize css and js files too. Any ideas on how to accomplish this?
1
Demis Bellot's profile photoRob Schoenaker's profile photo
11 comments
 
Hmmm I zee where you are heading now. In that case it is quite impossible tot know the exact state while processing.... Bummer.
Add a comment...

Brandon Nelson

Discussion  - 
 
Is the 250/dev ORMLite license a yearly license (for usage, not support) or a perpetual license like servicestack main? Will ORMLite work stand alone? Can it be used with things like Web API 2?
1
Demis Bellot's profile photo
 
Yep it's perpetual like ServiceStack where you can continue to use the last version before your 12 months maintenance expires without renewing. It's also a stand-alone product and can be used outside of ServiceStack.
Add a comment...

Bruce Parr

Discussion  - 
 
Hey Demis, has there been any thought given toward an evangelism program? I have seen posts asking you to visit xyz to present, but as much as we would love to see your smiling face, you can't be everywhere at once. 

Personally I feel comfortable enough with the community version to present basics, but if there was a "how to present" or similar, I would love to be a local evangelist here in Pittsburgh, PA. As it is now, our local ASP.NET MVC Meetup group is thinking about an "API Cage Match" presentation with me using SS and another dev using Web API at the same time to develop a common set of tasks, but having an evangelism guide to make it "official" would be awesome. 

If this hasn't been discussed or otherwise does not (yet) exist, I'd love to be a part of it.

Thoughts or comments are appreciated. 
1
Demis Bellot's profile photoJoe Kuemerle's profile photo
2 comments
 
I recently did a talk at my local user group "Hey, You Got Your API In My Website!" ( http://www.kuemerle.com/talks/servicestack/ ) that was well received.The code that I use as a basis for that talk is: https://github.com/jkuemerle/DoorComp .

I am also shopping that talk around to various conference but nobody has yet picked it up. I now know who to talk to if it get accepted and I want some swag to give away.

I am also open to feedback on my abstract if anyone has any suggestions for way to improve it.
Add a comment...

Yasir Khan

Discussion  - 
 
What is the future of ServiceStack. Is there anyone using it in production except Stack Overflow? My company will be making an important decision regarding our new REST API platform and I want to know if this platform is production ready.
3
3
Rob Schoenaker's profile photoPaula Moore's profile photoHenrik Larsson's profile photoGuillermo Andres Londoño's profile photo
15 comments
 
A bit late response maybe, but anyway.
We have been using SS since version 3.9. It serves as a cleanly separated infrastructure. We chose SS because of the lightweight and easy implementation, easy IoC, no extra dependencies and cross-platform availability.

We have some old MVC apps running as well, but they are slow compared to SS. Especially startup on MVC is slow.

If you are in the Netherlands and like to do some rhyming, check out Van Dale's rijmservice on: www.vandale.nl/rijmwoordenboek

This is 100% ServiceStack + a custom rhyming engine. It includes the latest version that also does HTML, JS and CSS compression. 
Add a comment...

About this community

ServiceStack is a services framework providing a simpler alternative to WCF, MVC and WebApi, with Web, REST, SOAP and MQ services for .NET or Mono. This group lets you get in touch with the wider ServiceStack community and share relevant news, announcements and discussion. To keep things relevant to members, and for this group to retain a high quality ratio of meaningful and interesting content - please keep all support questions on StackOverflow or inside Customer Forums. Customer support options are available at: https://servicestack.net/account/support

Lennart Berg

Discussion  - 
 
Hi Guys
I just needed a select with readlock (mysql SELECT ... FOR UPDATE ) during a transaction and found no way of doing that in Ormlite.
No read lock was seen on any transaction level - so i ended up writing the SQL by hand. ( which is bad since it locks me down to beeing mysql specific )

Am i missing a method to get a read lock in Ormlite somehow?
1
Demis Bellot's profile photoLennart Berg's profile photo
2 comments
 
Yeah tried that, but all continue until the db.save before locking meaning that all the values will overwrite each other due to the read value beeing old.
So quite meaningless to prevent race conditions
Add a comment...

Liang Qin

Discussion  - 
 
Hey guys, I've been developing a small project with ServiceStack OrmLite for months, now I am getting the "The free-quota limit on '10 OrmLite Tables' has been reached" issue, I know that i should buy at least a Indie Developer license to proceed, but before that I wonder, would all users of my project (a winforms tool) need any additional license to run the program after I pay for my Indie Dev copy?? Thanks in advance for anyone who would help me!
1
Demis Bellot's profile photoLiang Qin's profile photo
4 comments
 
Thanks a lot Demis! :)
Add a comment...

Stephen Brannan

Discussion  - 
 
 I have a situation where I work for two companies. Under the first one I am a v4 developer who has paid for ServiceStack appropriately (Company A). I'm also a developer for a separate company  (Company B) where they use v3. Unfortunately at this time Company B won't upgrade to v4 but they want to implement a Windows Auth Provider.  Is there anyway for Company B to pay for use of the Windows Auth Provider in v3 (without any support of course) ?
1
Demis Bellot's profile photoStephen Brannan's profile photo
6 comments
 
Oh wow this is awesome! Thanks so much Demis! It's very much appreciated!
Add a comment...

Brett Nagy

Discussion  - 
 
Today I had to work on a project for a client and due to restrictions out of my control, that project had to be ASP.NET MVC 5. Today I was reminded what a ball of mess that world is.

There's no definitive answer on how to use Ninject with MVC and WebAPI (err, 2 frameworks in one right there), DLL versioning nightmares where MVC 4 still creeps in and bin deploy craziness that's not documented anywhere.

So, ServiceStack people, thank you. Thank you for doing what you're doing.
20
Demis Bellot's profile photo
 
Thanks, after years of being a slave to them, I've long ago abandoned considering MS frameworks and their constant rewrite cycles (and as a result was close to abandoning C#/.NET entirely). IMO MS fx's don't have the right focus on simplicity, optimizing for end value, re-use and thinking how everything fits/integrates together and IMO seem to constantly come up with large, over-architected, disjointed and complicated slns for relatively basic use-cases. E.g. the number and size of dependencies for some of the starting templates are frightening. Most of the time it's hard to tell what dlls/deps and config are required so a lot of the time you'll end up deploying ~50+ deps and heavy config for even basic projects. In contrast you can get pretty far with just SS core dlls, e.g: https://github.com/ServiceStackApps/Chat#super-lean-front-and-back which also allows for some use-cases like embedding and ilmerging them all together: https://github.com/ServiceStack/ServiceStack.Gap which isn't something I'd attempt with any of MS's heavy fx's.

One of the goals of Simplicity should be to start from a good solid design that maximizes re-use and continue to strengthen/enhance its mental model to maximize value and reduce the cognitive load required to Get Things Done with minimal effort/friction required - IMO this hasn't historically been a goal, hence the reason for starting SS. Although it is nice that C# has had great language designers that's avoided adding unnecessary bloatware and has remained a well-designed modern language that IMO is still the best general purpose statically typed language to date (tho does have its warts) - just a shame the same careful thought and talent weren't available for ASP .NET and MS's default high-level fx's which were clearly designed and written by other devs with different focuses.
Add a comment...

Ryan Britton

Discussion  - 
 
I see that in the latest version of SS (.38) you're starting to play around with using a SS deployment to double as a proxy? I would be keen to hear your motivations behind this? 

my thoughts (with apologies in advance - because they are a little broad and generalised):

I've been thinking about a strategy for using SS deployments as a distributed system of atomised worker nodes for a freight customer who needs to enable dozens of offline-capable sites with poor connectivity  spread around the country, and the thinking around using SS as a "network device" seems to support a move in this direction.

I can see dozens of touch-points which would make SS the ideal tool for the job here. IMO the difficulties would be in master-master-type synchronisation of data, and in the management worker queues (MQ) in these types of scenarios (which would be difficult when using something like redis to house the queues, while still maintaining a centralised view of things like dead-letter queues etc).

Do you think it would be worthwhile to build an MQ module for SS using 0MQ (where the focus is less about a deferred storage of message on-disk and in memory and more about individual workers with intelligent retry-mechanisms communicating directly, and the efficiency of raw network communication between these nodes using an established set of architectural patterns)?

add in some SS-node "discovery", and you've got something ~really~ interesting... what do you think?

http://zguide.zeromq.org/page:all
By Pieter Hintjens, CEO of iMatix. Please use the issue tracker for all comments and errata. This version covers the latest previous stable release of ØMQ (3.2). If you are using older versions of ØMQ then some of the examples and explanations won't be accurate.
1
Demis Bellot's profile photoRyan Britton's profile photo
2 comments
 
thanks for the feedback - I've heard of nonomsg previously, but never really had a good look. I didn't realise that Peter was behind it.

Yeah - in 0MQ software patterns like "The Paranoid Pirate" and "The Titanic" were recommended for these retry mechanisms (the latter which also "persists to rusty platters at the expense of performance", as he puts it)

I was thinking of using something like an embedded RavenDb database for persistence ONLY if sending fails. I know that purists would talk about the risk of the process failing while messages are within the retry-loop - I guess it boils down to how much performance you're willing to sacrifice in the interests of redundancy.

I've seen an enterprise solution with clustered MSMQ services fall over despite a huge price-tag to purchase "foolproof redundancy")...
Add a comment...

Brandon Nelson

Discussion  - 
 
Can I query across databases with ORMLite.SqlServer? If i have a query that requires Dba.dbo.Tablea inner joined with Dbb.dbo.Tableb is that possible? I don't see anything in the documentation about specifying the database name in the class
1
Demis Bellot's profile photoBrandon Nelson's profile photo
4 comments
 
Using scheme like that worked thanks
Add a comment...
 
I am seeing an issue with XML request deserialization when a charset is specified as part of the Content-Type. When the Content-Type header is specified as "text/xml; charset=utf-8" with a space between content type and charset and utf is lowercase, the request object is being deserialized to null. Removing the space between before charset or capitalizing utf allows the request to be properly deserialized. Is there something in the parsing that is causing this? I am able to reproduce by creating a DTO with a single property and trying to POST the request with the associated content-type in fiddler. I am unable to reproduce in postman as it apparently silently capitalizes UTF.

Successful headers
Content-Type: text/xml; charset=UTF-8 (capital UTF)
Content-Type: text/xml;charset=utf-8 (no space)
Failure headers
Content-Type: text/xml; charset=utf-8 (lowercase utf, space)
2
Demis Bellot's profile photo
4 comments
 
FYI this was resolved in this issue: https://github.com/ServiceStack/Issues/issues/237 - fix is available on MyGet.
Add a comment...

Rob Schoenaker

Discussion  - 
 
I was testing some functionaity for automatically minimizing Razor ViewPages. The code is quite simple and it seems stable. Here is the suggested modification:


Modifications to public abstract class RenderingPage:

1. Add a static field:
 public static bool MinimizeOuput = false;

2. modify the WriteLiteral method to this:

//No HTML encoding
    private char lastChar = (char)0;
    public virtual void WriteLiteral(string str)
    {
      if (MinimizeOuput)
      {
        char c;
        for (int i = 0; i < str.Length; i++)
        {
          c = str[i];
          if (c < 32) continue; // Skip all these
          if (c == 32)
          {
            if (lastChar == 32) { continue; } // Only write one space character
          }
          this.Output.Write(c);
          lastChar = c;
        }
        return;
      }
      // Non minimized version
      this.Output.Write(str);
    }

3. In AppHost.Configure, enable or diable this with:
RenderingPage.MinimizeOuput = true / false;

Any ideas?
1
Demis Bellot's profile photoRob Schoenaker's profile photo
31 comments
 
The HTML compressor is more difficult. It needs to take the JavaScript into account. I will fix that too
Add a comment...

Liang Qin

Discussion  - 
 
OrmLite is such a great ORM!
5
Add a comment...

Yasir Khan

Discussion  - 
 
Is there a way to use async with servicestack? I can't find any examples of that in the documentation.
1
Demis Bellot's profile photoTim Goyer's profile photo
2 comments
 
I have one slight quibble with your async example.  It's best practice to use Task.Run instead of Task.Factory.StartNew.  While Task.Run is more or less shorthand for Task.Factory.StartNew, there are specific examples where they don't behave the same.

For instance,  a blog post by Stephen Toub (http://blogs.msdn.com/b/pfxteam/archive/2011/10/24/10229468.aspx) talks about what to expect from Task.Run. Specially in the scenario where the action returns Task<TResult>, Task.Factory.StartNew would return a Task<Task<TResult>> requiring an Unwrap to get the inner task where as Task.Run would return a Task<TResult> with an implicit unwrap.
Add a comment...