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

Write to text file

Hi,I have put the latest copy of my code at https://github.com/DotNetDS/CoreMVC140620171318.gitWith PLC Blocks I want to to be able to press the Generate Code link and for it to send an email.(At the...

View Article


Fill clientId with current user when record created

Hi, I want the clientId field filled with the current user when a record is created.<div class="username">@User.Identity.Name</div>Take PLC Blocks for example.I have put a copy of my latest...

View Article


Change from 2 DbContext to 1

HiApologies for what I am sure must be a very basic question...I am using Asp.net Core with Identity and currently have 2 DbContext (ApplicationDbContexts and ToDoDbContext). Since I am running into...

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

Migration not working using Core

Hi,Running migration, "Update-Database -Context ApplicationContext", why do I get this error at console "Value cannot be null".At OnConfiguring method, the DB connection string is stored to a variable...

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

Is ASP.NET Core 1.0.0 for VS 2015 open source

I tried to install Microsoft .NET Core 1.0.0 RC2 for VS 2015. But name says  "Microsoft .NET Core 1.0.0 RC2 VS 2015 Tooling Preview" . Is it trial version or Open source.Also where to download...

View Article

aspnet core: restrict middleware from swagger

HI, here is a  middle ware here the middleware gets executed first but , it directly return to response, instead of even  calling aspnet mvc. although i have it in pipeline, however is i remove the...

View Article


aspnet core middleware use and shjort circuit

public class SecurityMiddleware { private readonly RequestDelegate _next; public SecurityMiddleware(RequestDelegate next) { _next = next; } public Task Invoke(HttpContext httpContext) { //handle...

View Article


Common table between two database IdentityDbContext and CustomDbContext

Hi guys,I have Database for Identity which is automatically created by IdentityDbContextAnd i create my custom database for my Projectbut the problem my custom database need to has User table which is...

View Article

[ValidateAntiForgeryToken] breaks page

I have an ASP .Net Core 1.1 MVC web app. When I add the [ValidateAntiForgeryToken] decoration to my Edit/Delete/Create controllers, the pages don't load ( HTTP 400 error). Any ideas why? I read...

View Article

Securing an ASP.Net Core MVC Web Application

I'm developing an ASP.Net Core Web Application that has several secret values (account/password, etc...) that I need to secure.  I've researched using the Secret Manager, however this seems to require...

View Article

EF Core: Circular entity reference

I would say that it takes a lot of time to get to know ASP.NET Core to understand how to achieve things then previous versions with webforms, but I understand that ASP.NET Core is bigger and you are...

View Article


How to read .hdb file in as.net

I have two files with the extension .hdb. I want to know whether this file is readable or not in asp.net. Thanks In Advance

View Article

PHP files not found in an ASP .NET Core site

I setup  php, fastCgi.  I addeda phpinfo.php file to the wwwroot.  It shows a 404 when i try to open it.

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

How to Count Number of Online Users in Asp.Net Core

How to Count Number of Online Users in Asp.Net Core 1.1 ?I would like to "limit" the number acccess to my web app.So if number of online user exceed the max, the system have to deny the access.Anyone...

View Article


Cannot return Data from query - IEnumerable IQueryable

Hello I am trying to return the data from two tables in two different DBcontext. When I use this code  var mytable= _context.mytable; var Appuser = _adbcontext.Users; var query = (from e in Appuser...

View Article

What is the alternate of FileUpload.SaveAs( ) method in ASP.NET CORE

What is the alternate of FileUpload.SaveAs( ) method in ASP.NET CORE  TO SAVE FILES in Solution folder

View Article

Image may be NSFW.
Clik here to view.

Core MemoryCache Get method is null

Hi,Why is the MemoryCache's Get method is always null?using Microsoft.Extensions.Caching.Memory; //PM> CacheManager.Microsoft.Extensions.Caching.Memory -Version 1.1.0 public class IndexController {...

View Article
Browsing all 9386 articles
Browse latest View live


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