Not sure how to Cast Currency
I have added a [Display(Name = "Replacement Cost")] [DataType(DataType.Currency)] public float? ReplacementCost { get; set; }Which is showing as Real in SQL Server.When I push seed data to it as...
View ArticleBad Request - Invalid Hostname when accessing localhost Web API or Web App...
I have an ASP .Net Core 1.1 Web API and Web App running on my localhost from Visual Studio 2017 on Windows 10.When I run the projects, the API runs on http://localhost:50082/api/ and the web app on...
View ArticlePopulate dropdownlist by ViewBag in Javascript
Hello I have Select (dropdown list) which I can fill it using ViewBag, I used javascript to create dynamic table using append as follow $('#Table').append('<tr><td class="id"><input...
View ArticleHow do get the absolute path?
In the asp.net core .I want to get the absolute path where a file is located.No 'MapPath()' method.Is there any other way to get it's path?I need some advice.Thanks!
View ArticlePasring JSON in controller action seems to be partially failing
I have an ASP.NET Core 1.1 Web API. I have a very simple DTO:public class ItemsDto { public int? ItemId { get; set; } public int? Quantity { get; set; } }And a controller...
View ArticleAuthentication required Pop up
Hi Folks,I am using Asp.net core. I want to display authentication required Pop up in all browsers. Like this:E.gif(isLogged == false){ // Logic authentication required Pop up ?? }Any idea?I am waiting...
View ArticleImages Driving Me Nuts
I am not one for pretty and photos and things. But I dont think this is anything to do with it.All I am wanting to do is put a photo on the home page. Simple enough.I have a folder in my root...
View Articlejquery datepicker does not work in asp.net core app
If I make a simple html file i get it to work by using the same jquery reference. But this does not work in my asp.net core app.I don't understand why. Is it razor? here is the shared layout: Before...
View Articlepdb / symbols for asp.NET core nuget packages?
How can I get symbols for the Asp.NET core nuget packages?I have checked symbolsource.org, but cannot find any aspnetcore symbol packages there, despite knowing that the symbols are actually generated...
View ArticleValidate Model Properties and custom Validate rules at the same time.
I have a simple form with three fields: A name, a start date, and an end date.The Name property is marked as [Required], and the Model implements IValidatableObject with the Validate method implemented...
View ArticleWhich database backend should I choose for ASP.NET Core for running on Linux?
At the moment I'm learning ASP.NET Core and the main thing I'm struggeling with is the database backend.My question is, which open source backend would you recommend for developing with Visual Studio...
View ArticleCalling async function from Startup
I want to use identity for a new application and looking to seed the roles during the startup. I found this thread...
View ArticleCryptographic Error when publishing same app to a new webapp in Azure
When I publish the same app to multiple nodes in Azure and use traffic manager to route the requests evenly, I get the following error in ApplicationInsights and I'm unable to determine the...
View ArticleGETting entity from Web API via primary key vs composite key
I am developing a RESTful web api, which concerns itself with estate agents doing inspections of houses. So we have entities such as properties, which contain rooms which contain items. For each of...
View ArticleBrowser login prompt
Hi folks,I am using Asp.net core and have created windows Authentication (Use IdenityServer4). It seems good. Now I want to create sign in as user different in controller. If I clicked sign in as user...
View ArticleWhat docker in .Net core and what it does
i am not familiar with .Net core but heard the term docker. so curious to know what docker in .Net core and what it does.docker used for win app or web apps ?when docker used like when we run dotnet...
View ArticleGet Id of Current User
Hi Devs, I´m trying to get the Current User Id so I can make a search in my Users object to find witch user is logged in. I try the following code:public async Task<IActionResult> login(Login...
View ArticlePass c# array to javascript array in razor file ...
Hi everyone, I need someone to explain me how to pass the strings of an array, obtained in server-side c #, in a javascript array of strings inside a razor file. I am developing in ASP.NET core MVC....
View ArticleAspNet Core ServicePointManager.ServerCertificateValidationCallback
Hello Guys, I'm trying using ServicePointManager.ServerCertificateValidationCallback at NET CORE for call webservice in soap to bypass invalid certificated.How can I do it?I'll try this but haven't...
View ArticleCoded UI Testing VS2017
Hi,I am working on Dotnet core project and recently upgraded to VS2017. I would like to perfom coded ui testing using vs2017.but i did not found any useful links or materials available in any forums....
View Article