Data dodania Pytanie
2017-02-18 23:02 c# WebApi.SelfHost post is null »
I am using the WebApi.SelfHost but my Post is always null. I tried all the solutions I could find on SO, but none of them worked. I'm stuck with this...
(1) odpowiedzi
2017-02-18 20:02 Null Context.User »
When I try to access Context.User in my Hub I keep getting Context.User is null errors. I have tried moving app.MapSignalR() under the ConfigureAuth()...
(1) odpowiedzi
2017-02-18 19:02 Hosted WebApi application always prompt login »
I have hosted a ASP.NET WebApi application w/ Angular2 in the front end on godaddy. On the server I have enabled: My web.config in the web.api proj...
(0) odpowiedzi
2017-02-18 17:02 Generic Structure Field Inside another Structure »
Well, it is possible to define a generic structure in C# and it is also possible to use this generic structure as a field to another structure. I know...
(0) odpowiedzi
2017-02-18 17:02 Encrypted string has a slash (/) in the result, which causes problems in a URL »
I hunted around online to find a simple little encryption method that would take a string, encrypt it, and then decrypt it. The idea being that I hav...
(2) odpowiedzi
2017-02-18 15:02 Equivalent of Objective-C Dispatch Queues in C# .NET approach or idiom »
I'm a newbie to C# .Net world and am creating a .NET API service that writes to an MS Access database table which does full table locks, there will be...
(1) odpowiedzi
2017-02-18 09:02 Json response based on parameter in webapi »
My API controller method is public IQueryable<Team> GetTeam([FromUri] string include = "") { return from c in db.Team select new Team { id...
(1) odpowiedzi
2017-02-17 22:02 how is repository pattern really done? »
I'm using elastic search with my asp.net core web api. I don't quite get where the line is drawn when it comes to repository responsibility. Here is ...
(1) odpowiedzi
2017-02-17 21:02 Converting double to int returns unexpected results »
I want to show number conversion double to int. But I am confused. Here is my codes. private void tbxDouble_TextChanged(object sender, EventA...
(3) odpowiedzi
2017-02-17 20:02 In MVC 5 - How to compare 2 boolean values and set it as a third booelan in View? »
I have View @Html.HiddenFor(x => Model.IsPersistable}) Model public class MyModel() { public bool IsPersistable{ get; set; } public bool S...
(4) odpowiedzi
2017-02-17 18:02 Asp Net Core Web Push Notifications »
Main goal is to add to site ability to send web notification to pop up a system notification to alert the user using Html5 Push API and service worker...
(0) odpowiedzi
2017-02-17 16:02 Validating Enums in Web api 2 object parameters »
Suppose you send a class-instance to controller and the class has a property of Enum type. public class CoffeeController : ApiController { [HttpP...
(3) odpowiedzi
2017-02-17 12:02 Why does WPF textbox not support triple-click to select all text »
is there a reason why a WPF textbox does not support triple-click behaviour like most modern UIs these days do? By "triple click", I mean: double cli...
(2) odpowiedzi
2017-02-17 10:02 Do I need to put top 1 when using SqlCommand.ExecuteScalar() »
I've analyzed the code of SqlCommand and see that it works fine (see CompleteExecuteScalar method). But I'm not sure should I use top 1 in the query. ...
(2) odpowiedzi
2017-02-17 10:02 Multiple independent locks on several objects »
There are several folders on back-end of Web API server. Each of them is a git repository. Let's call them Project1 Project2 Project3 How can I cr...
(1) odpowiedzi
2017-02-17 02:02 How do yield and await implement flow of control in .NET? »
As I understand the yield keyword, if used from inside an iterator block, it returns flow of control to the calling code, and when the iterator is cal...
(5) odpowiedzi
2017-02-16 21:02 Cannot connect to SQL Server using SqlClient in a desktop application »
Connecting to SQL Server with a SQL username and password is no problem at all. These scenarios work just fine: from C# code using SqlClient in ASP....
(1) odpowiedzi
2017-02-16 18:02 C# Issue with converting from json »
I want to get posts from a test site with WordPress. When I am debugging, I can see that I get the data from web, but when I try to put them in a Text...
(1) odpowiedzi
2017-02-16 18:02 Attribute routing returns 404 »
but I am new to attribute routing, and I have no idea why this isn't working while everything else does so I have this [RoutePrefix("api/statistics")...
(2) odpowiedzi
2017-02-16 17:02 Facebook (OAuthException - #100) Tried accessing nonexisting field (first_name) on node type (AnonymousUser) »
I've been using Facebook login in my app for a while without any issues. We did a big update to our website and now I keep getting this error from so...
(2) odpowiedzi
2017-02-16 17:02 C# WEB API CORS does not work »
Fighting with CORS. I have a site that is making a simple XmlHttpRequest to a WEB API I built in C#. var xhr = new XMLHttpRequest(); xhr.ope...
(2) odpowiedzi
2017-02-16 16:02 Asp.Net Core Post FromBody Always Null »
I've got a new API that I'm building with Asp.Net Core, and I can't get any data POSTed to an endpoint. Here's what the end point looks like: [Htt...
(1) odpowiedzi
2017-02-16 15:02 best practice for using async await in webapi »
i have .net core webapi which as service layer. service layer has all ef code. if have basecontroller with this code protected Task<IActionResul...
(2) odpowiedzi
2017-02-16 13:02 Linq remove only one item if there are duplicate »
I have 5 numbers i.e.: 1 1 1 2 3; I have to sum them except the minimum number, but I can remove it only one time (if the minimum occurs more than one...
(4) odpowiedzi
2017-02-16 11:02 Post Stream in ASP.NET Core Web Api »
Hello lovely people of Stack Overflow. Since yesterday I have a problem and I have been browsing SO since then. I have a UWP Client and ASP.NET Core W...
(1) odpowiedzi
2017-02-16 07:02 Should nullable lambda arguments be replaced with transparent implementations? »
Say that a method has an optional Action or Func<T, T> argument that will usually be the default value of null. This usually-null lambda expres...
(2) odpowiedzi
2017-02-16 05:02 How to check null value within TempData Razor MVC that written inside js code »
I'm Trying to check null value within TempData Razor MVC that written inside javascript code, but unfortunately it doesn't work. whether TempData val...
(1) odpowiedzi
2017-02-15 21:02 if statement fails when true »
This piece of code is failing when I build my project. THe if statement has to check if ParkingLot is true. I thought the way to do that was the follo...
(1) odpowiedzi
2017-02-15 20:02 Can DateTime tear in a 64 bit environment? »
In C# setting a value to a variable is atomic as long as its size is at most native int (i.e. 4 bytes in a 32-bit runtime environment and 8 bytes on a...
(3) odpowiedzi
2017-02-15 20:02 What is the purpose of external static constructors in C#? »
Accordingly to the section "10.12 Static constructors" of "C# Language Specification. Version 5.0" static constructor can be marked with "extern" modi...
(0) odpowiedzi
2017-02-15 15:02 How to compress and cache files with IIS when filename is determined by ASP.NET Web API controller »
I have a ASP.NET Web API with the following controller action for serving possibly large (<1-200MB) 3D models which are stored in JSON format somew...
(1) odpowiedzi
2017-02-15 11:02 Implement a generic interface missing new constraint »
Consider the following interface: public interface IFoo { M Bar<M>(); } Trying to implement that with class Foo : IFoo { public M Ba...
(3) odpowiedzi
2017-02-15 04:02 Chaining date/time in Razor »
I'm working on a project that is meant to display a list of messages and the times/dates the messages are sent. The C# for setting the date is: pu...
(1) odpowiedzi
2017-02-15 01:02 Does a Stream get Disposed when returning a File from an Action? »
I'm writing a string to a MemoryStream I need to return the stream to the Controller Action so I can send it off as a file for download. Normally, I...
(1) odpowiedzi
2017-02-14 17:02 Retrieving a subset of rows from an OData endpoint »
I've an ASP.NET Web API 2 exposing an OData endpoint. In the front-end I'm using ASP.NET MVC 5. To consume the endpoint I'm using a WCF Services Refe...
(1) odpowiedzi