Can't impersonate windows end user with MVC 6 application
Hi all,I need to get the end user windows Id to do a query on a database in a MVC 6 application.For this, I've set the authentication mode = windows and impersonate = true in my web.config as shown...
View ArticleResolve dependency injection with default rule automatically
Generally, We inject the dependency like the below for each class.services.AddTransient<IHttpClientProvider, HttpClientProvider>();If have huge classes, do we still need to add huge lines(each...
View Article'Add as a Link' missing?
Since Publish is not working when I reference some 4.5.1 libraries (see this thread), I am trying to use only the new 'Class Library (Package)' (nuget) projects.I would like to re-use some existing...
View ArticleCheck for Database
What's the best way to check if database exists, in Startup.cs file? And then redirect to a page so I can install database?
View ArticleClassic ASP support in ASP.Net 5/ MVC 6
Hi, I have a large size legacy project in classic asp (the old vb script), that we would like to migrate to .NET, preferably using newer ASP.NET 5 / MVC 6.Is anyone aware of any OWIN middleware that I...
View ArticleCan we use SqlCacheDependency in ASP.Net5
We can achieve Controller/Action level caching with the help of "ResponseCache" attribute, but is there a way to implement "SqlCacheDependency" in Asp.Net5. Please help with some code sample if someone...
View Articlednx How to add subdomain to project?
Hello guys, is there any way how to manage domain names/subdomains on my localhost machine (OS X), I want to add a subdomain to my project, and I don't see any relevant documentation upon this topic so...
View ArticleProblem with "Your First ASP.NET 5 Web App Using Visual Studio"
I am a retired IT dinosaur who wants to learn this new technology. I started by watching the excellent Pluralsight courses on MVC 4 and MVC 5, and then built the tutorial exercise in the title of this...
View ArticleSharing Views between Projects
Hello everybody,I created a simple vnext-mvc-application. I like the template with authentication and want to move authentication files in separated project(class library nuget). I miss a few things...
View ArticleHow to upload photo and add it in the database and save a file in the web...
// PublisherInfosRepositorypublic class PublisherInfosRepository { private readonly ApplicationDbContext context = new ApplicationDbContext(); private readonly IApplicationEnvironment _appEnv; public...
View Articleasp.net core how to get current user from web API
.I wan to get current user from Web API port, but this.HttpContext.User is null in the API controller.
View Article[ASP.NET Core Dependency injection] How can I get IServiceProvider outside...
Hi everyone,I try to work with native dependency injection of ASP.NET Core 1.0. I work with rc1 update 1 version.I have an n-tiers application. I would like to get IServiceProvider into DataLayer to...
View ArticleSelf-signed SSL with self host asp.net 5 application
I am having difficulty getting a self-signed ssl to work with my asp.net 5 mvc 6 application running as a self hosted app. I created a self-signed cert using IIS, and used the following commands to...
View ArticleCan't finish step "3.Enable the ASP.NET 5 command-line tools."
Hi,I am in tutorial "Installing ASP.NET 5 On Windows" (https://docs.asp.net/en/latest/tutorials/index.html). However, "Install ASP.NET 5 with Visual Studio" step 3 has become a stumble: when I dodnvm...
View ArticleHow to access connection in data access tier
I have 1 ASP.Net 5 Solution and inside solution there is 2 projects and want to get connection string in data access layer tier.web project contains no config.json file?
View Articleis this web.config correct?
Im having a commun error 0x8007000d pointing to my web.config file saying that my configuration data is invalid, Im trying solve it for hours and after look a lot of solutions in google and I still...
View ArticleWeb Config rewrite rules
<system.webServer><rewrite><rules><rule name="http to https" stopProcessing="true"><match url=".*"/><conditions><add input="{HTTPS}"...
View ArticleMVC thoughts
After dive into MVC for a while, I feel like we are going backwards.1. Spaghetti code. It seems MS is promoting to have code embedded in view again. A very powerful engine allow you embed a lot code in...
View ArticleLinking a js File in Visual Studio 2015
Hello Everyone,In Visual Studio 2015 I would like to add a link to my JavaScript library which I use in multiple project.It seems the Add Existing Item -> As Link has disappeared.Is there another...
View ArticleInputstream and contentlength is missing in microsoft.aspnet.http.abstractions
As my review to the Microsoft.AspNet.Http.Abstractions, the IFormFile is missing the InputStream and ContentLength in ASP.NET MVC 6, it insteads of OpenReadStream, which is not functioned to respnse to...
View Article