[英].Net Core WebApp API Endpoints don't work once deployed to Azure
I'm having an issue with deploying a WebApp / API to Azure.我在将 WebApp/API 部署到 Azure 时遇到问题。
When I run it locally on localhost:44385//api/user/getuser/1, it returns the JSON for that user, once deployed to an App Service on Azure, it starts returning a 404.当我在 localhost:44385//api/user/getuser/1 上本地运行它时,它会返回该用户的 JSON,一旦部署到 Azure 上的应用服务,它就会开始返回 404。
Its running on the free version as its for a uni assignment.它在免费版本上运行,作为 uni 任务。 I've spent hours poking around and reading, and cant seem to find where i've gone wrong in the setup.我花了好几个小时四处闲逛和阅读,似乎找不到我在设置中出错的地方。 Hoping someone might of had a similar issue.希望有人可能有类似的问题。
Have you checked to make sure the server's routing rules are correct and that it's not looking in the directory structure?您是否检查过以确保服务器的路由规则正确并且没有在目录结构中查找?
https://docs.microsoft.com/en-us/azure/application-gateway/url-route-overview#:~:text=In%20this%20article&text=URL%20Path%20Based%20Routing%20allows,to%20different%20backend%20server%20pools . https://docs.microsoft.com/en-us/azure/application-gateway/url-route-overview#:~:text=In%20this%20article&text=URL%20Path%20Based%20Routing%20allows,to%20different %20backend%20server%20pools 。
Please verify below points:请确认以下几点:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.