我在2017年中创建了一个基本的Web MVC应用程序,并试图将其发布在Azure上。 尝试使用现有的应用程序服务并创建了新的应用程序服务,但均失败。 收到此错误- 严重性代码说明项目文件行抑制状态 错误Web部署任务失败。 ((19年6月20日12:40:32 PM)在远程计算机上处理请求时发生错误。)
(19年6月20日12:40:32 PM)在远程计算机上处理请求时发生错误。 有一个未封闭的文字字符串。第1行,位置70。
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)
at System.Xml.XmlTextReaderImpl.ParseAttributes()
at System.Xml.XmlTextReaderImpl.ParseElement()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XPath.XPathDocument.LoadFromReader(XmlReader reader, XmlSpace space)
at System.Xml.XPath.XPathDocument..ctor(TextReader textReader)
at Microsoft.Web.Deployment.PackageDeserializer..ctor(Stream stream, DeploymentBaseContext baseContext)
at Microsoft.Web.Deployment.DeploymentAgent.HandleSync(DeploymentAgentAsyncData asyncData, Nullable`1 passId, String user, String siteName) WebApplicationForAzure 0
答案 0 :(得分:1)
首先,请检查应用程序是否在本地正常运行。 部署问题是导致将错误的文件集部署到站点文件夹(通常是site \ wwwroot)或导致某些文件根本无法部署的问题。 当wwwroot文件夹中的文件完全正确时,就会发生运行时问题,但是由于某些原因,站点无法正确运行。 Make sure site correctly deploys locally用于隔离问题。您要部署到暂存插槽吗?
在Azure门户的应用程序设置中设置WEBSITE_WEBDEPLOY_USE_SCM = false,重新下载发布配置文件,然后重试以查看是否有帮助。
此外,请隔离以查看是否归因于系统上的网络代理或端口。