![](/img/trans.png)
[英]System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError
[英]Sql server should be in the same system when hosting Web service in IIS
我創建了WCF服務,因為我使用的是SQL Server位於另一個系統中的實體框架。 我創建了一個Web應用程序並使用了該服務,而實體框架沒有任何問題。 當我將Web服務托管在IIS中時,我的實體框架中出現異常,表示基礎提供程序在打開時失敗 。 我凝視了一下,但沒有任何效果。
就像人們提到的,IIS用戶網絡服務用戶憑據在嘗試登錄sql服務器時。 因此,只需在IIS中更改應用程序池設置。
Step 1:
Open Internet Information Service Manager
Step 2:
Click on Application Pools in left navigation tree.
Step 3:
Select your version Pool. In my case, I am using ASP .Net v4.0. If you dont have this version, select DefaultAppPool.
Step 4:
Right click on step 3, and select advanced settings.
Step 5:
Select Identity in properties window and click the button to change the value.
Step 6:
Select Local System in Built-in accounts combo box and click ok.
That's it. Now run your application. Everything works well.
另外檢查一下:
和
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.