Data dodania Pytanie
2017-06-16 23:06 File binding in WebApi controller not working »
I try to upload files from angular to dotnet core webapi and somethings seems wrong with my code: [HttpPost("UploadImage")] public IActionRes...
(1) odpowiedzi
2017-06-16 22:06 ASP.NET Core giving me Code 500 on Forbid() »
I tried to solve this for hours now and I can not find anything. Basicly I have a simple controller which roughly looks like this: [Route("v1/lists")...
(1) odpowiedzi
2017-06-16 20:06 Passing parameters to plugin constructor via MEF on .NET Core? »
I spent several hours trying to figure out how to pass parameters to a plugin constructor via MEF (System.Composition) but all to no avail. Needless ...
(0) odpowiedzi
2017-06-16 19:06 Conditional OnClick With Razor in MVC C# »
I have a variable named wURL which contains a URL. If the URL is NULL I would like to not have the onclick Event in my TD. My trouble is figuring ou...
(3) odpowiedzi
2017-06-16 17:06 How to switch between two luis.ai dialog with different languages »
i have created a bot in bot framework using also luis.ai. In my luis account i have created two app with different language culture. One app in engli...
(2) odpowiedzi
2017-06-16 16:06 Dictionary initializer has different behavior and raises run-time exception when used in combination of array initializer »
I have the following C# code which initializes a new dictionary with int keys and List<string> values: var dictionary = new Dictionary<i...
(2) odpowiedzi
2017-06-16 15:06 IdentityServer4 token signing validation »
I have IdentityServer4 that generates signed JWT tokens. In my web api I added auth middleware to validate these tokens: app.UseIdentityServ...
(2) odpowiedzi
2017-06-16 15:06 Wrap content with link if condition = true? »
What is the best way to wrap some elements inside a link, if a condition is true? So, lets say i have this markup: <div> <h1>Header&l...
(2) odpowiedzi
2017-06-16 14:06 Jquery Function always return count 0 of second parameter »
i am writing a function in jquery which post the data to controller. currently it is posting form data to controller fine but when i post checkbox lis...
(2) odpowiedzi
2017-06-16 12:06 Is new() required for nullable non-reference type variable? »
If I have made a variable of a non-reference type, say int, nullable, i.e. int?, does this mean I need to use a constructor before assigning a value? ...
(2) odpowiedzi
2017-06-16 10:06 Copying Data from Oracle Server to SQL Server »
I'm quite new to coding in general and I'm looking to copy 47 columns with c300,000 rows of data, from an Oracle to an SQL database, on a daily basis....
(1) odpowiedzi
2017-06-16 09:06 What shall I use instead of OnMouseXXX event handlers? »
I've build a little app where I use OnMouseDrag and OnMouseDown in some objects. I thought that it would be the best option because this methods were ...
(1) odpowiedzi
2017-06-16 04:06 WPF COMException Crashes Application At Startup (Started Today) »
I have just today started seeing this Exception out in the wild on application launch with an app that has been in production for 3 years. System...
(1) odpowiedzi
2017-06-15 23:06 Separate variables in cshtml »
I have two nested C# for loops in cshtml and I want to concatenate the variables i and j with an underscore in a button tag. I've tried the following:...
(1) odpowiedzi
2017-06-15 23:06 How do I create a nested object from the container object's create controller/view in MVC? »
I am new to MVC and am struggling to get my head round it coming from a web forms background. I have two classes for a timesheet application, Week an...
(0) odpowiedzi
2017-06-15 18:06 Server.Transfer/Redirection in .NET WebApi »
Our company has an internal API (.NET WebApi) serving many of our applications. Now, we're going to have an application hosted outside and the decisio...
(1) odpowiedzi
2017-06-15 14:06 ASP.NET Core Route Tag Helper use Route? »
I'm kind off confused about how the asp-route-* tag helper works. What I understand is that it's kind of bound to the routing I've setup. E.g. route...
(1) odpowiedzi
2017-06-15 14:06 Running ASP.NET Core application in full IIS without publishing gives 502.5 error »
I'm trying to host an ASP.NET Core application in IIS on my local machine, and I'm getting a 502.5 error. My question is different from "ASP.NET Core ...
(2) odpowiedzi
2017-06-15 14:06 How to send two object as response message and response code in web api »
I want to send response message like this {"message_code": 00, "message": "Success"} My Response Message Class public class ResponseMessage { ...
(1) odpowiedzi
2017-06-15 11:06 Bind generic type (scanning) to concrete instance with generic method call »
Using StructureMap I want to bind IQueryable<T> to ApplicationDbContext.Set<T>().AsQueryable(). So I can inject like this. public class ...
(1) odpowiedzi
2017-06-15 06:06 protect pdf file with password c# »
connetionString = ConfigurationManager.ConnectionStrings["conString"].ToString(); sql = "select Id,employeeName,employeePosition from ...
(2) odpowiedzi
2017-06-15 02:06 What is the reasoning behind x64 having such a different performance result from x86? »
I was answering a question on Code Review and I discovered an interesting difference in performance (like, a lot) between x64 and x86. class Program ...
(2) odpowiedzi
2017-06-15 00:06 C# using statement inside #if DEBUG but not ship assembly »
I have a feature that I only want to happen on Debug, but do not want to ship the dll's that this feature requires. Is that possible to do? I have: ...
(2) odpowiedzi
2017-06-14 15:06 Anti Cross Site Request Forgery (CSRF) token in asp.net c# »
Our team has developed an c# asp.net application and it recently went through a security check. One of the many threats include using anti CSRF token....
(0) odpowiedzi
2017-06-14 15:06 ASP.NET Core memory consumption while uploading a file to Azure Blob »
When I upload a file to an Azure Blob, the memory consumption seems quite high. The data below is from a 200 MB file upload. public async Task<IA...
(0) odpowiedzi
2017-06-14 12:06 Order a list of tuples »
I've got a List of tuples like this: List<Tuple<Material, Material>> materials Later on I'm iterating over it. However, Item2 of the tu...
(3) odpowiedzi
2017-06-14 11:06 What is the difference between Component, Behaviour and MonoBehaviour? And why these are separated? »
MonoBehaviour extends Behaviour and Behaviour extends Component. I want to know why these classes are separated and semantic meanings of these classes...
(1) odpowiedzi
2017-06-14 11:06 WebApi "The requested resource does not support http method 'DELETE" »
Using WebApi angularjs project and trying to delete function as ` [HttpDelete] public String DeleteCountry(string cntryId) { if...
(3) odpowiedzi
2017-06-14 10:06 Call Web API 2 method using c# CLR store procedure by HTTPClient »
I have a WPF application that consumes services of MVC web API 2. Created RestClient wrapper using HTTPClient to call async methods such as PostAsync ...
(2) odpowiedzi
2017-06-14 09:06 C# Memory Mapped File doesn't take up physical memory space »
I'm trying to cache a large amount of data in physical memory and share them for the other processes in the local environment. So I came up with MMF a...
(0) odpowiedzi
2017-06-14 05:06 C# select random numbers within a period of time »
I have a list of employee numbers (about 300 employees), each employee will place his fingerprint into a scanner and I have to randomly select 20 empl...
(0) odpowiedzi
2017-06-14 05:06 Calling asp.net webApi through restclient throws exception "Reference to undeclared entity 'nbsp'. Line 69, position 41." »
I am calling Asp.net WebApi from C# code via RestSharp using below code RestClient Client = new RestClient(); Client.BaseUrl = new ...
(2) odpowiedzi
2017-06-13 23:06 switch with var/null strange behavior »
Given the following code: string someString = null; switch (someString) { case string s: Console.WriteLine("string s"); break; ...
(3) odpowiedzi
2017-06-13 22:06 Create API Resource Model for Value Objects »
Is it safe to return Value Objects from an API endpoint or should all objects be converted to a Resource Model. For example if I have GET /api/custome...
(1) odpowiedzi
2017-06-13 18:06 Enabling concurrent requests from same session in ASP.NET Core »
EDIT: This was apparently an issue with testing in the browser, not with the code. Sessions in Core are disabled by default as they should be. Origin...
(0) odpowiedzi