我已将ASP.Net MVC 5应用程序部署到Azure Web Apps。一直运行良好,直到我昨天添加了Application Insights。从那时起,每次发布site的尝试都会导致解析错误。我已经审查了应用程序日志和遥测,但无法辨别事情是如何出错的。是否需要对global.asax
进行特定更改才能使Application Insights放置好?
更新: 我发现web项目属性Assembly Name被意外修改(菜鸟移动)。我已经改变它,清理,重建,发布都无济于事。解析错误的输出是:
Parser Error Message: The type 'MobileFirst452.MvcApplication' is ambiguous:
it could come from assembly 'D:\home\site\wwwroot\bin\licationSeri.DLL' or
from assembly 'D:\home\site\wwwroot\bin\MobileFirst452.DLL'. Please specify
the assembly explicitly in the type name.
我从bin文件夹中删除了内容。 global.asax
的内容如下:
<%@ Application Codebehind="Global.asax.cs"
Inherits="MobileFirst452.MvcApplication" Language="C#" %>
答案 0 :(得分:1)
发布上述更新后,我查看了部署到Azure的文件。我删除了导致错误的DLL,现在可以完成对网站的测试。明智的话:在发布之前检查项目属性,以防万一有意外过度输入。