我正在尝试通过git在Azure上部署aspnetcore应用程序。我已经直接完成了所有操作,如https://docs.asp.net/en/latest/tutorials/your-first-mac-aspnet.html中所示
后来我甚至按照规定的步骤问题与部署ASP.NET 5(ASP.NET核心)应用天青从和部署平原项目https://github.com/bigfont/WebNotWar在这两种情况下,一切我所得到的是只一个消息
您无权查看此目录或页面。
当我尝试访问任何控制器时,响应为
您正在寻找的资源已被删除,名称已更改或暂时不可用。
我很确定部署本身很好,因为我尝试破坏代码并且它已经做出了适当的反应。
... Azure App Service不再支持ASP.NET 5,Core RC1或RC2。唯一受支持的ASP.NET Core堆栈是Azure App Service上的RTM。(添加了重点)。
现有的RC1应用目前可以继续使用。如果我们在Azure放弃支持之前将ASP.NET Core RC1应用程序部署到Azure应用服务,则该应用程序将继续运行,因此它将继续进行部署。
ASP.NET核心模块已替换HttpPlatformHandler。
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
// Use the ASP.NET Core Module
<handlers>
<add name="aspNetCore" path="*" verb="*"
modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="..\MySite.exe" arguments=""
stdoutLogEnabled="false" stdoutLogFile="..\logs\stdout" />
// Remove the HTTP Platform Handler
// <handlers>
// <add name="httpPlatformHandler" path="*" verb="*"
// modules="httpPlatformHandler" resourceType="Unspecified"/>
// </handlers>
// <httpPlatform processPath="%DNX_PATH%" arguments="%DNX_ARGS%"
// stdoutLogEnabled="false" startupTimeLimit="3600" />
</system.webServer>
</configuration>
Startup
public void Configure(IApplicationBuilder app)
{
// Remove call to app.UseIISPlatformHandler();
// Remove call to app.UseForwardedHeaders();
// Both are handled by UseIISIntegration in Main.
}
public static void Main(string[] args)
{
var host = new WebHostBuilder()
.UseKestrel()
.UseIISIntegration() // Replace UseIISPlatformHandlerUrl()
.UseStartup<Startup>()
.Build();
host.Run();
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句