asp.net-core-1.0 Questions

4

Solved

As per the following link: when creating ASP.NET Core App, You have just show all files in solution to find the package.json, but in my case i am not able to find it. I need to add angular2 and Web...

7

ResponseCache is somewhat a replacement for OutputCache; however, I would like to do server side caching as well as per parameter input. According to some answers here and here, I should be using...
Gumption asked 27/1, 2016 at 3:0

18

I have 3 environment specific appsettings files in my .Net core application in project.json I have setup publishOptions like this. ( based on suggestion here) "publishOptions": { "include": [ ...
Keever asked 31/8, 2016 at 17:52

16

Solved

I want to read just a connection string from a configuration file and for this add a file with the name "appsettings.json" to my project and add this content on it: { "ConnectionStrings": { "Defa...
Syllogism asked 22/8, 2016 at 15:26

10

Solved

First of all my main purpose is to setup the IP and Port for my application dynamically. I'm using IConfiguration to inject a json config file, like some tutorial mentioned. However, I can't retr...
Sellars asked 19/1, 2017 at 9:54

13

When I create a new ASP .NET Core Web-Application, I can right-click the project in Visual Studio, and I see a context-menu entry called "Manage User Secrets". When I create a new .NET Core Conso...
Micrococcus asked 16/2, 2017 at 8:11

24

Solved

I've done this before with MVC5 using User.Identity.GetUserId() but that doesn't seem to work here. The User.Identity doesn't have the GetUserId() method. I am using Microsoft.AspNet.Identity.

13

Solved

I've just swapped our project from ASP .Net Core 1.0.0-rc2-final to 1.0.0. Our website and client have stopped working because of the capitalization of JSON properties. For example, this line of Ja...
Vestibule asked 5/7, 2016 at 11:15

2

Solved

I have a custom ASP.NET Core middleware and I want to retrieve the cancellation token for the request. I tried to add it to the signature of the invoke like this: public async Task Invoke(HttpConte...

13

Solved

I have a problem with ASP.NET Core web application running on IIS 10. I am developing a Single Page Application with AngularJS. The index.html loads perfectly but the backend requests are failing ...
Supernal asked 22/7, 2016 at 14:35

1

If I build a Web API Project in Asp.Net Core 1.x, and I want to build the front-end in the same Project or Solution, is it possible to create front-end pages and use Razor with Visual Studio's Inte...

5

In my ASP.NET Core 1.0, MVC6, EF7 web application, I'm adding a migration that adds a new related table (& corresponding model). I have the following model snapshot: [DbContext(typeof(Applicat...
Choirboy asked 29/1, 2016 at 0:42

3

Solved

If I've installed the latest version of the .NET Core Runtime (as of now, that's version 2.2.3): https://dotnet.microsoft.com/download/dotnet-core/2.2 Is that one installation backwards-compatibl...
Virgilio asked 29/3, 2019 at 4:12

15

Solved

On a global level in .NET Core 1.0 (all API responses), how can I configure Startup.cs so that null fields are removed/ignored in JSON responses? Using Newtonsoft.Json, you can apply the following...
Agential asked 16/6, 2017 at 17:35

6

Solved

According to the documentation: The runtime doesn’t look up localized strings for non-validation attributes. In the code above, “Email” (from [Display(Name = "Email")]) will not be localized. ...

14

Solved

I'm having this problem: No service for type 'Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionaryFactory' has been registered. In asp.net core 1.0, it seems that when the action try to render...
Gauldin asked 1/8, 2016 at 23:22

10

Solved

Let's say I have a controller that uses attribute based routing to handle a requested url of /admin/product like so: [Route("admin/[controller]")] public class ProductController: Controller { /...

3

Solved

I'm trying to save a file on disk using this piece of code. IHostingEnvironment _hostingEnvironment; public ProfileController(IHostingEnvironment hostingEnvironment) { _hostingEnvironment = host...
Hypoderma asked 4/9, 2016 at 22:37

4

Solved

The source code: @{ ViewBag.Title = "سلام علیک"; } <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=u...
Curculio asked 25/10, 2016 at 6:37

2

Solved

In Asp.Net Core if a custom piece of middleware is created and placed in it's own class how does one get access to IHostingEnvironment from inside the middleware? For example in my class below I t...
Thermoluminescent asked 12/12, 2016 at 19:26

4

Solved

In ASP.NET Core RC 1 I used the following code to retrieve the value of context (full address of the page). Then I recorded this value in the configuration. public class Startup { public IConfigur...
Artillery asked 4/7, 2016 at 12:16

12

According to ASP.NET Core documentation the method HttpContext.Authentication.SignOutAsync() must delete the authentication cookie as well. Signing out To sign out the current user, and delete the...
Lacker asked 13/12, 2016 at 13:13

26

Solved

I am trying to write my connection string in my appsettings.json file and bring it into my startup file but I keep getting a Value cannot be null. Parameter name: connectionString. I have been usin...
Apodal asked 29/11, 2016 at 19:53

13

Solved

In previous versions of asp.net, we could use @Request.Url.AbsoluteUri But it seems it's changed. How can we do that in asp.net core 1.0?
Supervisor asked 18/7, 2016 at 12:41

5

In similar questions, with this code works to download a PDF: I'm testing with local files (.xlsx, .pdf, .zip) inside the Controller folder. Similar Question Here [HttpGet("downloadPDF")] pub...
Kinnikinnick asked 10/8, 2016 at 15:6

© 2022 - 2024 — McMap. All rights reserved.