0
我试图在Azure网站上运行我的应用程序, 但我在使index.html
正常工作时遇到问题。Azure网站404 index.html
应用存在了2个项目的:
- API(.NET核心)
- 客户端(角)
在我的构建定义我复制从我的客户端和API结果到$(Build.ArtifactStagingDirectory)
然后我发布
到目前为止好,我可以看到我的客户在列出的文件我的网站的(通过捻线机控制台)
但是当我导航到index.html
时,我得到一个。然而去/api/...
链接只是像预期的那样工作
所以我想这个问题是我的web.config
覆盖posibility导航到index.html文件。
的web.config
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\Portal4Fun.Api.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" />
</system.webServer>
</configuration>
在.net核心中,您使用的是静态文件中间件吗? https://docs.asp.net/en/latest/fundamentals/static-files.html如果你错过了这个,没有静态内容将被投放。 –
@RussellYoung:就是这样,结合把它复制到wwwroot/wwwroot /文件夹:)你会回复它,所以我可以接受它作为答案? :) – Kiwi