使用VS 2019将.NET Core 3.1 web应用发布到Azure应用程序服务Linux,显示欢迎屏幕
我正在尝试使用Visual Studio 2019在Azure应用程序服务Linux上部署我的.NET Core 3.1 MVC web应用程序。部署后,我所能看到的就是下面显示的欢迎屏幕 我检查了一些SO链接,这些链接要求我检查http://{app name}.scm.azurewebsites.net上是否存在文件,我确认这些文件存在。检查下面的图片 我还在我的应用程序服务配置页面上添加了正确的启动命令 编辑 进一步挖掘,我从Azure中发现了以下错误日志文件使用VS 2019将.NET Core 3.1 web应用发布到Azure应用程序服务Linux,显示欢迎屏幕,azure,asp.net-core,azure-web-app-service,webdeploy,Azure,Asp.net Core,Azure Web App Service,Webdeploy,我正在尝试使用Visual Studio 2019在Azure应用程序服务Linux上部署我的.NET Core 3.1 MVC web应用程序。部署后,我所能看到的就是下面显示的欢迎屏幕 我检查了一些SO链接,这些链接要求我检查http://{app name}.scm.azurewebsites.net上是否存在文件,我确认这些文件存在。检查下面的图片 我还在我的应用程序服务配置页面上添加了正确的启动命令 编辑 进一步挖掘,我从Azure中发现了以下错误日志文件 2020-03-11T
2020-03-11T20:19:14.263485764Z _____
2020-03-11T20:19:14.263521665Z / _ \ __________ _________ ____
2020-03-11T20:19:14.263527465Z / /_\ \___ / | \_ __ \_/ __ \
2020-03-11T20:19:14.263531865Z / | \/ /| | /| | \/\ ___/
2020-03-11T20:19:14.263535966Z \____|__ /_____ \____/ |__| \___ >
2020-03-11T20:19:14.263540366Z \/ \/ \/
2020-03-11T20:19:14.263544466Z A P P S E R V I C E O N L I N U X
2020-03-11T20:19:14.263548466Z
2020-03-11T20:19:14.263552066Z Documentation: http://aka.ms/webapp-linux
2020-03-11T20:19:14.263555866Z Dotnet quickstart: https://aka.ms/dotnet-qs
2020-03-11T20:19:14.263559566Z ASP .NETCore Version: 3.1.0
2020-03-11T20:19:14.263563267Z Note: Any data outside '/home' is not persisted
2020-03-11T20:19:14.438520438Z Running oryx -appPath /home/site/wwwroot -output /opt/startup/startup.sh -defaultAppFilePath /defaulthome/hostingstart/hostingstart.dll -bindPort 8080 -userStartupCommand ''
2020-03-11T20:19:14.654004939Z Oryx Version: 0.2.20191105.2, Commit: 67e159d71419415435cb5d10c05a0f0758ee8809, ReleaseTagName: 20191105.2
2020-03-11T20:19:14.661143991Z Cound not find build manifest file at '/home/site/wwwroot/oryx-manifest.toml'
2020-03-11T20:19:14.661606007Z Could not find operation ID in manifest. Generating an operation id...
2020-03-11T20:19:14.662016422Z Build Operation ID: e539cda2-065a-4380-8443-113a8833110a
2020-03-11T20:19:16.245422274Z Writing output script to '/opt/startup/startup.sh'
2020-03-11T20:19:16.918107003Z Trying to find the startup DLL name...
2020-03-11T20:19:16.918873230Z Found the startup D name: BHD.Web.dll
2020-03-11T20:19:16.918885630Z Running the command: dotnet "BHD.Web.dll"
2020-03-11T20:19:21.158001162Z Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.AspNetCore.Razor.Runtime, Version=3.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
2020-03-11T20:19:21.158026363Z
2020-03-11T20:19:21.158031663Z File name: 'Microsoft.AspNetCore.Razor.Runtime, Version=3.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
2020-03-11T20:19:21.158036463Z at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
2020-03-11T20:19:21.158041063Z at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
2020-03-11T20:19:21.158045763Z at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(MetadataToken caCtorToken, MetadataImport& scope, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder`1& derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
2020-03-11T20:19:21.158052864Z at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder`1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder`1 derivedAttributes)
2020-03-11T20:19:21.158063864Z at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType)
2020-03-11T20:19:21.158068564Z at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType)
2020-03-11T20:19:21.158072864Z at System.Reflection.RuntimeAssembly.GetCustomAttributes(Type attributeType, Boolean inherit)
2020-03-11T20:19:21.158076964Z at System.Attribute.GetCustomAttributes(Assembly element, Type attributeType, Boolean inherit)
2020-03-11T20:19:21.158081065Z at System.Attribute.GetCustomAttribute(Assembly element, Type attributeType, Boolean inherit)
2020-03-11T20:19:21.158085265Z at System.Reflection.CustomAttributeExtensions.GetCustomAttribute[T](Assembly element)
2020-03-11T20:19:21.158089465Z at Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartFactory.GetApplicationPartFactory(Assembly assembly)
2020-03-11T20:19:21.158094665Z at Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartManager.PopulateDefaultParts(String entryAssemblyName)
2020-03-11T20:19:21.158098965Z at Microsoft.Extensions.DependencyInjection.MvcCoreServiceCollectionExtensions.GetApplicationPartManager(IServiceCollection services)
2020-03-11T20:19:21.158103165Z at Microsoft.Extensions.DependencyInjection.MvcCoreServiceCollectionExtensions.AddMvcCore(IServiceCollection services)
2020-03-11T20:19:21.158107265Z at Microsoft.Extensions.DependencyInjection.MvcServiceCollectionExtensions.AddControllersCore(IServiceCollection services)
2020-03-11T20:19:21.158111866Z at Microsoft.Extensions.DependencyInjection.MvcServiceCollectionExtensions.AddControllersWithViewsCore(IServiceCollection services)
2020-03-11T20:19:21.158115966Z at Microsoft.Extensions.DependencyInjection.MvcServiceCollectionExtensions.AddControllersWithViews(IServiceCollection services)
2020-03-11T20:19:21.158120066Z at Microsoft.Extensions.DependencyInjection.MvcServiceCollectionExtensions.AddMvc(IServiceCollection services)
2020-03-11T20:19:21.158124266Z at Microsoft.AspNetCore.Identity.IdentityBuilderUIExtensions.AddRelatedParts(IdentityBuilder builder)
2020-03-11T20:19:21.158128466Z at Microsoft.AspNetCore.Identity.IdentityBuilderUIExtensions.AddDefaultUI(IdentityBuilder builder)
2020-03-11T20:19:21.158132666Z at BHD.Web.Startup.ConfigureServices(IServiceCollection services) in C:\Priyank\Projects\ServiceBerry\Sourcecode\BHD.Web\Startup.cs:line 36
2020-03-11T20:19:21.158137267Z at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
2020-03-11T20:19:21.158141367Z at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
2020-03-11T20:19:21.158145567Z at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.InvokeCore(Object instance, IServiceCollection services)
2020-03-11T20:19:21.158152667Z at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass9_0.<Invoke>g__Startup|0(IServiceCollection serviceCollection)
2020-03-11T20:19:21.158157267Z at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.Invoke(Object instance, IServiceCollection services)
2020-03-11T20:19:21.158161567Z at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass8_0.<Build>b__0(IServiceCollection services)
2020-03-11T20:19:21.158166368Z at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.UseStartup(Type startupType, HostBuilderContext context, IServiceCollection services)
2020-03-11T20:19:21.158170568Z at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass12_0.<UseStartup>b__0(HostBuilderContext context, IServiceCollection services)
2020-03-11T20:19:21.158175068Z at Microsoft.Extensions.Hosting.HostBuilder.CreateServiceProvider()
2020-03-11T20:19:21.158179168Z at Microsoft.Extensions.Hosting.HostBuilder.Build()
2020-03-11T20:19:21.158183268Z at BHD.Web.Program.Main(String[] args) in C:\Priyank\Projects\ServiceBerry\Sourcecode\BHD.Web\Program.cs:line 16
2020-03-11T20:19:21.158187668Z
2020-03-11T20:19:21.177212339Z
2020-03-11T20:19:21.207111394Z ptrace(ATTACH, 29) FAILED Operation not permitted
2020-03-11T20:19:21.207772817Z Writing minidump with heap to file /home/logs/dumps/coredump.519bbab76c1d.29.1583957954
2020-03-11T20:19:21.618304499Z /opt/startup/startup.sh: line 12: 29 Aborted (core dumped) dotnet "BHD.Web.dll"
2020-03-11T20:19:14.263485764Z
2020-03-11T20:19:14.263521665Z/uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
2020-03-11T20:19:14.263527465Z/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
2020-03-11T20:19:14.263531865Z/| \/| \/| \/| \/| \/|
2020-03-11T20:19:14.263535966Z\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
2020-03-11T20:19:14.263540366Z\/\/\/
2020-03-11T20:19:14.263544466Z A P P S E R V I C E O N L I N U X
2020-03-11T20:19:14.263548466Z
2020-03-11T20:19:14.263552066Z文档:http://aka.ms/webapp-linux
2020-03-11T20:19:14.263555866Z Dotnet快速启动:https://aka.ms/dotnet-qs
2020-03-11T20:19:14.263559566Z ASP.NETCore版本:3.1.0
2020-03-11T20:19:14.263563267Z注:不保留“/home”之外的任何数据
2020-03-11T20:19:14.438520438Z运行oryx-appPath/home/site/wwwroot-output/opt/startup/startup.sh-defaultAppFilePath/defaulthome/hostingstart/hostingstart.dll-bindPort 8080-userstartup命令“
2020-03-11T20:19:14.654004939Z Oryx版本:0.2.20191105.2,提交:67e159d71419415435cb5d10c05a0f0758ee8809,发布标记名:20191105.2
2020-03-11T20:19:14.661143991Z在“/home/site/wwwroot/oryx manifest.toml”中找不到生成清单文件
2020-03-11T20:19:14.661606007Z在清单中找不到操作ID。正在生成操作id。。。
2020-03-11T20:19:14.662016422Z构建操作ID:e539cda2-065a-4380-8443-113a8833110a
2020-03-11T20:19:16.245422274Z将输出脚本写入“/opt/startup/startup.sh”
2020-03-11T20:19:16.918107003Z正在尝试查找启动DLL名称。。。
2020-03-11T20:19:16.918873230Z找到启动文件名:BHD.Web.dll
2020-03-11T20:19:16.918885630Z运行命令:dotnet“BHD.Web.dll”
2020-03-11T20:19:21.158001162Z未处理的异常。System.IO.FileNotFoundException:无法加载文件或程序集“Microsoft.AspNetCore.Razor.Runtime,版本=3.1.1.0,区域性=中性,PublicKeyToken=adb9793829ddae60”。系统找不到指定的文件。
2020-03-11T20:19:21.1580263Z
2020-03-11T20:19:21.158301663Z文件名:“Microsoft.AspNetCore.Razor.Runtime,版本=3.1.1.0,区域性=中立,PublicKeyToken=adb9793829ddae60”
2020-03-11T20:19:21.15806463Z位于System.ModuleHandle.ResolveTypeHandleInternal(运行时模块模块、Int32类型令牌、运行时类型句柄[]类型实例化上下文、运行时类型句柄[]方法实例化上下文)
2020-03-11T20:19:21.158041063Z at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken,类型[]genericTypeArguments,类型[]genericMethodArguments)
2020-03-11T20:19:21.158045763Z在System.Reflection.CustomAttribute.FilterCustomAttribute.FilterCustomAttributeCord处(MetadataToken caCtorToken、MetadataImport&scope、RuntimeModule decoratedModule、MetadataToken decoratedToken、RuntimeType attributeFilterType、Boolean mustBeInheritable、ListBuilder`1和derivedAttributes、RuntimeType和attributeType、IRontimeMethodInfo和ctor、Boolean和ctorHasParameters、Boolean和isVarArg)
2020-03-11T20:19:21.158052864Z at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder`1&attributes、RuntimeModule decoratedModule、Int32 decoratedMetadataToken、RuntimeType attributeFilterType、Boolean mustBeInheritable、ListBuilder`1 derivedAttributes)
2020-03-11T20:19:21.158063864Z at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule修饰模块、Int32修饰MetadataToken、Int32 pcaCount、RuntimeType attributeFilterType)
2020-03-11T20:19:21.158068564Z at System.Reflection.CustomAttribute.GetCustomAttributes(运行时程序集程序集,运行时类型caType)
2020-03-11T20:19:21.158072864Z at System.Reflection.RuntimeAssembly.GetCustomAttributes(类型attributeType,布尔继承)
2020-03-11T20:19:21.158076964Z at System.Attribute.GetCustomAttributes(汇编元素,类型attributeType,布尔继承)
2020-03-11T20:19:21.158081065Z at System.Attribute.GetCustomAttribute(汇编元素,类型attributeType,布尔继承)
2020-03-11T20:19:21.158085265Z at系统反射CustomAttributeExtensions GetCustomAttribute[T](汇编元素)
2020-03-11T20:19:21.158089465Z在Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartFactory.GetApplicationPartFactory(组装)上
2020-03-11T20:19:21.158094665Z,位于Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartManager.PopulatedDefaultParts(字符串entryAssemblyName)
2020-03-11T20:19:21.158098965Z在Microsoft.Extensions.DependencyInjection.MVCCoReserveCollectionExtensions.GetApplicationPartManager(iSeries收集服务)
2020-03-11T20:19:21.158103165Z在Microsoft.Extensions.DependencyInjection.MVCCoReserveCollectionExtensions.AddMvcCore(IServiceCollection服务)
2020-03-11T20:19:21.158107265Z在Microsoft.Extensions.DependencyInjection.MvcServiceCollectionExtensions.AddControllersCore(IServiceCollection服务)
2020-03-11T20:19:21.15811866z在Microsoft.Extensions.DependencyInjection.MvcServiceCollectionExtensions.AddControllersWithViewsCore(IServiceCollection服务)
2020-03-11T20:19:21.15811596z在Microsoft.Extensions.DependencyInjection.MvcServiceCollectionExtensions.AddControllersWithViews(IServiceCollection服务)
2020-03-11T20:19:21.158120066Z在Microsoft.Extensions.DependencyInjectio