I recently deployed a CoreCLR application to Azure and I clicked the button to "Enable Application Insights monitoring". Azure web UI now shows "Application insights extension is already installed" for my application. However, no data is showing up. The primary suspect of course is the fact that I am using coreclr.
So the question is, does the Application Insights Extension work with coreclr apps? It is an API App built on MVC if that matters.
global.json:
{
"sdk": {
"version": "1.0.0-rc1-update2",
"runtime": "coreclr"
}
}
I would not expect that Web App Extension will work for Core CLR project, there is a separate AI nuget to instrument the project in the development time.
The instructions for AI in ASP.NET core projects are on GitHub here.
Related
When i deploy the application from Visual Studio to Azure app service using Framework/Runtime dependent mode, then app service run properly.
But when application is deployed using CICD (using VSTS), then app service fails with above mentioned error in title and following error is logged in stdout log files :
Error:
An assembly specified in the application dependencies manifest (App.deps.json) was not found:
package: 'System.Diagnostics.PerformanceCounter', version: '4.5.0'
path: 'runtimes/win/lib/netcoreapp2.0/System.Diagnostics.PerformanceCounter.dll'
But the dll is present in mentioned path under .netcoreapp2.0.
I am publishing the application using VSTS agent.
If i restart the app service then it works fine.
This is one of those errors that can come up for a thousand unrelated reasons. -Everytime- I get this error it's because I've upgraded Nuget packages in my project and one of those packages uses a version of the .Net Core SDK I haven't installed locally. I suspect since you're using the Framework dependent mode it could be an issue if it sandboxes you away from other SDK's (not sure if it does, just thinking out loud).
Make sure your .Net Core SDK's are up to date.
Try publishing it and sending the whole framework with it if you're using .Net Core as the backend (and not the old framework).
Check your NuGet's and make sure they're all supported on the framework you're specifying. I've seen cases where a 4.5 framework assembly 'might' work locally but then error out on the server. If one of them targets an SDK that isn't on the server you'll get this.
https://www.blakepell.com/asp-net-core-http-error-502-5-ancm-out-of-process-startup-failure
Since it works fine when you restart the app service, you could add a Azure App Service manage task to restart Azure App Service in your pipeline:
steps:
- task: AzureAppServiceManage#0
displayName: 'Restart Azure App Service'
inputs:
azureSubscription: azureSubscriptionName
Action: 'Restart Azure App Service'
WebAppName: AppServiceName
It seems that the first time you try to run, your application can not find this .dll that is required on the server. What you can do is to add this in your .csproj file:
<PropertyGroup>
<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
</PropertyGroup>
Adding the above snippet will export all DLLs needed to run the application (assuming SDK is not available, and runtime is quite lightweight to contain non essential libraries).
I have a React app on Visual Studio code which is referencing the Azure web app of my Asp.Net MVC (Web Api) application. The MVC application is a .NET Framework 4.7 project on Visual Studio 2017.
In simple words, My react app on visual studio code is consuming the azure web which was published successfully from my visual studio 2017 project. This React app works good on local host and is able to GET/POST details by accessing the azure web app.
In order to host this React app as an azure web app, I deployed it to a new azure web app through azure extensions from visual studio code (This was done in the same resource group where the mvc web app exist). But after the react app got deployed, I could'nt see any thing on my browser except the message - 'You do not have permission to view this directory or page'.
Please Note, In my react app, there was no web.config. I referenced this article (https://www.c-sharpcorner.com/article/crud-operations-in-reactjs-with-axios-using-web-api-and-sql-server/) to build the react app.
I would like to know - What is missing here ? Am I doing anything wrong with the deployment ? Any help will be much appreciated.
Here's what i did to solve my problem:
Created the production build by executing 'npm run build' command. A build folder got generated in the solution with some meta data files.
Referenced the build folder while deploying the react app to azure.
References used:
https://medium.com/#to_pe/deploying-create-react-app-on-microsoft-azure-c0f6686a4321
I have an asp.net core web api (asp.net core 2.2.6) published on a IIS local website. I have a few controllers that I'm trying to debug.
I saw on the website (docs.microsoft) that I should no longer attach the debugger to w3p.exe but to dotnet.exe instead.
The problem is that when I'm in Visual Studio (2017) I try to attach to a running process and the dotnet.exe is not visible, I cannot see it but it's correctly installed (ProgramFiles/dotnet/dotnet.exe) and I already uninstall/install .net core a few times and launch VS under admin mode but it did not work.
Does someone have an idea about this problem?
Thanks for reading,
Lio
I am trying to deploy an asp.net web app from BitBucket to an Azure web app and getting the below error:
Command: "D:\home\site\deployments\tools\deploy.cmd"
Handling ASP.NET Core Web Application deployment with MSBuild.
MSBuild auto-detection: using msbuild version '14.0' from 'D:\Program Files (x86)\MSBuild\14.0\bin'.
Restoring packages for D:\home\site\repository\src\Sertech\project.json...
Committing restore...
Lock file has not changed. Skipping lock file write. Path: D:\home\site\repository\src\Sertech\project.lock.json
D:\home\site\repository\src\Sertech\Sertech.xproj
Restore completed in 1753ms.
NuGet Config files used:
C:\DWASFiles\Sites\#1SertechWebApp\AppData\NuGet\NuGet.Config
Feeds used:
https://api.nuget.org/v3/index.json
Cannot find DNX runtime dnx-clr-win-x86.1.0.0-rc1-update1 in the folder: .dnx\runtimes
D:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets(248,5): error MSB4044: The "GetBuildOptions" task was not given a value for the required parameter "RuntimeToolingDirectory". [D:\home\site\repository\src\Sertech\Sertech.xproj]
Failed exitCode=1, command="D:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" "D:\home\site\repository\Sertech.sln" /nologo /verbosity:m /p:deployOnBuild=True;AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release;UseSharedCompilation=false;publishUrl="D:\local\Temp\8d3d203fca67f23"
An error has occurred during web site deployment.
\r\nD:\Program Files (x86)\SiteExtensions\Kudu\57.50831.2397\bin\Scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"
The Publish Web option in Visual Studio works just fine, the issue only happens from a BitBucket deployment.
What I've tried so far in no particular order:
Use custom deployment script I found while searching the issue.
Use custom deployment script downloaded from the Kudu page of my
Azure web app.
Change the SDK version in VS.
Install the dnx-clr-win-x86 nuget package locally.
Install the dnx-clr-win-x86 nuget package on the web app resource
using the Azure console (this failed to find a package).
If anybody can point me in the right direction for troubleshooting further or has a solution I would be very thankful.
DNX? RC1? A release candidate isn't quite RELEASED software. Just as The Donald isn't the president just because he's a candidate (well at least not as of this writing).
ASP.NET 5.0 betas, Core 1.0 RC1 and Core 1.0 RC2 are no longer supported in Azure App Service.
Admittedly this was announced in a blog post so visibility may suffer - https://blogs.msdn.microsoft.com/waws/2016/06/14/supporting-asp-net-5-core-rc1-on-azure-app-service/
Is ASP.NET 5, Core RC1, RC2 supported on Azure App Service?
No, ASP.NET 5, Core RC1 or RC2 is no longer supported on Azure App Service. The only supported ASP.NET Core stack is RTM on Azure App Service. Check the newly announced RTM version at https://blogs.msdn.microsoft.com/appserviceteam/2016/06/27/azure-app-service-and-asp-net-core/
No wonder you see things breaking. Upgrade your project to ASP.NET Core 1.0 RTM and redeploy.
Official migration guide here:
https://docs.asp.net/en/latest/migration/rc1-to-rtm.html
Is it possible to deploy an ASP.NET vNext web application to Azure Cloud Services? And if yes, does it matter if it's build on the aspnet50 or the aspnetcore50 framework?
The Azure Cloud Service Visual Studio template, even in 2015 CTP seems to support only .NET Framework 4.x.
It's not supported yet but if you really want to you can do something like create a worker role setup script (which installs the kvm, kre etc.), then follow steps like this http://www.codeproject.com/Articles/331425/Running-an-EXE-in-a-WebRole-on-Windows-Azure to run it and bootstrap your aspnetcore50 app. It's not pretty or easy but it's the only way to run ASP.NET 5.0 stuff in a worker role at the moment.