How to setup ServiceStack xUnit tests for a few services at once?
how do you guys test a few services at once using ServiceStack and xUnit? I have TestSetup that works all right and I inherit it by test classes like this: ``` public class TestSetup : IDisposable { ...
- Modified
- 17 Sep at 08:36
Core 2.1 refuses to respond with Access-Control-Expose-Headers: *
I must be doing something wrong here but I can't figure it out; it seems to be a CORS issue from what I can tell. I need to expose `Access-Control-Expose-Headers: *` to any origin but dotnet core 2.1 ...
- Modified
- 21 Apr at 09:9
UWP ListView/GridView DragItems results to Catastrophic Failure
We are developing an UWP App that needs the ability to drag items from one GridView to another. While testing this functionality we encountered multiple catastrophic failures 0x80000FFFF. ![Screensh...
- Modified
- 17 Sep at 17:19
VSCode: The term 'python' is not recognized...but py works
I just installed python on VS Code and I can't run any python code using `python` command. ## python command: Running the code seems to run `python` command by default and it does not recognize it....
- Modified
- 4 Oct at 14:7
Dynamically created class to cs file?
I am creating a complex class with AssemblyBuilder that Im later creating objects from. There is however uncertainties in how this class is really contructed. So is there any way to write this dynami...
- Modified
- 14 Sep at 13:55
How to inject dependency to static class
In my application I regularly want to write log messages to disk. I created a simple logger class and it's constructed using Dependency Injection, as follows: ``` var logger = new LogService(new FileL...
- Modified
- 31 Jul at 10:10
React — Passing props with styled-components
I just read in the `styled-components` [documentation](https://www.styled-components.com/docs/basics#passed-props) that the following is wrong and it will affect render times. If that is the case, how...
- Modified
- 13 Sep at 20:42
Conditional validation in MVC.NET Core (RequiredIf)
I am trying to conditionally validate the field within the MVC.NET Core. I have two radio buttons. If I select Yes (for the Ownership) I want to make a field below required (Activity dropdown) Howeve...
- Modified
- 14 Sep at 07:0
Initialize elements with brackets like Lists in c#
I was thinking about arrays and lists and wondering if and how classes can get an implementation to be initializable like them. Let's take this class as basis: What I would like to be able to do is to...
- Modified
- 5 May at 14:59
How to force ServiceStack to serialize an object
I am declaring my reponse-dto like this: ``` [Route("/activity/sync", HttpVerb.Get)] public class SyncActivityRequest : IReturn<SyncActivityResponse> { public ICollection<SyncParam> ObjectsToSync...
- Modified
- 13 Sep at 12:16
More than one DbContext was found
I am implementing a code first database using AspCore 2. I have a "DataContext.cs" that goes like this: ``` public class ApplicationUser : IdentityUser { public string FirstName { get; set; } ...
- Modified
- 28 Aug at 22:21
ServiceStack.Redis Unable to Connect: sPort: 0, when deploying at IIS in a Windows Server
I'm building .Net Core application Backend that is published in a Windows server with IIS. In this scenario a user can create a session and receive messages to it. The session and the messages are sto...
- Modified
- 13 Sep at 09:5
Redirect to URL in ASP.NET Core
I need some help. I have been working on a way to load a page from within the "program.cs" file created by VS 2017 and ASP.NET Razor, but I cannot work out how this is done. I have looked on the web t...
- Modified
- 22 Nov at 16:36
.NET Core - Hook incoming request with a Request-Id to outbound HTTP requests
We are looking a way to HOOK a `Request-Id` (or a `Correlation-Id`) across multiple API requests as shown figure below: [](https://i.stack.imgur.com/9huBl.png) The idea is to a have one single id to...
- Modified
- 13 Sep at 04:56
ServiceStack with IdentityServer4 intergration
I couldn't find answers about using both frameworks working together. We are planning to build an identity provider service (like Google Account) which is used to authenticate a user and provide Ope...
- Modified
- 13 Sep at 02:26
What is the difference between partial tag helper and HTML helper in asp.net core?
What is the difference between `partial` tag helper implemented in .net core 2.1: ``` <partial name="_AuthorPartial" /> ``` and ``` @await Html.PartialAsync("_AuthorPartial") ``` Which one shoul...
- Modified
- 13 Sep at 08:35
How to create or use ready Shims for porting from .net framework to .net core / standard?
How to create or use ready for `.net framework 4.6.1` elements to port them (from `.net framework 4.6.1`) to `.net core 2.0` / `.net standard 2.0`? --- , it would be nice to have shims for class...
Getting TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode
I have the following jQuery code: ``` $(document).ready(function() { $('.btn-create-post-card').on('click', function(event) { event.preventDefault(); let form_data = new FormData(), f...
- Modified
- 10 Nov at 20:44
PowerShell - Get Version from .csproj file
I'm learning PowerShell. Right now, I'm trying to get the `Version` element value from a .csproj file. The .csproj file's XML looks like this: ``` <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup>...
- Modified
- 12 Sep at 14:1
Using .NET 4.x in Unity on a Mac
How can you use .NET 4.x on a and use VSCode as the editor! I have those settings set in unity: [](https://i.stack.imgur.com/NIzcx.png) In VScode I get the following error: `The reference assembl...
- Modified
- 19 Sep at 06:47
How can I accept all current changes in VSCode at once?
I tried to merge one file with another file, but there are many HEADs with Accept Current Change | Accept Incoming Change | ... Is there a way to accept all current changes at once?
- Modified
- 3 Aug at 20:31
InvalidOperationException: No authenticationScheme was specified, and there was no DefaultChallengeScheme found
We have a Net Core 2.1 API project. We use the request headers to retrieve API key which we check against our database to see if it matches one of the expected keys. If it does then we allow the reque...
- Modified
- 12 Sep at 04:33
Using ServiceStack with Full .NET Framework
I am getting some strange dependency errors with ServiceStack when targeting the full .NET Framework like so, csproj file: ``` <Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> <TargetFram...
- Modified
- 11 Sep at 22:40
How can I use Activator.CreateInstance to create a List<T> where T is unknown at runtime?
I'm using `Activator.CreateInstance` to create objects by a type variable (unknown during run time): static dynamic CreateFoo( Type t ) => Activator.CreateInstance( t ); Obviously, I do not yet pro...
- Modified
- 5 May at 18:40