在IIS 403上运行.NETCORE API禁止

发布于 2025-02-06 05:20:24 字数 413 浏览 2 评论 0原文

我似乎无法在IIS上启动我的NetCore API。

我正在从azure devops部署

  • 构建工件中的文件,尽管我运行构建而不是发布,但似乎一切都在那里。
  • 我已经在.net CLR版本中创建了一个使用没有托管代码的应用程序池,
  • 我已为wwroot/api/api目录提供了权限IIS_IUSRS
  • 已将AspnetCoreModuleV2安装并重新启动服务,

如果我将index.html文件添加到网站上,我将获得403。

如果启用目录浏览,我可以看到所有文件。

该网站没有任何视图,只是无头API。我不确定是否需要确保添加/安装其他任何内容以进行运行。

想法?

I can't seem to get my netcore api up and running on IIS.

I'm deploying from Azure DevOps

  • The files from the build artifact are present on the remote server though I ran build and not publish, but it seems like everything is there.
  • I've created an Application Pool with No Managed Code in the .Net CLR Version,
  • I've given permissions to the wwroot/api directory for read/write/execute to IIS_IUSRS
  • I've installed the AspNetCoreModuleV2 and restarted the service(s)

If I add an index.html file to the site I won't get the 403. Makes sense.

If I enabled directory browsing I can see all of my files.

There aren't any views for the site, it's just a headless API. I'm not sure if there's anything else that I need to make sure is added/installed for it to run.

Thoughts?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文