簡體   English   中英

在IIS中托管Web服務時,SQL Server應位於同一系統中

[英]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.

另外檢查一下:

http://stack247.wordpress.com/2011/03/02/entity-framework-exception-the-underlying-provider-failed-on-open/

http://stack247.wordpress.com/2011/03/07/wcf-exception-in-iis-only-the-underlying-provider-failed-on-open-access-to-entity-framework/

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM