Quantcast
Channel: ASP.NET Core
Browsing all 9386 articles
Browse latest View live

Using @addTagHelper in ASP.NET Core WebAPI. ASP.NET Prerendering@addTagHelper...

I am developing "ASP.NET Core Web API" with "Angular 4". And this is my usual approach to use "Web API" template, so there are no folders such as"Views".It was not a problem till I wanted to use...

View Article


Search Query Not Handling Large Number of Users

We have an asp.net-core website which handles users search as follows:public async Task<ICollection<UserSearchResult>> SearchForUser(string name, int page) { return await...

View Article


Strange error generation "HTTP Error 502.3 - Bad Gateway"

Hi everyone, I'm developing a site in ASP.NET core MVC with Visual Studio 2015 Update 3 and I happened for the first time that the following error occurred in the same procedure randomly: - HTTP Error...

View Article

Make Date control on form change time as well as date

Hi, I have below which only allows me to change the date, not the time.<div class="col-md-10">                <input asp-for="Date" class="form-control" />                <span...

View Article

Enity Framework Core 1.1 and migration

<p>Hi fellow programmers! :)</p><p>I've just installed Microsoft Visual Studio 2017 Community and try to get heads up on the newest technology.</p><p>I'm not that familiar...

View Article


Image may be NSFW.
Clik here to view.

Edit multiple items: HttpPost not working

I'm constructing this view where the user can edit multiple item and save one at the time with the 'Update' button.)Problem: I have trouble making the 'Update' button work. Here is the post method:The...

View Article

Where do I find ServerVariables("REMOTE_USER")?

I used Request.ServerVariables("REMOTE_USER") in classic ASP to get the id of the logged in user.  I can't figure out where to get the information in ASP.NET Core.  I've reviewed the HttpRequest class...

View Article

ASP.NET Core app in Docker on Linux can't connect to SQL Server

Good day - I have an ASP.NET Core 1.1 Web API which runs in a Docker container on Ubuntu and connects out to a SQL Server database (SQL Server 2012 SP3) on a Windows server.  This works in 3 out of 4...

View Article


How to render at server side without @taghelper?

I am developing "ASP.NET Core Web API" with "Angular 4". I am following this tutorial of Microsoft.AspNetCore.SpaServices Server Side Prerendering and there are two important steps to use power...

View Article


How to Seed Data in Core?

Hi,Below code is EF6 seed migration, but what is the equivalent in Core to seed data?using System.Data.Entity.Migrations; using System.Linq; internal sealed class Configuration :...

View Article

Confused by Edit Not Accepting Some Numbers

I have the following in Edit on controller: // GET: WaterBodies/Edit/5 public async Task<IActionResult> Edit(int? id) { if (id == null) { return NotFound(); } var waterBody = await...

View Article

Page security

Hi, in my _Layout.cshtm filr I have the below code.How do I go about making it so that the PLC Blocks link will only go to that page if some one is logged in.And can I get who is logged in into a...

View Article

How to enable LazyLoading in Core?

Hi,Is LazyLoading not built-in/supported in Core and how to enable it? Although the service code below works fine, I have to do the "includes" on every services which kinda cumbersome. public...

View Article


How to use Session in ASP.NET CORE

Can you give me a good video tutorial of  session.I want Example to use session in asp.net core. Please give me a link of video

View Article

Issue when creating MemoryStream SpreadsheetDocument and downloading through...

I have a very simple ASP.Net Core MVC app with a button that call a method in a class library in order to create a SpreadsheetDocument from randomly-generated integer values. When I run the app in...

View Article


Date Time being set to 0001-01-01 12:01 AM

Hi, I have a row in a database.When a record is created the date field is set to 0001-01-01 12:01 AM no matter what date is set to. Thanks,Modelnamespace ContosoUniversity.Models {    public class...

View Article

Make Date control on form change time as well as date

Hi, I have below which only allows me to change the date, not the time.<div class="col-md-10">                <input asp-for="Date" class="form-control" />                <span...

View Article


ModelBuilder do not has Configurations property

Hello guys,I want to use that code: protected override void OnModelCreating(ModelBuilder modelBuilder) { // Moved all Student related configuration to StudentEntityConfiguration class...

View Article

How To Structure Multiple Relationship On One Entity

I am generating the error:System.InvalidOperationException Unable to determine the relationship represented by navigation property 'Quote.QuoteRequest' of type 'ICollection<QuoteRequest>'. Either...

View Article

Error updating an entity: Conflict with Foreign Key

Hello!On this action:[HttpPost, ActionName("Test")] [ValidateAntiForgeryToken] public async Task<IActionResult> TestPost(Machine machinetoUpdate) { var machine = _context.Machines.Where(m =>...

View Article
Browsing all 9386 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>