Questions tagged [servicestack]
ServiceStack is Fast, Simple and Versatile message-based Web Services and MQ Framework for .NET and .NET Core
5,252
questions
1
vote
1
answer
56
views
There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'android-...'
I'm struggeling building my .NET MAUI Blazor App. It has worked before, but now I'm getting these errors:
I've searched for hours, but can't seem to fix this. Does someone knows how I can get my App ...
3
votes
0
answers
32
views
Generate correct documentation for a list of complex objects using ServiceStack / OpenAPI spec 2.0
I have the following API, defined using ServiceStack, for which the documentation is not generating correctly.
public class User
{
public string Name { get; set; }
public int Id { get; set; }
}...
1
vote
1
answer
15
views
ServiceStack Running Migrations in IDE with custom app.config settings
I'm following the guidance provided here to execute migrations within my IDE using an explicit Test Class.
However, the ResolveDbFactory fails with an error about the connection string being empty.
...
1
vote
0
answers
11
views
ServiceStack - When returning an HttpError, the response content-type does not respect Accept header in request
I have a service action that returns an HttpError if something goes wrong while processing the request. If I set the request Accept header to text/plain, the Content-Type of the response is text/html. ...
1
vote
1
answer
17
views
OrderBy expression with AutoQuery?
Is it possible to create an AutoQuery with a SQL expression for OrderBy?
public class FindStatisticalData : QueryDb<StatisticalData>
{ }
public IAutoQueryDb AutoQuery { get; set; }
var query ...
0
votes
0
answers
38
views
iOS App Crashes in Release mode on making api request using ServiceStack in .Net MAUI app
I have integrated ServiceStack nuget package in .net maui app and making api request from it. It works fine in debug mode on ios platform, but in Release mode my app crashes. I'm not able to figure ...
1
vote
1
answer
75
views
iOS App Crashes in Release mode on making api request using ServiceStack client in .Net MAUI
I have integrated ServiceStack nuget package in .net maui app and making api request from it. It works fine in debug mode on ios platform, but in Release mode my app crashes. I'm not able to figure ...
1
vote
1
answer
28
views
Service Stack API Explorer - how to customize the landing page?
I created a new ServiceStack (v. 6.11) project using the "x" tool, as suggested in the documentation:
https://docs.servicestack.net/create-your-first-webservice#step-2-selecting-a-template
...
1
vote
1
answer
106
views
There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier caused by ServiceStack
When adding ServiceStack to a .NET 7 or .NET 8 (preview) MAUI project, the following errors are reported:
There was no runtime pack for Microsoft.AspNetCore.App available for the specified ...
1
vote
1
answer
43
views
ServiceStack update to 6.10.0
in my project i've installed ServiceStack v. 6.9.0. Now I'm trying to update to v.6.10.0, but i'm getting the following error
Package restore failed. Rolling back package changes
My project is .NET 6.
...
0
votes
1
answer
19
views
Authentication failing in ServiceStack integration test
I have scaffolded a ServiceStack project with authentication, and have applied the [Authenticate] attribute to one of my services. The authentication process works fine when I launch the application ...
0
votes
1
answer
27
views
ServiceStack CreatorKit migrations failing
I'm interested in setting up the CreatorKit project on a new Ubuntu server and I'm at a point where I'm running out of ideas for troubleshooting a Github Actions deploy issue.
The 'Run remote db ...
2
votes
0
answers
46
views
How to generate C# enum as TS enum using Servicestack types generation?
When generating TS types using Servicestack we get our enums as string literal types. Is there a setting to make SS generate them as TS enums instead?
2
votes
1
answer
31
views
ServiceStack SSE plugin to handle response filter
Instead of using the ServerEventsFeature as a plugin for my service is there a way to send messages on a response filter?
How do I initial, connect and publish events? How should I handle the ...
2
votes
0
answers
51
views
.Net 6 : ServiceStack IAppSettings returns Null while accessing value from Appsettings.json
I am facing issue while accessing value from Appsettings.json in service.
Technology stack : Microservice with ServiceStack.core :5.12.0, C#, .Net 6
I am trying to access values from following ...
2
votes
0
answers
52
views
Using ServiceStack to register multiple handlers to RabbitMq is causing massive slowdowns during startup
I have a .NET app that uses ServiceStack to bind service adapters to corresponding queues within RabbitMQ, in a very similar manner to the examples provided here - https://docs.servicestack.net/rabbit-...
2
votes
0
answers
17
views
ServiceStack OrmLite, custom/raw query, deserializing to Model types
I'm trying to execute a customized query and I don't want to involve OrmLite for anything other that the mapping from IDataReader to a defined ServiceStack model type.
Currently, I'm doing something ...
1
vote
1
answer
35
views
ServiceStack HttpUtils - How to get error body using .NET 6
Is there a way to capture the error message using ServiceStack HttpUtils from my .NET 6 project. Now it returns an empty string...
try
{
var response = await GetApiUrl().CombineWith("/...
1
vote
0
answers
26
views
ServiceStack AutoQuery not working with Code First approach
I already use ServiceStack OrmLite for querying my database, but now I want to create some CRUD API's myself. I have a separate project where my POCO's are declared with the ServiceStack ...
1
vote
1
answer
21
views
ServiceStack GET Request Expects Body Data
I'm using the ServiceStack v6 framework for an API service with the OAuth as the authenticator provider.
The authentication process works fine but after that when I'm requesting some data from the API ...
1
vote
1
answer
45
views
Changing the model of the table Migration in the migrator process
Good Day everyone,
I make a process to run migrations files. but for consistency reasons, I need to rename the table "Migration" for "migration" and the columns too, not using the ...
1
vote
0
answers
38
views
Unable to set SameSite on cookies
We are setting a cookie on request:
var cookie = new Cookie()
{
Path = "/",
Name = "TestCookie",
Value = "Value",
Expires = DateTime.UtcNow.AddMinutes(60),...
2
votes
1
answer
17
views
Why ServiceStack AuthProvider Logout is not working in deployed environment
In our project we are overriding the logout method of Servicestack to remove and delete "ss-tok" cookie.
While this is working on my local machine , in deployed environment I see the ss-tok ...
1
vote
1
answer
25
views
How to post to url and get bytes back using ServiceStack?
I'm trying to post data to a URL and get byte array back using ServiceStack.
byte[] pdf = await "https://some-url.com/that-expects-post/and-returns/pdf-file"
.PostToUrlAsync(new
...
2
votes
1
answer
133
views
Servicestack Opentelemetry integration
We want to integrate Open Telemetry into our Servicestack API.
The requests via the AspNetCoreInstrumentation are displayed correctly in JaegerUI, but I don't see the additional span added to track ...
2
votes
1
answer
87
views
Getting original ServiceStack route from DTO generated for TypeScript client
We had an issue in a production release where we get JSON response that differs from expected model described in a generated TypeScript DTO, while getting successful status code.
In our case, as a ...
1
vote
1
answer
29
views
How to send down a List<T> with ServiceStack?
So here's my DTO, when I debug I CLEARLY see the Roles list populated... but in the endpoint /RestApi/myroute?format=json (or any format) there's nothing there. Tried changing List to a dto object, ...
1
vote
1
answer
45
views
ServiceStack IServiceClient throws "<request DTO> is not of type IList<>" when running on iOS device
A ServiceStack service client invocation (that works fine on desktop and iOS simulator) crashes when run on iOS devices. The service is the minimal "Hello" from ServiceStack's docs/samples:
...
1
vote
1
answer
20
views
ServiceStack LoCode datetime
Attempting to use ServiceStack LoCode to use database first to allow users to edit data in an existing database table. The table has a couple DateTime fields. I don't see in the documentation how to ...
1
vote
1
answer
26
views
ServiceStack virtual directories collide with SPA routing
I was previously using SharpPagesFeature with a FallbackService to handle SPA fallback. I have a route called /modules. However, some part of ServiceStack registers a virtual directory at that same ...
1
vote
2
answers
749
views
Creating a soap endpoint from WSDL in .net
I am trying to create a SOAP web service that will be consumed by another company. This company expects to give the data in a certain way, hence I have created a WSDL to reflect that.
I don't need to ...
1
vote
0
answers
59
views
How to instrument Prometheus metrics to ServiceStack App
I was able to configure and get Prometheus metrics data by following this link for .net core application.
https://www.c-sharpcorner.com/article/instrumenting-asp-net-core-application-for-exporting-...
1
vote
1
answer
2k
views
ServiceStack/Client and "Reading from "node:fs" is not handled by plugins (Unhandled scheme)." error
I am trying to upgrade from the 1.X ServiceStack/Client library to the 2.X version I got the following error when running "ng build" after the upgrade (latest 1.X works fine):
node:fs - ...
0
votes
1
answer
52
views
Service Stack JsonApiClient change base url
I'm using service stack JsonAPiclient to login and manage auth.
can't seem to figure out how to change baseurl after logging in.
var client = new JsonApiClient(baseUri);
my auth url is different than ...
1
vote
2
answers
136
views
.Net 7 ServiceStack 6.4 breaking api route that has just "/api"
Trying to provide more info and not sure how much is relevant.
One of our webapi is deployed to IIS : abcdomain.com/xyzweb. We started upgrading our env to .net 7 from .net 5. Web api also uses ...
1
vote
1
answer
46
views
How can i execute filter from our JSON filter JSON?
I have a vue3 datagrid and I want to fill the data in this grid with filter by API. At the same time, I want to send the filter fields in the grid to the API as JSON and execute them according to this ...
0
votes
0
answers
34
views
Servicestack JsonClient - Object reference not set to an instance of an object
We have a basic servicestack frontend that sends using the jsonclient to backend services and works for the past few years.
I am trying to investigate why we are receiving the below exception on any ...
1
vote
1
answer
29
views
ServiceStack #Script Argument in Database Script
I have the following #Script (ServiceStack framework) template.
I want to use the argument Code in my dbSelect.
How is this possible?
Example:
<small>Some Label</small><header>{{Code}...
0
votes
1
answer
30
views
Is there a setting to keep empty lists during JSON serialization in ServiceStack?
As the title says, is there a way to keep empty lists during JSON serialization in ServiceStack?
1
vote
1
answer
221
views
ServiceStack Open API - Swagger UI not displaying enum values as dropdown
I have recently upgraded my ServiceStack libraries from 5.10.4 to 6.5.0 and implemented Open API as specified in the documentation. But my Enum properties are displayed as Textbox instead of Dropdown ...
1
vote
1
answer
104
views
Unittesting a ServiceStack service that uses AutoMapper
We are using ServiceStack for our .NET backend and I am trying to work on getting unit testing into the project. However there are some automated tools within ServiceStack that makes it a bit ...
1
vote
1
answer
85
views
When I need to register ServiceStack license
What is the use of the ServiceStack license? From what I read in the FAQ, in a WPF project where the client consumes ServiceStack services, it should be useless, even if this phrase
When is a ...
1
vote
1
answer
150
views
ServiceStack REST API Versioning practical questions
Our team is looking for a convenient way to implement versioning in our ServiceStack API implementation.
I've read the articles:
ServiceStack: RESTful Resource Versioning
https://docs.servicestack....
0
votes
1
answer
113
views
ASP.NET 6 CORS problems after adding IMiddleware for authorizing users
Recently, in a project I'm working on, I added a Role creation system. There are many actions in the system and we decided to let the user create their own roles. I added an implementation of ...
2
votes
2
answers
47
views
Why do ServiceStack examples usually have a function definition of "object Any"
I notice most if not all ServiceStack example have services of this form:
public object Any(Request request) { }
Even if the function is always returning an integer.
Why declare the function as public ...
1
vote
1
answer
73
views
ServiceStack Timeout - ASP.NET executionTimeout
I'm using ServiceStack's JsonServiceClient but I've seen that despite setting the client timeout, the HTTP call still goes wrong after a certain period of time. I fixed this by setting the ...
0
votes
0
answers
79
views
How to set up Basic Authentication with sessionId in ASP.NET Core MVC?
I have an ASP.NET Core MVC application in the front-end and I have a back-end service which is built with ServiceStack. This service has BasicAuth, which requires to send encrypted username+password ...
0
votes
1
answer
71
views
StackTrace inside an Exception in .Net Xamarin
Inside my .Net Xamarin app, I don't get a stack trace with this code:
new Exception().StackTrace
Why not, and how can I get it?
Update:
If I call the following code, I get a stackTrace with one frame ...
1
vote
1
answer
47
views
Columns Physical Order in OrmLite
regards everybody:
I have a data model for example:
[Alias("log")]
public class Log
{
[AutoIncrement]
[PrimaryKey]
[Alias("id")]
public ...
0
votes
1
answer
35
views
Why does db.select<T> is so slow when the model inherits from AuditBase?
I can observe that fetching all records from a small table (100 records) can take 1600 miliseconds, even using a ":memory:" SQLite database.
This happens only when the model inherits from ...