Skip to main content

All 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(...
Luis Valencia's user avatar
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 ...
JKLM's user avatar
  • 1,510
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 ...
Brian's user avatar
  • 7,056
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, ...
Siva999's user avatar
  • 11
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/...
Abhilash Gopalakrishna's user avatar
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"; } &...
K K's user avatar
  • 1
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 ...
Renato 's user avatar
  • 119
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" /> &...
Parth Akbari's user avatar
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 ...
Waxren's user avatar
  • 2,102
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 ...
S.K.'s user avatar
  • 173
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....
Ehi's user avatar
  • 57
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, ...
Norbini's user avatar
  • 81
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 ...
Norbini's user avatar
  • 81
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 ...
BanksySan's user avatar
  • 28.2k
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 ...
HLourenco's user avatar
  • 388

15 30 50 per page