Data dodania Pytanie
2017-11-18 20:11 Visual Studio - Cannot start ASP.NET Core project »
Last few months I create console applications with .NET framework and C#. Now I want to create ASP.NET Core MVC projects, but I cannot choose any .NE...
(1) odpowiedzi
2017-11-18 15:11 StackOverflowException with Lazy<T> when throwing Exception »
A very simple sample application (.NET 4.6.2) produces a StackOverflowException at a recursion depth of 12737, which reduces to a recursion depth of 1...
(2) odpowiedzi
2017-11-18 15:11 Query doesn't add parameters' value when executed »
I want to insert multiple rows into my database, I tried to use parameters but I did something wrong. In debug mode, the parameters do have values, b...
(3) odpowiedzi
2017-11-18 13:11 It seems object initializer is not the same as contructor + property assignment. How so? »
Consider the code below: class Data { public string Name; public string NameWithSufix; } class Behaviour { private Data data; public...
(2) odpowiedzi
2017-11-18 09:11 Exception when comparing Guid »
I am trying to get a list of all categories that contain a site with a specific ID. Below is the scaffold generated method i slightly modified. ...
(1) odpowiedzi
2017-11-18 05:11 Is JwtSecurityTokenHandler thread safe »
I'm using JwtSecurityTokenHandler to issue tokens in a aspnet core web api app: JwtSecurityToken token = BuildJwtSecurityToken(...); public string to...
(0) odpowiedzi
2017-11-18 03:11 Serving .cshtml files on IIS globally »
I am trying to setup intranet IIS 8.5 (Win8.1) to globally serve .cshtml (Razor) files. The corresponding Application Pool is set to v4.0. The files ...
(1) odpowiedzi
2017-11-18 01:11 How do I get a random number from numbers available? »
I have a table that I am trying to get a random number from: //Fruits id | FruitName ---------------- 2 | Banana 3 | Apple 4 | Orange 6 ...
(4) odpowiedzi
2017-11-17 20:11 Waze Deep Links »
I'm developing an App using Xamarin Forms (cross platform), and im trying to open Waze app from my app, passing latitude and longitude. It opens Waze...
(1) odpowiedzi
2017-11-17 20:11 HttpContext in .net standard library »
I am working on couple of projects one of which is an ASP.NET 4.5 application and other one is .Net Core API 1.1 project. The asp.net application is u...
(2) odpowiedzi
2017-11-17 16:11 How to require non-anonymous user in .Net Core? »
In .Net Core, the controller attribute [AllowAnonymous] lets you set a controller to allow non-logged in users to access the controller. Is there a w...
(2) odpowiedzi
2017-11-17 16:11 How to force tag helper for hidden fields to render bool value in lower case »
I have a view model with a simple bool-property like this one: public bool HasAnyProductsThatRequirePhoneNumber { get; set; } I'm using a tag hel...
(1) odpowiedzi
2017-11-17 15:11 VS Code doesn't format C# code »
I created new file, set C# language, wrote some code. Then pressed Ctrl+Shift+F(or F1 - > Format Document). And got error Sorry, but there is no ...
(3) odpowiedzi
2017-11-17 15:11 ASP.NET MVC 4 - razor empty post in for loop »
I have the following code in razor: @for (int i = 0; i < Model.Count; i++) { using (Html.BeginForm("Bonnen", "Bon")) { ...
(3) odpowiedzi
2017-11-17 14:11 Updating Oracle 12.1 to 12.2 Oracle Dependency Error occurs »
We have recently been struggling to update our C# applications with the new Oracle dll’s. We create our software for multiple platforms. So our soft...
(1) odpowiedzi
2017-11-17 12:11 Pass int to webapi »
I know this has been asked a thousand times. But I can't find my error. I narrowed it down by testing it without a parameter, which worked and then tr...
(1) odpowiedzi
2017-11-17 11:11 How would I constrain a generic method in C# to only allow T where T has TryParse? »
public int DoSomething<T>(string someString) I want to insist that I can call TryParse on T. Is it possible to restrict T in that way? TryPa...
(1) odpowiedzi
2017-11-17 11:11 Asp.net Core Identity unit test controller actions »
I'm having a problem working out how and what to test. I have a controller that injects UserManager and calls the CreateAsync method to create a new ...
(1) odpowiedzi
2017-11-17 10:11 @HTML Dropdownlist selected value »
I'm new to Razor and I don't get why my selected value is not working. var listItems = (List<Categories>)ViewBag.Categories; Used in @for (va...
(1) odpowiedzi
2017-11-17 09:11 How can I prevent the debugger from entering my method when Exception is thrown? »
How can I prevent the debugger from entering my method when an exception is thrown, instead show the exception at the method's call site? For exampl...
(1) odpowiedzi
2017-11-17 01:11 ASP.Net: Call an async method in Page_Load »
I have this API client which has a send method used to post my object to a Web API service and return an object of type ReturnedResults. Now I need t...
(1) odpowiedzi
2017-11-16 15:11 Attribute Routing doesn't work »
I'm creating a rest api in visual studio express 2013. I have 2 controllers: one for orders and one for clients. I've already created the following:...
(2) odpowiedzi
2017-11-16 13:11 Removing xml namespaces in C# restful web service returned string »
I am having restful API which is written in C# using dot net framework 4.5..Currently its working alright... i'm returning a result after a JSON conve...
(0) odpowiedzi
2017-11-16 11:11 Web API: network printers show up in debug mode but not when run through iisservice »
I am trying to get a list of all available printers, be they localy installed or network printers. to do this i used the following code which i found ...
(0) odpowiedzi
2017-11-16 10:11 How to get additional claims on client side in identity server 4? »
In my identity server's Startup.cs file, I have server configured as below. I am using asp.net identity for user management. services.AddIdentityServ...
(2) odpowiedzi
2017-11-16 08:11 Is it possible to access the compressed data before decompression in HttpClient? »
I'm working on the Google Cloud Storage .NET client library. There are three features (between .NET, my client library, and the Storage service) that ...
(3) odpowiedzi
2017-11-16 05:11 What is the difference between Span<T> and Memory<T> in C# 7.2? »
C# 7.2 introduces two new types: Span<T> and Memory<T> that have better performance over earlier C# types like string[]. Question: What i...
(2) odpowiedzi
2017-11-16 05:11 Robust solution for rendering Emails in ASP.NET Core 2.0 »
I tried the solution made my Ian Rufus and it has one big drawbacks - when you publish your web app, all views get compiled. And since the rendered lo...
(0) odpowiedzi
2017-11-15 15:11 Test a controller in .Net Core always returns false? »
I write the following XUnit test to test a .Net Core WebApi controller's action: namespace VistaBest.XUnitTest.Api.Test { public class Account_Un...
(3) odpowiedzi
2017-11-15 14:11 Stop the navigation bar from refreshing - Umbraco »
I couldn't find anything regarding my issue so I decided to post one myself. I am using a navigation bar that has dropdown menu's. Whenever I open th...
(1) odpowiedzi
2017-11-15 12:11 JSON to ASP.NET Web API error: (500) Internal Server Error »
I'm trying to send a object via JSON to a web API but I keep running into and exception My client side action is: public string SubmitNewInciden...
(1) odpowiedzi
2017-11-15 11:11 c# 7 tuples not working (roslyn compiler exception) »
For some time we're using some of the new c# 7.0 features in our razor files. We've integrated the Roslyn compiler into our web projects, which are cu...
(1) odpowiedzi
2017-11-15 10:11 Consuming locally hosted SOAP service via ANDROID APP »
I'm currently working on a project where I want to consume a soap web service which is written in C# running on http://localhost:9063/WebService1.asmx...
(1) odpowiedzi
2017-11-15 10:11 Migrating ASP.NET Core, Kestrel and IIS Features »
I am trying to figure out ASP.Net Core applications and Kestrel web server behind them. So, I read some articles about ASP.Net Core and I realized th...
(0) odpowiedzi
2017-11-15 10:11 IIS 10.0 Detailed Error - 404.0 - Not Found - After Windows 10 Update »
I'm quite confused that what happened to my Web Api Application or IIS after Windows 10 Update. Some controllers like the following are working perfe...
(1) odpowiedzi