How to use predefined routes in ServiceStack with URI instead of query string?

Is it possible (if yes, how) in ServiceStack to use predefined routes with parameters in the URI? I can do one or the other but combining both does not seem to work: ``` [Route("/hello/{Name}")] //...

30 May at 08:53

Can aggregate root reference another root?

I'm a little bit confused. I just watched Julie Lerman's Pluralsight video on DDD and here's the confusion I have: Having a simple online store example with: with for , what's the aggregate root her...

Ambiguous reference intellisense error from Resource.Designer.cs

I am running into a peculiar bug when developing on Visual Studio 2017 that I have been able to ignore for a while, but is now beginning to really me. I refer to this issue as a rather than an be...

JWT SecurityTokenInvalidSignatureException using RS256 PII is hidden

I'm having trouble validating a JWT token signed with RS256 using Microsoft's System.IdentityModel.Tokens.Jwt library. This token validates just fine on [JWT.io](https://jwt.io/). This is the error: >...

21 Jan at 16:52

Get userId from JWT on all Controller methods?

I am creating a Core 2.0 Web API project that uses JWT for authentication and authorization. My controller methods that I want to secure are all decorated with the `Authorize` attribute. This is work...

29 May at 08:56

How to rename file/directory (not Blob file) in Azure Storage (not Blob storage)?

I thought that this would be very easy job to do, but as I have researched, I found nothing on how to rename a file or directory in Azure Storage. I don't want to do a copy/delete (the size of files/...

26 Jun at 18:40

What is the replacement for hasRequired with EF core?

With Entity Framework we had `HasRequired` on a field. What is the alternative replacement for that with EF core? [https://msdn.microsoft.com/en-us/library/jj591620(v=vs.113).aspx](https://msdn.micros...

1 Mar at 04:12

Is there a way to build a DataTemplate with only C#

Is there a way to build a DataTemplate without using the [deprecated](http://www.dictionary.com/browse/deprecated) `FrameworkElementFactory` or the `XamlReader.Load` method of string interpretation t...

29 May at 13:42

Timespan type cannot be mapped correctly when using Servicestack CsvSerializer

I am trying to convert list of objects to comma seperated string through SerializeToCsv method of Servicestack. However, i realized that timespan cannot be converted correctly. Forexample, my timespan...

Create partial login cookie for External Authentication

Recently I've implemented 2FA for my WebAPI using IdentityServer3. Everything works as expected if the login is made locally (using the `IUserService`). Now, I want to be able to do this login by issu...

Bot Framework messes up dialog state

I'm currently making a chatbot with Microsoft's Bot Framework. In my flow I have a final dialog that lets the user know, that they are participating in the competition. There is also an error-handling...

30 May at 14:43

User is authenticated but where is the access token?

I have a web Application which authenticates a user to an Identity Server 4, using an implicit client. I need the access token for this user so that I can make a call to another API. To be clear: ...

28 May at 13:5

asp.net core A second operation started on this context before a previous operation completed

I have an ASP.Net Core 2 Web application. I'm trying to create a custom routing Middleware, so I can get the routes from a database. In `ConfigureServices()` I have: ``` services.AddDbContext<DbContex...

Creating a Scriptable Object in the Unity Editor

So apparently i suck at listening at my university, because i can't figure this out, not even with google... How do you create a scriptable object in the editor? I have the project open, it looks like...

28 May at 10:44

Reading appsettings.json from .net standard library

i have started a new RESTful project using .NET Core Framework. I divided my solution in two parts: Framework (set of .NET standard libraries) and Web (RESTful project). With Framework folder i prov...

Multiple Dtos for same entity

Is it a good practice to use multiple DTO's for same entity in different API endpoints. For example: I have a api endpoint which accpets the following Dto: ``` public class AddressDto { public st...

18 Nov at 14:19

How to run dotnet core app from command line?

I created a CLI tool using dotnet core framwork and I want to run it form the console as: I run it now by going to the location where the dll file is by uing: Can anyone help me install my application...

28 Aug at 09:19

How to connect to a MySQL Database without SSL

I'm trying to connect to a local MySQL DB. I have this connector: ``` using(MySqlConnection conn = new MySqlConnection("Database=Studentenverwaltung;Port=3306;Data Source=127.0.0.1;User Id=root;Pas...

23 Jan at 10:36

OpenIdConnectProtocolValidationContext.Nonce was null

HI can someone please help imgetting below error when calling outlook rest api IDX21323: RequireNonce is '[PII is hidden by default. Set the 'ShowPII' flag in IdentityModelEventSource.cs to true to r...

25 May at 21:41

Programmatically turn on/off Action Center

Is there a way to programmatically turn on/off the Action Center? Additionally, I'd like to know if there is a way to programmatically turn on/off specific notifications? In manufacturing we use a b...

25 May at 14:23

Aggregate $lookup with C#

I have the following MongoDb query working: ``` db.Entity.aggregate( [ { "$match":{"Id": "12345"} }, { "$lookup": { "from": "OtherC...

EF Core Migrations with multiple DbContexts on single database

I have an issue attempting to use Migrations in a ASP.NET Core solution using EF Core where there are multiple `DbContext` that share the same SQL database. In my application startup method I'm getti...

How to mock rows in a Excel VSTO plugin?

I am trying to put a mocked `Range` (which contains cells with values) inside the rows of a new `Range`. But when I try to access a specific element from the `Range`, a exception is thrown. I've trie...

1 Jun at 22:12

Issue Moq'ing HttpResponseMessage

I have the following Method: ``` public async Task<SecurityRoleDeleteResult> DeleteSecurityRoleByRoleId(int securityRoleId) { string url = $"{_housingDataSecurityConfiguration.HousingDataSecurity...

25 May at 09:45

How to register two implementations then get one in .Net Core dependency injection

I have parts of my code which depend on more than one implementation of the same interface, and other parts which depend on one of the implementations. I am registering implementations like: ``` ser...

29 May at 10:14