C# 7.0 Value Tuple compile error?
When I am trying to compile the following code: ``` var post = iPostService.GetAll().Select(x => (x.Title, x.Author)); ``` I get the compiler error: 'An expression tree may not contain a tuple lite...
- Modified
- 7 Jan at 14:39
Multiple value with same key in Route
Do I have this possibility to have multiple value in query string and map it into a property? same as example at below: GET [http://site/api/v1/test?Id=10&Id=11&Id=12](http://site/api/v1/test?Id=10&...
- Modified
- 7 Jan at 11:11
How can I change the Python version in Visual Studio Code?
These are my settings: 1. User Settings { "atomKeymap.promptV3Features": true, "editor.multiCursorModifier": "ctrlCmd", "editor.formatOnPaste": true, "python.pythonPath": "python3", ...
- Modified
- 1 Jul at 01:48
If CancellationToken is a struct and is passed by Value, how is it updated?
I see that CancellationToken is a struct [https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=netframework-4.7.1](https://learn.microsoft.com/en-us/dotnet/api/system.t...
- Modified
- 7 Jan at 07:34
How to get the authentication header from a request sent to an ASP.NET core 2.0 API controller action
I am working on an ASP.NET Core 2.0 RESTful API. I have a scenario where I need to use an HTTPGet method to call an action on my API controller and I need to extract a username and password value that...
- Modified
- 4 Feb at 12:25
When would == be overridden in a different way to .equals?
I understand the difference between == and .equals. There are plenty of other questions on here that explain the difference in detail e.g. this one: [What is the difference between .Equals and ==](ht...
.NET Core External Authentication without ASP.NET Identity
I use my own JWT token authentication and not the asp.net identity that comes free with the default template. I've looked everywhere for some documentation/guidence on how to implement exernal authent...
- Modified
- 5 Jan at 20:7
Add icon to existing menu command in Visual Studio 2017
: this is about using Visual Studio and its GUI. It is about a VS extension. Context: I like to have toolbar buttons to sort and remove `using` directives in `.cs` files. In VS 2015 there were two ...
- Modified
- 8 May at 16:2
Static Class vs Protected Constructor
I Am getting a warning message in my class, like [](https://i.stack.imgur.com/uXCBm.jpg) > `Protected``static` ## Solution The error is gone after I tried both the below ways, ## static class with...
- Modified
- 15 Sep at 13:51
ASP.NET Core Authorize AD Groups through web.config
In my old .NET MVC app, I could enable Windows Authentication in IIS and disable anonymous. Then in my `web.config` file I just had to put in this: ``` <authorization> <allow roles="Domain\MyADGro...
- Modified
- 30 Apr at 12:11
Relationship on owned type
I want to define a one to many relationship on an owned type. Here in my example, - InboundRequest: principal entity- RequestHistory: owned type- RequestHistoryEntry : Dependency entity ``` publi...
- Modified
- 5 Jan at 10:40
ExecutionTimer.cs not found when stepping into code
I am writing some tests using XUnit framework and have to use some external code referenced through a dll. When I try to step into the method call, `helper.GetEntity()`, I get the following window and...
Visual Studio shows 'Configure settings to improve performance' notification for ReSharper
I am using Visual Studio Professional 2017 15.5.2 along with Resharper 2017.3.1. Every time I open VS, it throws notification > Configure settings to improve performance. I tried ignoring this messa...
- Modified
- 5 Jan at 08:3
Why can't I use 'as' with generic type parameter that is constrained to be an interface?
In the example below (only for demo purpose), if `T` is not constrained with class, then this conversion: ``` var ret = objectA as T; ``` ..will cause the following compile error: > The type para...
- Modified
- 5 Jan at 07:46
What are the benefits of C# async/await in a serverless context?
For microservice functions that simply call an external service or write to a data store, is there any point to using in C#? We're writing a fair number of these in AWS Lambdas, and it's hard to det...
- Modified
- 5 Jan at 15:25
Project builds but can't publish
I have an MVC project that for an uknown reason refuses to publish to a local folder in the PC. The log says the following: ``` 3>------ Publish started: Project: Admin, Configuration: Release Any C...
- Modified
- 4 Jan at 20:23
Angular2 displaying http get response in component
I am building my first angular2 app and this is my very first service call. I am using service stack API. the GET call returns a IEnumerable This call is working by itself, when plugged into my angul...
- Modified
- 4 Jan at 15:50
CA1001 implement IDisposable on async method
Consider following code: ``` public class Test { public async Task Do() { await Task.Delay(200); using (var disposable = new Disposable()) { disposable.Do...
- Modified
- 4 Jan at 12:41
Servicestack.Text ConvertTo<> tomap properties with different names or any other solution for this?
Consider I have these classes in my Api model, because other actions may need customerData with different attributes I hide base properties like this: ``` public class CustomerData { public strin...
- Modified
- 4 Jan at 11:40
How can I change my email adress for our ServiceStack account?
How can I change my email address for our ServiceStack account? The currently registered email address is no longer in use.
- Modified
- 4 Jan at 06:52
POCO object array inside AppSettings.json in ASP.NET Core
This seems like it should be really simple, I have been searching SO and a lot of other places for an answer to this, everything I have found and tried does not work. I have an appsettings.json file ...
- Modified
- 3 Jan at 18:17
Multiple types [FromBody] on same method .net core web api
I have a controller with one POST method, which will receive an xml string which can be of 2 types. Eg: I would like to be able to bind to multiple types on the same route ([HttpPost("postObj")]) So t...
- Modified
- 22 May at 04:22
Explain 2 pairs of parentheses in expression.Compile()()
Could you please explain what this strange code does? ``` expression.Compile()(); ``` Why are there 2 pairs of parentheses here? I didn't find anything in google. The full method is ``` public Val...
- Modified
- 3 Jan at 14:51
How to use PEM certificate in Kestrel directly?
I want to use HTTPS in my ASP.Net Core 2.0 (with Kestrel web server) application. [The official documentation](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel?tabs=aspnetc...
- Modified
- 3 Jan at 13:6