Where are the build logs for an azure app service? - azure

D:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed.
Now, I know what to do if this error message had come from Visual Studio: Found conflicts between different versions of the same dependent assembly that could not be resolved
The problem is that this error message comes from drilling into "Logs" in the Deployment Centre of my Azure web app (from clicking "Show Logs..." next to "Running deployment command..." I can't figure out where these reference conflicts are listed for an Azure app service despite trying to turn on as much logging as possible and searching for a solution to this problem.
Could someone please show me where to go to see where these conflicts are listed in an Azure app service? Where is the build log? How do I turn it "on"?
EDIT: I just found this: What is the default location for MSBuild logs?. I don't know if it applies to Azure.
Update:
The code is being continuously pulled into my Azure app from my Azure DevOps repository whenever I push a new code change. It's building (which includes compiling) on the server, somewhere. I just don't think there's any way to actually see the build logs. In Visual Studio, all we have is the output window, and there's no equivalent on the server.

Update:
Before viewing logs on Azure, be aware that azure-web-sites do not provide compilation capabilities, so compilation-related warnings and errors are not displayed in the logs. Azure's log feature is used to track runtime warnings or run-time errors, not compile-time.
Since you have deployed to Azure, please have a look of this:
Log stream:
From your description, you need to change the assembly which is mismatch with others.
If you still can't resolve this problem, please add the error and the assembly you used in your app service to this question text.

Related

Object removed from assembly still referred to after deploy to Azure, local is fine

ASP.NET Core 2.1
We have a shared dll, that is used in a few projects (via project reference)
We have class in that was named Proofer, and is now named ProofReader.
This was done through mass find and replace.
Nowhere in our source files locally exists any files containing the text Proofer.
VSTS builds the application without issue, then we send it via a release pipeline to Azure. All succeed.
Despite this we attempt to run the web app and get the following:
An unhandled exception occurred while processing the request.
TypeLoadException: Could not load type
'MainShared.Models.Proofer' from assembly 'MainShared,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
System.Reflection.CustomAttribute._CreateCaObject(RuntimeModule
pModule, IRuntimeMethodInfo pCtor, Byte** ppBlob, Byte* pEndBlob,
Int32* pcNamedArgs)
We are having trouble determining if this is in the build, maybe something not being rebuilt when it should be, or something still cached on Azure that isn't being overwritten.
A few places I can suggest you look into -
If you are using app service web apps in azure , we can use the kudu (web app extension to remove/clean the files) to make sure you have a clean destination.
Check the VSTS Release logs if you have access to , it shows the files which are overwritten and the ones which could not be. Once i had a similar issue and found that the logs were already warning me that a few could not be overwritten.
If you are using VM's for your app deployment if has access to it , remove/backup the files under your site folder.
I had a similar problem after some redesign for a Web App using ASP.NET Core 2.2 (hosted on Azure), that some old not even anymore existing references causing the Load type exceptions to happen and the Web App simply refused to come up. I tried to clean everything up in Visual Studio, even deleted the bin and object directories, but the old reference was still looked for. In Kudu on the Azure portal I saw the *.PrecompiledViews.dll and *.PrecompiledViews.pdb files, which were very old. I simply removed them directly on the Azure server and could then simply start up my app and everything came up again. This fault should be fixed from the source. If I do a complete rebuild, I expect this old garbage to be taken care of during the publishing to the website. This is something that Microsoft should fix and as I can see this happened to others over half a year ago. Thanks Mark Johnson for your very useful hint about those files!

Why does my Umbraco installation from within the Azure Marketplace always fail?

I am trying to install Umbraco by using the Azure Marketplace. There they offer a template for it. I am always receiving the error below. I tried to install it a couple of times now but I always get the same error.
Does anybody know what this error message means? Is anybody able to install Umbraco by using the template in the Azure Marketplace?
]
You're asking 2 questions above.
Please see my answers and proposed troubleshooting guide/workaround below:
The error message means that the MSDeploy process failed due to some error which renders it unable to deploy the web deploy package for your Umbraco web app.
Yes I am able to provision a Umbraco web app from the Azure Market successfully (Location: Central US) and couldn't reproduce your issue
Troubleshooting Guide:
Append .scm in front of the azurewebsites.net of your Umbraco Web App as shown below and go to the Url.
Click on the Diagnostic Dump. You will be prompted to download a .zip file
Extract the zip file. You should see 2 folders at root level
Go into
LogFiles\SiteExtensions\MSDeploy
You should see the detail log files for MSDeploy
Detailed MSDeploy log messages are in the appManagerLog.xml file.
If it is related to client side issue which can be resolved by yourself, you can try to resolve it and try again.
If it is related to server side issue, you should create a support ticket for Microsoft to look into with the detailed MSDeploy log which pinpoints the root cause which will help them a lot.
Hope this is useful.
A Microsoft employee confirmed this is a bug in the application currently. I have to wait for a fix.
I have encountered numerous problems with the Azure installer of Umbraco, try setting it up in VS2015 then publishing it to Azure. I have found that this works well.

How to further debug a 500 Internal Server Error after upgrade to ASP.NET 5 beta5

I had a site running asp.net 5 beta4, and decided to upgrade to beta5. The site runs locally fine. I pushed the changes to master and it was picked up from bitbucket and deployed successfully.
When I try to hit the site in azure, I get a 500 Internal Server Error. I've tried a number of things, but can't seem to track down the root cause of the failure. I'm looking for suggestions as I'm hitting a wall. From what I've tried below it seems like some fundamental initialization is failing.
Here's what I've tried:
Enabling customerrors="off". I added a web.config to the wwwroot folder with system.web/customErrors mode="Off". I've verified that the web.config is populated correctly in the deployed wwwroot and had the appsettings containing the dnxversion etc merged correctly.
Customizing the custom error page, adding runtimeinfo. I have the following set in my Startup.cs:
app.UseErrorHandler("/Home/Error");. I also have set the error page to display the exception. This doesn't seem to be hit.
Attached to the remote process to debug. Visual studio eventually freezes, so haven't gotten anywhere with this.
Enabled application insights. This registers events when I debug locally, but doesn't capture anything from the azure instance.
Enabled application logs and request failure tracing. The detailed errors show a 500.0, without much detailed information.
Imgur
Imgur
I've also verified through the console that the runtime is set correctly to beta5.
Update:
I set the ASPNET_ENV to Development and it loaded with appsettings loaded via the azure portal. Setting ASPNET_ENV to something else isn't working. I also removed any custom code from startup.cs pertaining to the non-development environments, with no help. I'm still looking for a means of capturing the original error.
Assuming you are targeting DNX451 and not dnxcore50, there is a good chance Azure it still trying to run it against the beta4 runtime instead of beta5. If that's the case, you won't get a decent error message.
Try adding an environment variable in Azure "SCM_DNX_VERSION" and set it to 1.0.0-beta5. It looks like kudu was recently upgraded to support beta5 https://github.com/projectkudu/kudu/commit/55175a017779bf493ff8e6ce87b96dd1451f7d7b, so you might want to try to redeploy from bitbucket in the case that the Kudu team has already deployed this change.
For a little more detail, you can check out my previous answer (although it is very dated and references the old "K" names) here:
Deploying ASP.NET vNext beta 2 on Azure with Kudu
Every time you update to a new beta, you will have to update your SCM_DNX_VERSION environment variable.

object reference not set to an instance of an object error coming when deployin to cloud

Locally the project works perfectly.
It is executing and there are proper entries in database.
But when I am deploying it to cloud at staging it is giving me this error as object reference not set to an instance.
My project requires 2 instances of each web and worker role but since I have a limited edition to free instances I am using only 2. one each. Can that be a problem ?
I am using SDK 1.8
It is ASP.Net project.
Can anyone suggest me how to resolve this issue ?
I had a similar issue where I was getting the following when publishing from Visual Studio 2013 to my Azure Cloud Service with a web role and a worker role. This occurred after upgrading the project from Azure SDK v2.4 to v2.5:
2:41:59 PM - Applying Diagnostics extension.
2:42:01 PM - Object reference not set to an instance of an object.
Even after working with a Microsoft Developer I could not get it to show me any kind of stack trace to indicate where the null was coming from. He just happened to notice something funny in my cloud configuration under the "Roles" folder that looked strange.
The problem was that the diagnostics.wadcfgx is needed for an SDK 2.5 project, whereas before that version the diagnostics.wadcfg is needed. (Note the "x" in the file extension.) Apparently the worker role did not have this file automatically created when the project was upgraded.
In order to fix this particular issue, just right click on the role (in the roles folder under cloud configuration) and select "Add Diagnostic Configuration", then Build the solution and attempt to publish. These diagnostics files are ONLY needed when publishing directly from Visual Studio.
I haved same error today, after upgrading Azure SDK to version 2.5
I'm add configuration diagnostics to each role in service and the error disappeared
Had this with MS Azure Tool 2.9. Turned out that it needed the following in diagnostics.wadcfgx :
<PrivateConfig xmlns="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration">
<StorageAccount endpoint="" />
</PrivateConfig>
Hope it helps someone!
I ran into the same issue when upgrading to 2.5. It created the .wadcfgx files and they looked sensible but deployment via Visual Studio would still fail with the same error.
Applying Diagnostics extension.
Object reference not set to an instance of an object.
Package deployment would still work. I was able to get past it via the following steps.
Delete the generated .wadcfgx files
Have Visual Studio regenerate them via the context menu option on the role.
Doing a clean build and redeploying.
I'd love to know what the actual error was and how to get more details. The messaging is pretty terrible.

Error Deploying New Relic Instrumented Site to Azure from Github & VS.NET

I am getting the following error:
Error: The process cannot access the file 'C:\DWASFiles\Sites\mywebsitename\VirtualDirectory0\site\wwwroot\newrelic\NewRelic.Agent.Core.dll' because it is being used by another process.
In the Running deployment command... log file when attempting to deploy an Azure website from Github.
Would appreciate any pointers as to what could be causing this.
UPDATE: Turns out this is also failing when publishing directly from VS.NET with the following:
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(4196,5): Warning : An error was encountered when processing operation 'Create File' on 'NewRelic.Agent.Core.dll'.
1>Retrying operation 'Update' on object filePath (mywebsitename\newrelic\NewRelic.Agent.Core.dll). Attempt 1 of 2.
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(4196,5): Error : Web deployment task failed. ((06/07/2013 23:54:58) An error occurred when the request was processed on the remote computer.)
This was working before and I am not sure why it would have stopped.
NewRelic recommend stopping the website to unload the file and allow the deployment to go through.
As an alternative, you can set COR_ENABLE_PROFILING to 0 in your app settings on the configure tab to temporarily disable the profiling, which should then allow you to continue with the deployment while leaving the website operational throughout.
Instead of stopping the website you can temporarily turn off New Relic monitoring via the Configure tab on manage.windowsazure.com:
Configure > developer analytics > select "OFF" > Save
Deploy
Configure > developer analytics > select "ADD-ON" > Choose Add-on from dropdown > Save
Worked for me, both with a regular deployment from VS and an automatic build from VSO.
This is a known issue with the New Relic .NET agent for Azure Websites when performing an upgrade of the agent. The workaround is to stop the website to release the dll, finish the deployment and then restart the instance.
https://newrelic.com/docs/dotnet/azure-web-sites#h2-1
Not really a solution but more of a work-around, in the publish dialog view a preview of the changes and uncheck the NewRelic.Agent.Core.dll file so that it doesn't get published.
None of these answers work for me anymore. I have an Azure Basic tier website plan, which hosts multiple actual websites.
If I don't stop the website, I get the error mentioned above (newrelic.agent.core.dll is in use)...
If I do stop the website (or all of them), I get an error saying that the publishing endpoint isn't available.
If I go to the configure tab and disable the AddOn, we still get the error mentioned above (newrelic.agent.core.dll is in use)...
Pretty much we just republish over and over again with different permutations of the above until if works. It took me hours the other day, took me 10 minutes today.
If you are using webdeploy, then you can configure your webdeploy settings so that it ignores the file. However, if you do that, you will manually have to deploy any updates to the new relic agent.
I had a similar issue with the new relic log file being locked, and solved it by:
Moving the new relic log file to a subdirectory of the web root (e.g. \newreliclogs)
Adding 2 lines to my powershell script that configured the skip directive to ignore that whole directory. e.g. (where destBaseOptions is of type Microsoft.Web.Deployment.DeploymentBaseOptions
$skipDirective = new-object Microsoft.Web.Deployment.DeploymentSkipDirective("NewRelicLog","objectName=dirPath,absolutePath=.*\newreliclogs$")
$destBaseOptions.SkipDirectives.Add($skipDirective)
Depending on how you are using webdeploy, the configuration is achieved slightly differently, I used the following links to help me piece it together:
https://technet.microsoft.com/en-us/library/dd569089(WS.10).aspx
https://msdn.microsoft.com/en-us/library/microsoft.web.deployment.deploymentskipdirective(v=vs.90).aspx
https://msdn.microsoft.com/en-us/library/dd543313(v=vs.90).aspx
http://blogs.iis.net/jamescoo/archive/2009/11/03/msdeploy-api-scenarios.aspx
http://forums.iis.net/p/1192163/2031814.aspx#2031813
And I used the powershell script from the Octopus Deploy Library at https://library.octopusdeploy.com/#!/step-template/actiontemplate-web-deploy-publish-website-(msdeploy).

Resources