Change Timeout For ServiceStack GetJsonFromUrl?

Is it possible to set the timeout for the GetJsonFromUrl helper method? Or should I just switch to JsonServiceClient if I need something other than the default 30 second timeout?

17 Oct at 17:27

OpenFileDialog on .NET Core

On .NET Framework you can use `System.Windows.Forms.OpenFileDialog` for open files with the native Windows UI but that only works on Windows. There is a `System.Windows.Forms.OpenFileDialog` imple...

30 Apr at 13:23

Does Stopwatch have a maximum time it can run?

How long can the `Stopwatch` in .NET run? Does it wrap to negative or restart at 0 if it gets to that limit?

17 Oct at 16:1

Return HTML from ASP.NET Web API ASP.NET Core 2 and get http status 406

This is a follow-up on [Return HTML from ASP.NET Web API](https://stackoverflow.com/questions/26822277/return-html-from-asp-net-web-api). I followed the instructions but I get Error 406 in the browser...

20 Jun at 09:12

Installing a .NetStandard 2.0 Nuget package into a VS2015 Net 4.6.1 project

I'm trying to install a Nuget package that targets .NetStandard 2.0 (Microsoft.Extensions.Logging.Abstractions) into a Net 4.6.1 project in Visual Studio 2015. However, while Frameworks should be comp...

17 Oct at 10:48

How and where to use ::ng-deep?

How and where can one use `::ng-deep` in Angular 4? Actually I want to overwrite some of the CSS properties of the child components from the parent components. Moreover is it supported on IE11?

29 Dec at 03:7

Laravel Composer sees wrong PHP Version

I'm trying to install an older Laravel Project. When I run composer install I get the following error ``` This package requires php >=5.6.4 but your PHP version (5.5.35) does not satisfy that requir...

17 Oct at 08:41

Should I add async/await to a single-line function or not?

Should I add async/await to a single-line function like: ``` public async Task<T> GetFoo() { return await HandleAsync<T>(....); } ``` Or is this unneeded overhead if the parameter does not need...

17 Oct at 08:23

Migrated web service to .NET Core 2.0 and returning json

I have migrated my web service to .NET Core 2.0, it works fine but I have problem with getting response as json string. Method on api: ``` [HttpGet] [ProducesResponseType(typeof(string), 200)] ...

17 Oct at 08:20

How to know which typescript version running on angular 4 project

So i did `ng -v` it shows me everything except typescript, so how can i check Typescript version of my angular 4 project.

17 Oct at 06:38

Should the links on ServiceStack metadata page be encoded?

A scanner tool we use is reporting a security concern. It monitored the response from `GET /metadata` within `ServiceStack.Metadata.IndexOperationsControl.Render()` and reported a response without val...

17 Oct at 01:12

How to display hidden files with Visual Studio Code

The "open file" dialog in [Visual Studio Code](https://en.wikipedia.org/wiki/Visual_Studio_Code) is not showing hidden files. For example, when looking at my home directory, none of the `.` files are ...

31 Jul at 20:36

ASP.NET Core docker build error

I'm new to ASP.NET Core and docker. I've created a simple ASP.NET Core 2.0 app and try to use docker with it on Windows. However, I get this error: `Your Docker server host is configured for 'Linux'...

WCF much slower than WebAPI running same code

I currently have 2 exposed endpoints. The first is WebAPI (.NET 4.6). The second is WCF (.NET 3.5). They are both capable of performing the same calculation, however the WCF is on average 10 times slo...

25 Oct at 21:49

DateTime formats used in InvariantCulture

I have to pre-validate in Javascript a string that will be a DateTime in c#. The DateTime parse uses InvariantCulture. Does anyone know the DateTime formats defined for InvariantCulture?

16 Oct at 19:58

C# Fields Capitalization Convention

My textbook (Visual C# How to Program, 6/e) states that fields in C# should use camelCase. This corresponds with examples given in Microsoft C# Guide: [https://learn.microsoft.com/en-us/dotnet/csharp/...

16 Oct at 19:14

Disable click outside of angular material dialog area to close the dialog (With Angular Version 4.0+)

I am currently working on password reset page of an Angular 4 project. We are using Angular Material to create the dialog, however, when the client clicks out of the dialog, it will close automaticall...

How pass objects from one page to another on ASP.Net Core with razor pages?

I'm developing a web application using Asp.net core 2.0 with razor pages. I'm creating an object with some data and want to send that object to another page. Actually I'm doing this: ``` var customO...

16 Oct at 14:23

Angular: Cannot Get /

I am trying to open, build and run someone else's Angular 4 project but I am not able to view the project when I run it my way. I don't see what is going wrong or what I should do now. I already had e...

How to fake declared services in Startup.cs during testing?

I would like to write integration tests for my Asp .net core application, but I don't want my tests to use real implemetation of some services. ``` public class Startup { public void ConfigureSer...

26 Oct at 12:19

Styling mat-select in Angular Material

How to style mat-select's panel component. From the docs I get that I need to provide panelClass so I make it like this: ``` <mat-form-field> <mat-select placeholder="Search for" [(ngModel)]="...

React-Redux: Actions must be plain objects. Use custom middleware for async actions

> Unhandled Rejection (Error): Actions must be plain objects. Use custom middleware for async actions. I wanted to add comments with every posts. So when fetch posts are run I want to call fetch comm...

15 Sep at 14:29

Swagger - Web API - Optional query parameters

``` [HttpGet] [Route("students")] [SwaggerOperation(Tags = new[] { "Student" })] [SwaggerResponse(HttpStatusCode.OK, Type = typeof(ResponseModel<IList<Student>>))] [SwaggerResponseExample(HttpStatusCo...

Repeated Tasks using Timer Interval vs Task Delay

I'm implementing a scheduled job like methods and have narrowed down to approaches. One that implements a Timer Interval and the other based on Task Delay. I've also considered using Azure Timer tri...

16 Oct at 05:58

InvalidOperationException: Cannot create a DbSet for 'Role' because this type is not included in the model for the context

The following solution works in .net core 1.1, but after upgrading from 1.1 to 2.0, I received the following error: > InvalidOperationException: Cannot create a DbSet for 'Role' because this type is ...