【发布时间】:2021-07-14 14:12:15
【问题描述】:
我在 ASP.NET 应用程序中使用 angular(版本 10)i18n 本地化。部署后我可以打开我的应用程序并使用导航,但页面刷新后我得到了
{"StatusCode":500,"Message":"发生内部服务器错误。"}
我尝试使用this 问题中的重写规则,但它不起作用
【问题讨论】:
标签: angular iis url-rewriting
我在 ASP.NET 应用程序中使用 angular(版本 10)i18n 本地化。部署后我可以打开我的应用程序并使用导航,但页面刷新后我得到了
{"StatusCode":500,"Message":"发生内部服务器错误。"}
我尝试使用this 问题中的重写规则,但它不起作用
【问题讨论】:
标签: angular iis url-rewriting
500错误的原因有很多,需要进一步分析这个错误,建议你尝试使用失败请求跟踪查看详细的错误信息。
更多关于使用失败请求跟踪的信息可以参考这个链接:Using Failed Request Tracing to Trace Rewrite Rules。
【讨论】:
问题不在于 IIS 重写规则。 如果您有同样的问题,请尝试这样做:
app.module.ts
RouterModule.forRoot(your_routes, {useHash: true})
【讨论】: