How to access IWebHostEnvironment in class library .NET?
I'm using ASP.NET Core I want to access in classlib but when I try to install in nuget I get this warning: > A PackageReference to Microsoft.AspNetCore.App is not necessary when targeting .NET Core 3....
- Modified
- 6 May at 20:26
The LINQ expression could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation
I have C# application (.NET Core 3.1) and I have written the following LINQ expression. ``` public ActionResult<bool> GetItems(string title) { var items = _service.All.GetItems().OrderByDescendin...
- Modified
- 11 Aug at 07:22
Visual studio 2019 “Unable to connect to web server 'IIS Express'”
I attempt to lunch my ASP.NET Core project in Microsoft Visual Studio 2019 and got this error: "'" - -
- Modified
- 7 Aug at 17:57
How to register ServiceBusClient for dependency injection?
I’m trying to register `ServiceBusClient` from the new package for dependency injection as recommended in this [article](https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-perf...
- Modified
- 7 Aug at 01:48
Background service in ServiceStack
I've got an application w. AppHost (inside `Startup.cs`) and also a `Configure.Db.cs` file. I want to run a background service (Timer based) to routinely do some things, in addition to serving service...
- Modified
- 5 Aug at 14:10
System.NotSupportedException: Character set 'utf8mb3' is not supported by .Net Framework
I am trying to run a server with a MySQL Database, however I keep getting this huge error and I am not sure why. ``` [21:15:49,107] Server Properties Lookup: Error While Initialization DOL.Database.Da...
ServiceStack Grpc - Generate proto file without invoking types/proto endpoint
I have a .Net Core 3.1 Grpc application created using framework. ServiceStack provides a way to auto-generate .proto files through [/types/proto](https://github.com/ServiceStack/ServiceStack/blob/mas...
- Modified
- 3 Aug at 06:49
ServiceStack: container.AutoWire(this) gives a NullReferenceException
If I in my AppHostBase descendant (web api project ) use `container.AutoWire(this)`, it will result in a `NullReferenceException` in the ServiceStack code, if I am using a web project, thus starting i...
- Modified
- 2 Aug at 10:2
The referenced project is a non self-contained executable. A non self-contained executable cannot be referenced by a self-contained executable
I'm having an issue regarding trying to compile my .netcore3.1 after updated the SDK to .NET 6.0 preview while debugging through Visual Studio. My CSProject is bellow : ``` <Project Sdk="Microsoft.NET...
android:exported needs to be explicitly specified for <activity>. Apps targeting Android 12 and higher are required to specify
After upgrading to android 12, the application is not compiling. It shows > "Manifest merger failed with multiple errors, see logs" Error showing in Merged manifest: > Merging Errors: Error: android:e...
- Modified
- 28 Jul at 09:12
Which Canoe version be compatible with soln provided for REDIS client implementation in the link https://github.com/ServiceStack/ServiceStack.Redis
I have imported the implementation of REDIS client from the link [https://github.com/ServiceStack/ServiceStack.Redis](https://github.com/ServiceStack/ServiceStack.Redis). This is an implementation in ...
- Modified
- 28 Jul at 08:12
Query parameters without value for boolean
Is there any way to make a query parameter without a value TRUE for a boolean in ServiceStack? Example: DTO has a field: `public bool IncludeOld { get; set; }` Query parameter to set TRUE: `...?includ...
- Modified
- 26 Jul at 10:6
How to perform logging in ConfigureServices method of Startup.cs in ASP.NET Core 5.0
Constructor injection of a logger into `Startup` works in earlier versions of ASP.NET Core because a separate DI container is created for the Web Host. As of now only one container is created for Gene...
- Modified
- 26 Jul at 07:53
"Token has expired" doesn't trigger 401 error code
I am using the uncaught exception handler: ``` this.UncaughtExceptionHandlers.Add((req, res, operationName, ex) => { res.WriteErrorBody(ex); Log.Error(ex); res.EndRequest(skipHeaders: true...
- Modified
- 25 Jul at 17:38
Migrating .net framework to .netcore 3.1 (Servicestack.Razor Views)
I'm migrating a .net framework web to .netcore Having issues with moving the 'Views' folder. It seems that every razor page with `@inherits ViewPage<TModel>` I get an error `"The type or namespace 'Vi...
- Modified
- 23 Jul at 17:50
Error: Each parameter in constructor must bind to an object property or field on deserialization
i'm trying to send data to save it in my db, basic, so i send a model to my controller, and i get this error: "Each parameter in constructor 'Void .ctor(SmgApi.Models.Entity.EquipmentEntity)' on type ...
How to inject IHttpClientFactory in Container servicestack.net?
I'm working on a solution that interacts with Redis, using the servicestack.net library. I have a class that inherits from ServiceStack.AppHostBase and asks me for an override of the Configure method....
- Modified
- 21 Jul at 15:19
Servicestack orm lite does not deserialize neasted json structures
I have a pgsql view which returns list of records. One field of record is represented as json and deserialised to property `List<ClassA> ClassAItems`. However `ClassAItems` has also `List<ClassB> Clas...
- Modified
- 19 Jul at 21:22
C# OrmLite v5.11.0 SqliteOrmLiteDialectProvider class throwing a compiler error
I'm trying to write a Sqlite in-memory database in C# using `ServiceStack.OrmLite` version 5.11.0 [based on the follow article from 2016](https://mikhail.io/2016/02/unit-testing-dapper-repositories/) ...
- Modified
- 17 Jul at 22:25
Token cache serialization in MSAL.NET is not working
I am facing some issues when trying to serialize the tokencache, returned from authenticating with MSAL. I would appreciate any help, since i don't really understand what i am doing wrong. Here is our...
- Modified
- 15 Jul at 13:44
Download File from Server with Blazor App
I have created an `HttpGet` in my Server-API which creates a CSV-File and returns it with `FileStreamResult`: ``` [HttpGet] public IActionResult Get() { // do logic to create csv in memoryStream ...
- Modified
- 15 Jul at 16:11
How to run .NET Core Console app using generic host builder
I am trying to figure out how to use hostbuilder pattern to run a console app (not a windows service). Intent is to keep the flow as similar to a WebApi to keep development practices similar. I have s...
- Modified
- 4 Oct at 15:42
Android Studio error "Installed Build Tools revision 31.0.0 is corrupted"
I'm on Android Studio 4.2.2. I created a new project and haven't added anything to the starter code and whenever I click , I get this error: > Installed Build Tools revision 31.0.0 is corrupted. Remov...
- Modified
- 15 Aug at 21:6
servicestack sql server keyword not supported ormlite
I'm using servicestack in an api c# project and have referenced the - - nuget packages. I can connect to sql server as expected. We are now trying to implement Always Encrypted colums in some of our ...
- Modified
- 14 Jul at 10:40
Is there a way to declare Routes somewhere else than above Request DTOs?
I am new to ServiceStack and I have been tasked with optimizing/cleaning up our current setup with ServiceStack. We have a relatively extensive website built (meaning 60+ endpoint locations), and I wa...
- Modified
- 19 Jul at 18:39