All Questions
16
questions
0
votes
1
answer
475
views
How to get app insights working on an azure webjob with .net core 2.x?
I have a webjob with .net core 2.1
I have an instrumentation key on the appsettings.json.
and I have this on the method ConfigureServices in program.cs
services.AddApplicationInsightsTelemetry(...
2
votes
2
answers
7k
views
How do I run/trigger service in startup.cs?
I have a service which grabs the token and save in cache, I added service like below, but it's not running when the app starts what do I need to do to trigger this service on startup
public void ...
0
votes
1
answer
113
views
Using strongly typed Razor views with view models loaded at runtime
I would like to be able to use strongly-typed Razor views with models and controllers loaded at runtime. The assemblies are loaded during application startup in ConfigureServices via ...
1
vote
1
answer
229
views
.Net core Application Development in Windows using VS 2017 and Hosting in Mac os and Linux
I was new to .Net core and on googling i got that it was used to develop an .net application that can run in corss platform other than windows i.e. Linux, Mac Osx.
I was having few questions on this, ...
6
votes
1
answer
10k
views
Asp.net Core 2.0 Static files not found error
I am trying to create an ASP.net Core 2.0 web application; I have placed the static files in a folder called Content.
I am giving the following path:
<link href="@Url.Content("../Content/...
0
votes
1
answer
2k
views
How to pass model list to controller [duplicate]
I am trying to post a list of objects from View to controller.
Below is my code:
View :
@using Models
@model IList<Add>
@{
ViewData["Title"] = "AddNewFields";
}
&...
2
votes
0
answers
878
views
Printing with aspt.net core
I need to make print content using ASP.NET core.
I was thinking of embedding on the client side, but in a web search, it seems to me that it is not a good option, because this printing should be done ...
0
votes
1
answer
1k
views
JSON base routing in .net Core
Previously in ASP.NET MVC
<routes>
<add name="VehicleDetailRoute" url="TwoWheeler/VehicleDetail/{id}">
<defaults controller="Integration" action="VehicleDetail" id="Optional" />
&...
66
votes
4
answers
49k
views
Run a background task from a controller action in ASP.NET Core
I am developing a web application with a REST API using C# with ASP.NET Core 2.0.
What I want to achieve is when the client send a request to an endpoint I will run a background task separated from ...
5
votes
0
answers
411
views
How To Create The New Areas As Separate Project In .Net Core 2.0 MVC
I have tried to create simple .net core 2.0 project using areas in separate projects. There is some articles, but for mvc 5. I have tried to create new .net core 2.0 project different than the main ...
0
votes
0
answers
203
views
css does not work in .net core
My css files dont work after I publish my site in .net core
I have registered my static folder which is lib under the wwwroot, and despite deleting all files and rebuilding it, it still does not work....
1
vote
1
answer
2k
views
How to fail gracefully if custom configuration settings are not present/valid during ASP.NET Core 2 application startup (hosted in a Windows Service)?
I'm implementing a Web API using ASP.NET Core 2 (targeting .NET Framework 4.6.1) which is hosted in a Windows Service.
I've started with the example in Host an ASP.NET Core app in a Windows Service, ...
7
votes
1
answer
956
views
Is it possible/sensible to split ASP.Net Core 2 (.NET Framework) Web Api into Class Library and Hosting projects?
I'm trying to port an existing WCF Web API (targeting .NET Framework 4.6.1) to ASP.Net Core 2 using Visual Studio 2017 (v15.4.5) and am having trouble figuring out good/common/supported ways to ...
6
votes
2
answers
1k
views
Can Razor pages go in any other directory then Pages?
With the new Razor Pages in ASP.NET Core, if the Pages folder special, like the Controllers folder is or can one configure it to use another directory?
I'm not suggesting that I'd want to, just ...
1
vote
2
answers
4k
views
netcore2 authentication with Azure Active Directory: "The signature is invalid"
I have a webapi and I need to have authentication, I'm doing this with AAD in V1.
I have all set, with postman I can get a token, but, whenever I try to make a request to the api, it gives me the ...