Questions

Protobuf equivalent of JsonHttpClient?

is there an equivalent of the new (-ish) JsonHttpClient that uses protobuf-net instead of JSON ? I realize that the old-style ProtobufServiceClient exists, but I'd like to replace it with something th...

2 Sep at 02:28

Sending http requests in C# with Unity

How can I send HTTP GET and POST requests in C# with Unity? What I want is: - - - What I've tried: - - - Most problems were with threading, I'm not experienced enough in it in C#. IDE, I use, i...

9 Sep at 14:55

Cannot get BHO working in 64 bit

I'm working on IE11 Browser Helper Object. I got it working when I build it in x86. The problem is, I want to use the project on x64 the BHO extension isn't working when it's built on x64. The extens...

Identity Server(OAuth2) implementation with integration to legacy systems(Forms Auth, ADFS,AD)

We are currently building a RESTful API(.Net Core, [IdentityServer 4](https://github.com/IdentityServer/IdentityServer4), EF6). We have released an MVP version of it. It also references a WCF servic...

ThenInclude not recognized in EF Core query

My IQueryable looks like this: ``` IQueryable<TEntity> query = context.Set<TEntity>(); query = query.Include("Car").ThenInclude("Model"); ``` > 'IQueryable' does not contain a definition for 'ThenI...

How to get param from url in angular 4?

I'm trying to get startdate from the URL. The URL looks like `http://sitename/booking?startdate=28-08-2017` My code is below: aap.module.ts ``` import {...}; @NgModule({ declarations: [...

6 Feb at 17:59

Submit a form in vue. How do I reference the form element?

I want to do a classic form submission from my Vue page, from a method. I don't want to use an `<input type="submit">`. How do I reference the form element in the page from my method? Surely I don't h...

14 Sep at 18:44

Export default was not found

I have a Vue 2 project, and I've written a simple function for translating months in dates, which I would like to import in one of my components, but I'm getting an error: > export 'default' (importe...

Equivalent to Java's Optional.orElse in C#

I'm looking for nice syntax for providing a default value in the case of null. I've been used to using Optional's instead of null in Java where API's are concerned, and was wondering if C#'s nicer nul...

8 Aug at 20:58

Keep Dotnet Core Grpc Server running as a console application?

I am trying to keep a Grpc server running as a console daemon. This gRPC server is a microservice that runs in a docker container. All of the examples I can find make use of the following: ``` Conso...

31 Aug at 19:55

How to enable CORS in Nginx proxy server?

As my title, here is the config file located in conf.d/api-server.conf ``` server { listen 80; server_name api.localhost; location / { add_header 'Access-Control-Allow-Origin' 'http://api....

1 Sep at 18:55

Remove console and debug loggers in ASP.NET Core 2.0 when in production mode

In ASP.NET Core 2.0 we have this ``` public static IWebHost BuildWebHost(string[] args) => WebHost.CreateDefaultBuilder(args) .UseStartup<Startup>() .Build(); ``` That `CreateDe...

21 Sep at 06:56

How to specify credentials when connecting to boto3 S3?

On boto I used to specify my credentials when connecting to S3 in such a way: ``` import boto from boto.s3.connection import Key, S3Connection S3 = S3Connection( settings.AWS_SERVER_PUBLIC_KEY, setti...

Unity - How to stop Play Mode in case of infinite loop?

I just made a silly mistake and I ended up with an infinite loop inside my `Update()`. After that I wasn´t able to stop the Play Mode. Actually I wasn´t able to do anything else with Unity until I res...

31 Jul at 05:56

Make sure to call FirebaseApp.initializeApp(Context) first in Android

I am facing this issue and seen some answers on this site but did not get any proper solution. I have used previous version of `Firebase` which works fine but when I try to upgrade using [Upgradation]...

1 Jul at 09:30

Unexpected SerializationException when using IRequiresRequestStream

We have a request Dto which is defined as this: ``` public class AddDocumentByUploadBinaryRequest: AddDocumentRequest, IRequiresRequestStream { public string FileName { get; set; } public St...

31 Aug at 07:58

Lazy Loading BrowserModule has already been loaded

I am trying to implement lazy loading but getting error as following ** > ERROR Error: Uncaught (in promise): Error: BrowserModule has already been loaded. If you need access to common directives such...

Access Control Origin Header error using Axios

I'm making an API call using Axios in a React Web app. However, I'm getting this error in Chrome: > ``` XMLHttpRequest cannot load https://example.restdb.io/rest/mock-data. No 'Access-Control-Allow-Or...

11 Aug at 05:2

Are you trying to mount a directory onto a file (or vice-versa)?

I have a docker with version `17.06.0-ce`. When I trying to install NGINX using docker with command: ``` docker run -p 80:80 -p 8080:8080 --name nginx -v $PWD/www:/www -v $PWD/conf/nginx.conf:/etc/ng...

23 Aug at 21:27

Cannot load a reference assembly for execution from a Web-Site project

Using .NET 4.6.2 and an older Web-Site (not Web-Application) project. If I clear the BIN directory and then build and run it works, but sometimes after multiple builds and runs, it fails with this err...

Undo HasIndex in OnModelCreating

I am trying to configure a multi-tenancy application using Identity Framework Core. I have successfully created a custom ApplicationUser to override IdentityUser with TenantId using instructions here...

ReferenceError : window is not defined at object. <anonymous> Node.js

I've seen similar questions that were asked here but none matches my situation. In my web I have 3 `JavaScript` files : `client.js` , `server.js` ,`myModule.js` . In `client.js` I create a window vari...

30 Aug at 15:19

Inspect DefaultHttpContext body in unit test situation

I'm trying to use the `DefaultHttpContext` object to unit test my exception handling middleware. My test method looks like this: ``` [Fact] public async Task Invoke_ProductionNonSuredException_Retur...

The type or namespace name "WebRequestHandler" could not be found

I am trying to use the Dropbox.API code that is listed here: [https://github.com/dropbox/dropbox-sdk-dotnet/tree/master/dropbox-sdk-dotnet/Examples/SimpleTest](https://github.com/dropbox/dropbox-sdk-...

30 Aug at 11:31

Download files from url to local device in .Net Core

In .Net 4.0 I used WebClient to download files from an url and save them on my local drive. But I am not able to achieve the same in .Net Core. Can anyone help me out on this?

10 Apr at 13:46