Interacting with WMI via .NET core
I need to get information about system such as: motherboard info, hdd info, e.t.c. in OS Windows. I can get it from wmi service. But I need to gather it with .NET core application. I know in .NET a...
- Modified
- 26 Dec at 11:33
NuGet: where is AForge.Video.FFMPEG
Good day. I want to use `AForge.Video.FFMPEG` in my project. So, i try to find it on the NuGet. But i'm not found it here. So, here it exists: https://code.google.com/archive/p/aforge/downloads But, i...
ASP.NET Core Get Json Array using IConfiguration
In appsettings.json ``` { "MyArray": [ "str1", "str2", "str3" ] } ``` --- In Startup.cs ``` public void ConfigureServices(IServiceCollection services) { ...
- Modified
- 27 Dec at 01:7
"ssl module in Python is not available" when installing package with pip3
I've install Python 3.4 and Python 3.6 on my local machine successfully, but am unable to install packages with `pip3`. When I execute `pip3 install <package>`, I get the following error: ``` pip...
Error: No matching constructor found on type
I have a WPF application where I am using multiple forms. There is one main form which gets opened when we start the application which is know as `MainWindow.xaml`. This form then have multiple forms ...
Does .NET Task.Result block(synchronously) a thread
Does Task.Result block current thread such that it cannot be used to perform other operations while it is waiting for the task complete? For example, if I call Task.Result in a ASP.NET execution pa...
- Modified
- 26 Dec at 06:29
Uncaught ReferenceError: <function> is not defined at HTMLButtonElement.onclick
I have created my problem on JSFiddle at [https://jsfiddle.net/kgw0x2ng/5/](https://jsfiddle.net/kgw0x2ng/5/). The code is as follows ``` <div class="loading">Loading…</div> <button type="s...
- Modified
- 26 Dec at 04:56
VS 2017 RC generating an 0x8000ffff error when trying to debug xUnit tests
I'm trying to debug my .NET Core xUnit tests in VS 2017 RC. I run my tests via the Test Explorer window. While right-clicking a test and selecting works fine, selecting does not: [](https://i.stack...
- Modified
- 25 Dec at 20:51
Rebuild Docker container on file changes
For running an ASP.NET Core application, I generated a dockerfile which build the application and copys the source code in the container, which is fetched by Git using Jenkins. So in my workspace, I d...
- Modified
- 25 Dec at 15:54
C# Post Increment
While I am testing post increment operator in a simple console application, I realized that I did not understand full concept. It seems weird to me: ``` int i = 0; bool b = i++ == i; Console.WriteLin...
- Modified
- 25 Dec at 10:57
ssh connection refused on Raspberry Pi
I realize this question has already been asked in some different ways, however it doesn't seem like any of the ways I've come across have worked to fix this problem, so here it goes: I'm trying to co...
- Modified
- 25 Dec at 05:9
Mongodb: failed to connect to server on first connect
I get the following error: ``` Warning { MongoError: failed to connect to server [mongodb:27017] on first connect at Pool.<anonymous> (/Users/michaelks/Desktop/users/node_modules/mongodb-core/lib...
Check if user is logged in with Token Based Authentication in ASP.NET Core
I managed to implement this token based authentication system in my application, but I have a little question. How can I check if a user is signed it (eg if the there is a valid token in the request) ...
- Modified
- 24 Dec at 18:31
How to trigger (NOT avoid!) an HttpClient deadlock
There are a number of questions on SO about how to deadlocks in async code (for example, `HttpClient` methods) being called from sync code, like [this](https://stackoverflow.com/questions/10343632/ht...
- Modified
- 3 May at 13:1
Docker not hosting anything on the port it says it is, what's going on?
I am working through [this blog post](http://www.hanselman.com/blog/ExploringServiceStacksSimpleAndFastWebServicesOnNETCore.aspx) which explains how to host a sample ServiceStack app on .net core via ...
- Modified
- 23 Dec at 18:53
How to generate password_hash for RabbitMQ Management HTTP API
The beloved [RabbitMQ Management Plugin](https://www.rabbitmq.com/management.html) has a [HTTP API](https://raw.githack.com/rabbitmq/rabbitmq-management/rabbitmq_v3_6_6/priv/www/api/index.html) to man...
- Modified
- 23 May at 12:17
ToListAsync in ASP.NET MVC Core and Entity Framework not working
I have the following code in ASP.NET MVC Core and Entity Framework and I get the following error when I do a `ToListAsync`. > Additional information: The source IQueryable doesn't implement IDbAsyn...
- Modified
- 23 Dec at 18:28
Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding
When I run my code I get the following exception: > An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dllAdditional information: Execution Timeout Expired. T...
- Modified
- 20 Jun at 09:12
How do I add validation to the form in my React component?
My Contact page form is as follows, ``` <form name="contactform" onSubmit={this.contactSubmit.bind(this)}> <div className="col-md-6"> <fieldset> <input ref="name" type="text" size="30" pl...
- Modified
- 2 Apr at 07:4
Why can't I assign to an lambda-syntax read-only property in the constructor?
My case: ``` public class A { public string _prop { get; } public A(string prop) { _prop = prop; // allowed } } ``` Another case: ``` public class A { public string _pr...
- Modified
- 29 Dec at 20:34
Add Authentication to /swagger/ui/index page - Swagger | Web API | Swashbuckle
I'm working on a Swagger (Web API) project. When I first run the application it shows the Login page for Swagger UI. So, a user first has to login to access Swagger UI Page, However, if user directly...
- Modified
- 23 Dec at 05:52
Get name of specific Exception
Is this the best method for getting the name of a specific Exception in C#: ``` ex.GetType().ToString() ``` It is in a generic exception handler: ``` catch (Exception ex) ```
- Modified
- 7 Nov at 21:29
Unit testing controller methods which return IActionResult
I'm in the process of building an ASP.NET Core WebAPI and I'm attempting to write unit tests for the controllers. Most examples I've found are from the older WebAPI/WebAPI2 platforms and don't seem t...
- Modified
- 10 Mar at 00:51
Could not find a declaration file for module 'module-name'. '/path/to/module-name.js' implicitly has an 'any' type
I read how TypeScript [module resolution](https://www.typescriptlang.org/docs/handbook/module-resolution.html) works. I have the following repository: [@ts-stack/di](https://github.com/ts-stack/di). ...
- Modified
- 21 Feb at 14:6