Questions tagged [servicestack]
ServiceStack is Fast, Simple and Versatile message-based Web Services and MQ Framework for .NET and .NET Core
5,173
questions
1
vote
1
answer
37
views
Resolving Dependencies based on request in Servicestack
I have a Servicestack Api and i need suggestions \ ideas in injection the dependencies.
My Api needs to call appropriate dependency based on the request parameters
I have registered the dependencies ...
1
vote
1
answer
26
views
ServiceStack custom route variable placeholder doesn't have any constraint validation?
I have 2 endpoints built by ServiceStack services:
DELETE: /parents/{parentId} to delete a parent, along with all its children
DELETE: /parents/{parentId}/children/{childId} to delete a child for the ...
2
votes
1
answer
23
views
Servicestack return array instead of object with an array
I have a servicestack POCO object
public class SiteCalendarItem
{
[DataMember(Name = "title")]
public string Title { get; set; }
[DataMember(Name = "start")]
public ...
1
vote
1
answer
28
views
ServiceStack AutoQuery - Table not accessibele
When I try to use the IncludeTables property, the table is not generated or is not accessible using the AutoQuery API. When calling /metadata I only see these two endpoints:
CancelRequest
GetFile
Is ...
2
votes
1
answer
20
views
Issues faced during ServiceStack Ugrade from 3.9.71 to 5.9.2
ServiceStack Old Version: 3.9.71
ServiceStack New version: 5.9.2
.Net Framework: 4.6.1
We are facing quite a few issues while trying to upgrade ServiceStack. Could someone please help.
The predominant ...
2
votes
0
answers
19
views
ServiceStack Ormlite Object column is not populated
Using ServiceStack Ormlite 5.12.0.
I have a model looks like the following, saving the object is perfectly fine.
public string DescriptionAlias { get; set; }
/// <summary>
/// Applying ...
1
vote
1
answer
41
views
Servicestack AutoQuery -> System.TypeLoadException Error
I'm trying to servicify an existing RDBMS with C# AutoQuery, but getting this error:
HResult=0x80131522
Message=Type 'WebApplication1.ServiceModel.CreateCurrency' from assembly 'tmpCrudAssembly, ...
1
vote
1
answer
19
views
ServiceStack: Dto.ToAbsoluteUri throws exception complaining about AppHost
I'm trying to get the AbsoluteUri from a dto object.
As expected, all of these give me the RelativeUri:
dto.ToUrl();
dto.ToGetUrl();
dto.ToRelativeUri("GET");
Naturally I would expect dto....
0
votes
1
answer
35
views
While returning HttpResult I cant see customized Headers in the response using C# and ServiceStack
I am making a simple API and want to return HTTPResult with some custom headers. I am using Postman to trigger the API but in the Response headers are not displayed.
return new HttpResult($"Ping ...
2
votes
1
answer
24
views
ServiceStack AutoQuery AutoFilter Like operand
I am trying to implement SQL Like operator using AutoFilter attribute. Tried the below code,
[AutoFilter(field:"Name", Template = "{Field} like {Value}", ValueFormat = "%{0}%&...
1
vote
1
answer
18
views
ServiceStack async PreRequestFilters
Is there any way to run PreRequestFilters that are async? I can see that there's been a number of async request filters added, but no async version of PreRequestFilters.
It would be nice to have an ...
1
vote
1
answer
23
views
ServiceStack IAuthWithRequest
I’m getting confused about implementing a CustomAuthProvider that extends the IAuthWithRequest interface.
The wish is for this AuthProvider to recover domain credentials and authenticate against a ...
1
vote
1
answer
39
views
ServiceStack Todo Rest Api with Crud operations - How to override Get, Post.. etc methods?
These are my first steps in ServiceStack. I am a total noob.
I created simple Todo Rest Api with MySql Db connection. I am trying to Get all the incoming Todos based on date (greater than or equal ...
1
vote
1
answer
37
views
ServiceStack Authentication with thirdy part token
I’ve to implement authentication for our app. The app will be integrated in a thirdy part system that will send a token to our app.
We were thinking of making a call to the ServiceStack ...
1
vote
1
answer
23
views
ServiceStack HTTP Utils
I’ve to make a post request to a service (not implemented with ServiceStack). From the docs, please correct me if I am wrong, I have to use HTTPUtils nuget package (v. 6.0.2), but if I make a request ...
2
votes
1
answer
20
views
ServiceStack 6 /api path causes error for all services
I have an self-hosted application written originally using ServiceStack 3.x, where I had dozens of APIs with a route starting with /api
Upon licensing ServiceStack 6, all routes starting with /api are ...
2
votes
1
answer
23
views
ServiceStack SOAP support extension
will ServiceStack extends support for SOAP service in .NET 6?
We’ve seen from documentation that SoapFormat plug-in requires .NET Framework
1
vote
1
answer
28
views
ServiceStack Ormlite using Select with NoLock
I have the following simple OrmLite select statement:
SpiderUser lSpiderUser = db.Select<SpiderUser>(
su => su.WindowsUserName == vWindowsUserName).SingleOrDefault();
(The variable 'db' ...
0
votes
1
answer
86
views
ServiceStack metadata page
We are evaluating ServiceStack for a new internal project.
We are using the template https://github.com/NetCoreTemplates/web but when we run the app the app is not redirecting automatically to the ...
1
vote
1
answer
24
views
VS2022 ServiceStack extension
I’ve this problem: I’ve installed the VS2022 ServiceStack extension but no template is selectable when I want to create a new project. From the extensions list I can see the extension installed.
Where ...
0
votes
0
answers
24
views
RedisServerEvents: local.NotifySubscription running in a single thread?
I see that in the OnMessage handler implemented by RedisServerEvents is responsible to notify heartbeats to the long running clients through the Local.NotifySubscription method
https://github.com/...
2
votes
1
answer
19
views
How can I prevent OrmLite from adjusting the case of the fields being returned by a stored procedure into POCO?
I have a column being returned from stored procedure called CV_Filename
public class FileNames
{
public string CV_Filename { get; set; }
}
app.MapGet("/filenames", () =>
{
...
1
vote
1
answer
61
views
How to increase upload file size limit with ServiceStack on ASP.Net Core 5+
I need to upload large files using a ServiceStack Service, hosted on an AspNetCore 5.0 application. Attempting to usethe AspNetMvc attribute doesn't work.
[Route("/api/tehformz", "POST&...
1
vote
1
answer
30
views
Problem with [Authenticate] filter and Validator execute priority
Good Day,
I have validations with session values into a validator, if the session is expired, It has not been detected within the execution of the validator, and this validator responds with an error, ...
1
vote
1
answer
31
views
ServiceStack 6 CredentialsAuthProvider does not return BearerToken
Our shop has been using ServiceStack libraries for several years now without many issues.
Recently, after upgrading from the 5.12 version to the 6.0 version, we are seeing a credential-based ...
1
vote
1
answer
33
views
Empty Object when deserializing ViewPort object with ServiceStack
I'm having an issue since I migrated to the latest version of GoogleApi (by Vivet)
After analyzing I have identified a problem with deserializing the ViewPort object (this object was changed ). This ...
2
votes
1
answer
39
views
ServiceStack IAppSettings was not ready and would result NULL reference exception if used in constructor
It seems like the IAppSettings implementation was not ready from IoC in the constructor.
Before I go into details, I've read similar problems:
ServiceStack doesn't auto-wire and register ...
1
vote
1
answer
281
views
How to fix build error on ASP.NET Core + ServiceStack?
I have a problem when creating a new web service using ServiceStack
I have installed :
X tool
ServiceStack VS Extension
NPM
.NET 6.0 SDK
However If I try to create a new project , this will come up ...
1
vote
1
answer
18
views
Add service from another dll of another solution
We use ServiceStack 5.9.2 and have a ready, running application build with Visual Studio. Is it possible to add additional services to this application which were build in another Visual Studio ...
1
vote
1
answer
46
views
How to start on ServiceStack?
Can you help me point out how should I start on this:
I'm new to API , and I'm currently working on ASP.NET Core 3.1 MVC paired with Microsoft SQL Server. I have requirement that I should use API (...
1
vote
1
answer
42
views
ServiceStack v6 - Route starting with /api produces NotImplementedExceptio
Greetings.
I started a new project with ServiceStack v6. I noticed that when I use routes starting with /api, they will produce a NotImplementedException when called. I believe this is due to the new ...
2
votes
2
answers
33
views
ServiceStack marker Attribute not found in Collection
I have a custom attribute and I want to check via a GlobalFilter, if the methods I'm calling has this marker attribute.
I can't find a way, to get the information that the called method where my ...
0
votes
0
answers
39
views
Service Stack 6 UI
I recently upgraded to ServiceStack 6 and trying to get the API UI to work. I have 2 issues.
After I authenticate (I have custom CredentialsAuthProviderSync) I still get an error that I need to ...
1
vote
1
answer
76
views
Minimum API Key ServiceStack authentication + authorization
I would like to use API key to access secured ServiceStack web service simply as possible:
I do not want to be able to register an user
I do not need user permissions or roles
Custom API key ...
2
votes
1
answer
17
views
WSDL - allow different order of DataMembers for SOAP messages
We use ServiceStack 5.9.2.
DTO:
[DataContract]
[Restrict(Usage.SoapOnly)]
public class GetDocumentations : Documentations
{
}
[DataContract]
[Api("Abfrage auf von ...
2
votes
1
answer
50
views
ServiceStack Admin UI
I'm trying to integrate the /admin-ui functionality in my application, that uses the ServiceStack's built-in ApiKeyAuthProvider, for give the user the possibility to register other users.
In the ...
2
votes
1
answer
22
views
JsonServiceClient not respecting RedirectHttpHandler response
We have a global handler setup for catching a specific type of exception. It is possibly thrown from multiple service endpoints using a base service implementation. We bind the error handlers and try ...
1
vote
1
answer
20
views
ServiceStack - Custom UserAuth/Details
Is it possible to configure a class that implements both IUserAuth and IUserAuthDetail and used it when registering the IAuthRepository?
Actually we use this class doing
new OrmLiteAuthProvider<...
1
vote
1
answer
47
views
ServiceStack - IAuthRepository vs IUserAuthRepository
I’ve to configure my web application to use the ServiceStack built-in ApiKeyAuthProvider. I’ve registered in the container the OrmLiteAuthRepository with the IAuthRepository interface but it throws an ...
1
vote
1
answer
60
views
ServiceStack v6 JWTAuthProvider doesn't return bearer and resfresh tokens
I downloaded the .NET6 project template from ServiceStack web, fiddling around and successfully setup the authentication using CredentialAuthProvider. However when adding the JwtAuthProvider, it won't ...
1
vote
1
answer
25
views
ServiceStack ORMLite JSON Deserialization multiple levels
I've got a class containing a Dictionary like this:
Dictionary<string,object> Data
I put data on multiple levels into here, such as:
Data.Add("simple",4);
Data.Add("object",...
0
votes
1
answer
34
views
servicestack and ormlite database auto generation
In servicestack and ormlite
How do you auto generate database and seed it the first time it is accessed when using code first approach and you have a valid connection to the database server.
1
vote
1
answer
70
views
Servicestack redirect to metadata
i've the following problem: i've a web service application that uses ServiceStack. I'd like to register as base path "/api", but even if I set DefaultRedirectPath to "/api/metadata"...
1
vote
1
answer
31
views
Multiple errors in ServiceStack Angular client
We just started getting these errors when building our Angular project
Error: node_modules/@servicestack/client/dist/index.d.ts:484:20 - error TS1005: ';' expected.
484 get completed(): boolean;
...
0
votes
1
answer
17
views
ServiceStack.JsonServiceClient.HttpLog is not populating
I'm having trouble enabling logging for a ServiceStack.JsonServiceClient. I'm working from the documentation Capture HTTP Headers in .NET Service Clients but I must be missing something becasue I'm ...
2
votes
1
answer
28
views
ServiceStack JsonServiceClient Requests not consistent
I've created a ServiceStack.JsonServiceClient to consume 3rd party API.
I'm using the Get(IReturn<MyType>) method.
My Request object looks like this:
public class MyRequest : Base, IReturn<...
-3
votes
1
answer
30
views
When is usefull use ServiceStack?
i'm new to ServiceStack, so forgive me.
i'd like to know when is usefull use ServiceStack.
For example, if i've to create a console app that not exposes services, creating an appHost is not right, do ...
1
vote
1
answer
20
views
ServiceStack's JsConfig.TextCase no long honored in v6.0
We have existing code that worked as desired in ServiceStack v5.13.2, but had unexpected breaking behavior after upgrading to v6.0.0.
Here is our service implementation:
public async Task<object>...
1
vote
1
answer
15
views
Extension method .ToJsv() from ServiceStack.Text ignores null values in collections
My test class:
public class TestA
{
public IEnumerable<string> Collection { get; set; }
}
When I call extension method .ToJsv() from ServiceStack.Text on TestA object with property ...
1
vote
1
answer
65
views
System.TypeLoadException: Method 'WriteFileAsync' in type 'ServiceStack.IO.MemoryVirtualFiles'
Getting this error on App startup when Azure DevOps builds my project. App works fine in Visual Studio.
Unhandled exception. System.TypeLoadException: Method 'WriteFileAsync' in type 'ServiceStack....