简体   繁体   English

无法在本地IIS中成功执行Get with WebAPI

[英]Can't successfully perform a Get with WebAPI in Local IIS

I written a WebAPI that fetches records. 我写了一个WebAPI来获取记录。 I got it to work in debug mode with the Visual Studio server and i was able to save the json file that was 50KB. 我使它可以在Visual Studio服务器的调试模式下工作,并且能够保存50KB的json文件。 I deployed the WebAPI service to my local IIS and went to Browse to successfully bring up the page. 我将WebAPI服务部署到了本地IIS,然后转到“浏览”成功打开了该页面。 When I call the controller in the URL, it could not download the json file and fails. 当我在URL中调用控制器时,它无法下载json文件并失败。 Basically, it works in debug but not with local IIS. 基本上,它可以在调试中工作,但不能与本地IIS一起工作。 Then we change the connection string from 然后我们将连接字符串从

server=My_Server;database=test_db;integrated security=sspi 服务器= My_Server;数据库= test_db;集成安全性= sspi

to

server=My_Server;database=test_db;integrated security=false;user id=Me; 服务器= My_Server;数据库= test_db;集成安全性= false;用户ID = Me; password=password123" password = password123“

For some reason, the integrated security=sspi did not work with local IIS but when I go to production we need to specify integrated security=sspi in the connection string. 由于某些原因,集成的security = sspi不适用于本地IIS,但是在我投入生产时,我们需要在连接字符串中指定集成的security = sspi。

I was told that I can configure IIS to make integrated security=sspi work. 有人告诉我可以配置IIS来使集成的security = sspi工作。 How can I do that? 我怎样才能做到这一点?

Thanks. 谢谢。

  • IIS vs VS IIS与VS
    You have to properly setup your web application in IIS (app pool, bindings, permissions, etc). 您必须在IIS中正确设置Web应用程序(应用程序池,绑定,权限等)。 VS does all of this "automagically" for you in dev, but it's (a little bit) more involved when actually going IIS. VS在开发人员中为您“自动”完成了所有这些工作,但是在实际使用IIS时(更多)涉及了更多工作。

    I haven't done this in a while but try publishing to your local IIS and see if it does all (or at least some/most?) of the grunt work.... 我已经有一段时间没有这样做了,但是尝试发布到本地IIS,看看它是否完成了所有(或至少某些/大部分?)的繁琐工作。

  • SQL with Integrated Security 具有集成安全性的SQL

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM