Preserve serialization-order of members in CodeDOM

I know we can enforce generating the members within the classes in the same order as within the members-collection [as stated on MSDN](https://msdn.microsoft.com/library/system.codedom.compiler.codege...

28 Sep at 07:17

how to make UITextView height dynamic according to text length?

As you can see in this image the `UITextView` changes it's height according to the text length, I want to make it adjust it's height according to the text length. [](https://i.stack.imgur.com/daqn...

2 Aug at 07:51

Load different application.yml in SpringBoot Test

I'm using a spring boot app which runs my src/main/resources/config/application.yml. When I run my test case by : ``` @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes ...

2 Aug at 04:39

find the number of days between dates C#

I have a string that coming in date format date=08/21/2016 what I want to do is find the numbers of days From today's date in C# I have converted the string like this. ``` DateTime Date = Convert.ToD...

2 Aug at 01:58

No service for type 'Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionaryFactory' has been registered

I'm having this problem: In asp.net core 1.0, it seems that when the action try to render the view i have that exception. I've searched a lot but I dont found a solution to this, if somebody can hel...

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