swagger-ui 部署后返回 500 [英] swagger-ui returns 500 after deployment
问题描述
开箱即用的配置在我的机器上完美运行,完全没有问题.
Out of the box configuration works perfectly on my machine, no problems at all.
但是当我部署到我们的测试环境时 - 我收到以下消息
But when I deploy to our test environment - I get the following message
500 : { "Message": "发生错误."}/api/swagger/docs/v1
500 : { "Message": "An error has occurred." } /api/swagger/docs/v1
部署到默认网站/api
我猜它与 baseUrl 或类似的东西有关,但我什至不知道从哪里开始.
Im guessing it has something to do with the baseUrl or something like that, but I have no idea of even where to begin.
我的路由在项目中运行良好 - 我可以调用我的所有 webapi 端点并且它们正确响应.
My routes work fine within the project - I can call all my webapi endpoints and they respond correctly.
任何帮助将不胜感激
推荐答案
调试时我使用了调试配置(我已经为:属性 -> 构建选项卡 -> 输出 -> XML 文档文件生成了 XmlComments)
When debugging I was using the debug config (Which I had generated XmlComments for: Properties -> build tab -> Output -> XML Documentation File)
我没有为我的发布配置做这个(废话...) - 现在一切正常
I had not done this for my release configuration (duh...) - now everything works
这篇关于swagger-ui 部署后返回 500的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!