Check if user belongs to an AD group .net core
I have an app where on login I want to check if the user is a part of a particular AD group or not. If yes then continue with the application, if not then show error: "I do have the LDAP connection ad...
- Modified
- 6 May at 07:21
LINQ continue after Take
Say we have an `IEnumerable<T> stuff;` Is there a concise way to Take n elements and then another m elements after the first, without re-evaluating? example code: ``` stuff.Take(10); stuff.Skip(10)...
ServiceStack Query String Mappings
I'm curious if it is possible to modify the servicesstack Route mapping rules. I'd like non-query string parameters to go in one area of the model and the query string parameters to go into another....
- Modified
- 27 Dec at 14:47
VS 2017 .Net Core 2.0 Console Application Publish Fail
I've been trying to publish a .Net Core 2.0 Console Application using Visual Studio 2017 Community Edition but it always fails (it runs perfectly inside VS2017). This is my CSPROJ: ``` <Project Sdk=...
- Modified
- 4 Jun at 08:16
How to correctly set HTTP header with managed IIS module
I've written my own managed IIS HTTP-module in C#. It's purpose is to simply set X-Forwarded-For and X-Forwarded-Proto request headers on some condition (which can not be handled with routing rules). ...
How to do multiprocessing using Python for .NET on Windows?
Now I'm developing C# app running on Windows. Some of processes are written in Python, that called via pythonnet (Python for .NET). The processes are calculation-heavy, so I want to do them in parall...
- Modified
- 26 Dec at 11:44
React Axios - C# WebAPI request token fails without a server error
I have the following code: ``` var qs = require('qs'); const ROOT_URL = 'http://localhost:56765/'; const data = qs.stringify({ username, password, grant_type: 'password' }); axios.post(`${ROOT_URL}t...
- Modified
- 30 Dec at 18:56
Error the process cannot access the file because it is being used by another process while building project by CLI on .NET Core
I got following error while running `dotnet build` command on my .NET Core project. ``` C:\Program Files\dotnet\sdk\2.1.2\Microsoft.Common.CurrentVersion.targets(4106,5 ): warning MSB3026: Could no...
How to fill an input field using Puppeteer?
I'm using [Puppeteer](https://github.com/GoogleChrome/puppeteer) for E2E test, and I am now trying to fill an input field with the code below: ``` await page.type('#email', 'test@example.com'); ``` ...
- Modified
- 11 Mar at 01:1
What are data classes and how are they different from common classes?
With [PEP 557](https://www.python.org/dev/peps/pep-0557/) data classes are introduced into python standard library. They make use of the `@dataclass` decorator and they are supposed to be "mutable n...
- Modified
- 19 Apr at 21:21
xUnit Non-Static MemberData
I have the following `DatabaseFixture` which has worked well for all tests I have created up to this point. I use this fixture for integration tests so I can make real assertions on database schema st...
- Modified
- 6 May at 18:47
MassTransit and .NET Core DI - how to resolve dependencies with parameterless constructor?
I am working on the app using .NET Core 2 and MassTransit 4(dev). Mass Transit requires parameterless constructor for consumers. I need to use e.g. logger, dbContext etc in my consumers and I would l...
- Modified
- 23 Dec at 16:33
Unity Coroutine yield return null EQUIVALENT with Task async await
What is the equivalent of `yield return null;` in Coroutine (that run each frame at Update) in an async method? The nearest I got to find is `await Task.Delay(1)`, but it DO NOT run every frame.
- Modified
- 6 May at 00:53
Entity Framework Core Find and Composite Key
The `Find()` method takes an array of objects describing the primary key you're attempting to find. The documentation is unclear as to how to handle composite primary keys. I tried searching the GitHu...
- Modified
- 27 Oct at 12:30
Is it better to use path() or url() in urls.py for django 2.0?
In a django online course, the instructor has us use the `url()` function to call views and utilize regular expressions in the urlpatterns list. I've seen other examples on youtube of this. e.g. ``` ...
- Modified
- 22 Dec at 21:37
C# 7.1 can't be published
I have ASP.NET Core C# web application. I made some changes that now use C# 7.1 features. I changed project version, so it compiles and runs fine. However, when I try to the project, I am getting an ...
- Modified
- 27 Jan at 13:45
C# Attribute hell - one class shared between mobile and server on two different SQL platforms
We share a single poco's with - - - Problem is the shared classes have become a mess. ``` [PrimaryKey, AutoIncrement] public int Id { get; set; } #if __MOBILE__ [Indexed] #else ...
- Modified
- 22 Dec at 16:13
How do I use HttpClient PostAsync parameters properly?
So I am working on writing an extension class for my project using HttpClient since I am moving over from HttpWebRequest. When doing the POST request, how do I send a normal string as a parameter? No...
- Modified
- 22 Dec at 16:13
How does the hard-coded ApplicationInsightsResourceId impact the gathering of AI data from resources in varying production levels?
I have an application to which I am trying to add in Azure Application Insights telemetry. I've been reading how I can modify the InstrumentationKey at runtime, to select a different telemetry target...
- Modified
- 20 Jun at 09:12
Optional property class in typescript
I'm new to typescript. What is the utility of optional properties in typescript? And what is the difference between: ``` a?: number; a: number | undefined; ```
- Modified
- 9 Jan at 21:15
How to make Sonarqube exclude a .NET (C#) project from coverage measures
Sonarqube allows for individual files to be excluded from code coverage by adding patterns in the key. This can be done on a project level by adding them in the UI and even in a .csproj file by speci...
- Modified
- 22 Dec at 09:37
What exactly happens when you call an async method without the await keyword?
I have a web server and there is a periodic job merges and send records (lots of request logs). ``` Task.Run(() => { while (true) { try { MergeAndPutRecords(); ...
- Modified
- 26 Jul at 17:3
Angular File Upload
I'm a beginner with Angular, I want to know how to create Angular 5 , I'm trying to find any tutorial or doc, but I don't see anything anywhere. Any idea for this? And I tried [ng4-files](https://git...
- Modified
- 7 Jul at 06:0
Ways to secure an anonymous Web API request
I have a (NOT ASP.NET Core) single page application with on the front end. My client (browser) talks to server through ASP.NET Web APIs. Now, the web application is on but . There is no login/ us...
- Modified
- 31 Dec at 15:30
'react-scripts' is not recognized as an internal or external command
I've got a maven project, within which is JavaScript project cloned as a git sub-module. So the directory structure looks like `mavenapp/src/main/javascript/[npm project files]` Inside my package.json...
- Modified
- 27 Aug at 08:14