Service Fabric Unhandled Exceptions and best practices

Just curious if anyone has experience with unhandled exceptions in Service Fabric and what the best practices surrounding them are. Mainly curious about faulted state of services. Do the services get ...

1 Aug at 20:45

Owin middleware VS WebAPI DelegatingHandler

I'm reading around articles and checking exmaples and I see Owin Middlewares are used the same as WebAPI DelegatingHandler: logging incoming requests, validating headers and so on. My only understan...

1 Aug at 20:27

Dependency injection with constructor parameter in .net core

I see a lot of code examples on how to use DI in .NET Core, however none of them use constructor parameters. For example: - - - Here I need to not only use DI on my `IAuthorizationService` but als...

Bypass Authorize Attribute in .Net Core for Release Version

Is there a way to "bypass" authorization in asp.net core? I noticed that the Authorize attribute no longer has a AuthorizeCore method with which you could use to make decisions on whether or not to pr...

6 May at 06:16

Add migration with different assembly

I am working on a project with ASP.NET CORE 1.0.0 and I am using EntityFrameworkCore. I have separate assemblies and my project structure looks like this: ``` ProjectSolution -src -1 Domain ...

Cannot access a disposed object in ASP.NET Core when injecting DbContext

On an ASP.NET Core project I have the following on Startup: ``` services.AddDbContext<Context>(x => x.UseSqlServer(connectionString)); services.AddTransient<IValidationService, ValidationService>(...

Reflection with generic syntax fails on a return parameter of an overridden method

To avoid old-fashioned non-generic syntax when searching for attributes of a known type, one usually uses the extension methods in [System.Reflection.CustomAttributeExtensions class](https://msdn.micr...

Increase upload file size in Asp.Net core

Currently, I am working with Asp.Net Core and MVC6 need to upload file size unlimited. I have searched its solution but still not getting the actual answer. [I have tried this link](https://forums.as...

How to list all cassandra tables

There are many tables in cassandra database, which contain column titled user_id. The values user_id are referred to user stored in table users. As some users are deleted, I would like to delete orpha...

C# Image.FromStream(): Lost metadata when running in Windows 8 / 10

I have an application which retrieves an image from a web service. The web service would embed some metadata into the image before sending to the C# client. This is part of the method. It retrieves t...

15 Aug at 00:18

React - how to pass state to another component

I'm trying to figure out how to notify another component about a state change. Let's say I have 3 components - App.jsx,Header.jsx,and SidebarPush.jsx and all I'm simply trying to do is toggle a class ...

1 Aug at 00:47

How to use AutoFixture to build with customized properties while keeping type customizations?

I am trying to use autofixture to create an object but there are certain properties that I want to always be defaulted (while the rest could be auto generated). However, whenever I setup an customizat...

16 Jul at 12:36

How to parse JSON string in Typescript

Is there a way to parse strings as JSON in TypeScript? For example in JavaScript, we can use [JSON.parse()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse)...

20 Feb at 21:1

React eslint error missing in props validation

I have the next code, eslint throw: > react/prop-types onClickOut; is missing in props validationreact/prop-types children; is missing in props validation `propTypes` was defined but eslint does not r...

20 Jun at 09:12

How to check if LogWriter has been set?

I am trying to handle an Enterprise Library 6 LogWriter Exception that has recently popped up after upgrading from Enterprise Library 4 to 6. I either get: > The LogWriter has not been set for the L...

Serilog's AddSerilog is not recognized

I'm trying to call as per [this](https://github.com/serilog/serilog-docker/blob/master/web-sample/src/Program.cs) documentation, but the method is not recognized: "Error CS1061 'ILoggerFactory' do...

14 Nov at 00:8

How would you call async method in a method which cannot be async in C# without using .Result

I am overriding a method, HandleRequirementAsync, so I can't modify the return type of that method. However, I am calling a method in UserManager which is async and requires an await so I had to put t...

6 May at 18:52

Determine type during json deserialize

I'm working on a protocol in which the receiver will receive json messages of certain specified custom types (currently 5, but could be 10-20). I'm struggling to come up with an optimal/fast solution ...

31 Jul at 02:11

Will `params` in C# always cause a new array to be allocated on every call?

C#/.NET has variadic function parameters by passing an `Array` type by-reference (as opposed to C/C++ which just places all of the values directly on the stack, for better and for worse). In the C# w...

30 Jan at 23:13

Process.Start in C# The system cannot find the file specified error

This is a silly and tricky issue that I am facing. The below code works well (it launches Calculator): ``` ProcessStartInfo psStartInfo = new ProcessStartInfo(); psStartInfo.FileName = @"c:\windows...

30 Jul at 21:41

Selenium using Java - The path to the driver executable must be set by the webdriver.gecko.driver system property

I am trying to launch Mozilla but still I am getting this error: > Exception in thread "main" java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.gecko.dri...

27 Jun at 13:25

chmod: changing permissions of ‘my_script.sh’: Operation not permitted

when I'm trying to make shell script that error is shown ,what i must do ?? ``` [rehamadel@localhost bin]$ sudo vi my_script.sh ``` `[sudo] password for rehamadel:` `[rehamadel@localhost bin]$ ls -...

30 Jul at 17:18

The Include path expression must refer to a navigation property defined on the type.in eager loading

I try to include anonymous type like this : I want all `incomelist` attributes in addition to `CompanyTitle` ,`PeriodTypeName` ) ``` var incomeList = ctx.IncomeLists.Include(i => new ...

Access HTTP response as string in Go

I'd like to parse the response of a web request, but I'm getting trouble accessing it as string. ``` func main() { resp, err := http.Get("http://google.hu/") if err != nil { // handl...

30 Jul at 11:58

Azure ASP .net WebApp The request timed out

I have deployed an ASP .net MVC web app to Azure App service. I do a GET request from my site to some controller method which gets data from DB(DbContext). Sometimes the process of getting data from...

30 Jul at 11:16