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 ArticleFill 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 ArticleChange 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 ArticleDate 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 ArticleMigration 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 ArticleEdit 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 ArticleIs 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 Articleaspnet 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 Articleaspnet 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 ArticleCommon 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 ArticleSecuring 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 ArticleEF 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 ArticleHow 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 ArticlePHP 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 ArticleStrange 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 ArticleHow 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 ArticleCannot 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 ArticleWhat 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 ArticleCore 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