日韩久久久精品,亚洲精品久久久久久久久久久,亚洲欧美一区二区三区国产精品 ,一区二区福利

windows身份驗(yàn)證登入數(shù)據(jù)庫 iis 無法訪問數(shù)據(jù)庫

系統(tǒng) 3317 0

原文地址: http://www.cnblogs.com/d-xtl/archive/2011/12/27/2303890.html

System.Data.SqlClient.SqlException: 用戶'pc-2009\ASPNET' 登錄失敗的解決辦法?
今天發(fā)布網(wǎng)站的時候遇到這個問題,多方查詢后終于找到答案!

System.Data.SqlClient.SqlException: 用戶'pc-2009\ASPNET' 登錄失敗的解決辦法: (此處的PC-2009是我的機(jī)器名)

由于他的數(shù)據(jù)庫連接語句中沒有采用用戶名和密碼驗(yàn)證,采用的是windows集成驗(yàn)證,所以無法連接數(shù)據(jù)庫。

解決方法很簡單,加上ASPNET這個賬號,賦予權(quán)限即可,具體方法如下:

1、企業(yè)管理器--》安全性--》登陸--》(右鍵)新建登陸--》名稱(在列表中添加ASPNET這個用戶);

2、然后在服務(wù)器角色一欄中選擇System Administrators;

3、在數(shù)據(jù)庫訪問一欄中選擇所要訪問的數(shù)據(jù)庫,然后在下面對話框中將db_owner選上,確定即可!

----------------------------------------------------------------------------------------------------------------------------------------

風(fēng)箏:

在IIS中發(fā)布WebSite,然后連接SQLServer2005,采用windows身份驗(yàn)證數(shù)據(jù)庫,結(jié)果訪問數(shù)據(jù)庫時報錯,如下:

Server Error in '/PaidTimeOffUI' Application.


Cannot open database "HRPaidTimeOff" requested by the login. The login failed.
Login failed for user (ComputerName)\ASPNET'.

Description:? An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.?

Exception Details:? System.Data.SqlClient.SqlException: Cannot open database "HRPaidTimeOff" requested by the login. The login failed.
Login failed for user 'ComputerName\ASPNET'.

-------------------------------------------------------------------

上網(wǎng)搜,有如下解釋:

1、 http://p2p.wrox.com/book-asp-net-3-5-enterprise-application-development-visual-studio-2008-problem-design-solutio/80312-problem.html

2、...What I did to resolve this was, disable anonymous access, then enable digest authentication so IIS will look at the domain. In the realm area select or type your fully qualified domain and this should work....

http://p2p.wrox.com/book-asp-net-3-5-enterprise-application-development-visual-studio-2008-problem-design-solutio/73386-problem-compile.html

其中涉及到IIS配置,不懂~~于是按照上面方法在SQLServer中添加了ASPNET用戶,得以解決,以后一定要學(xué)些IIS配置!

2012.02.21 晚

windows身份驗(yàn)證登入數(shù)據(jù)庫 iis 無法訪問數(shù)據(jù)庫


更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯(lián)系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長非常感激您!手機(jī)微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發(fā)表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 营山县| 霍州市| 江安县| 黄陵县| 博乐市| 哈巴河县| 武冈市| 新野县| 云梦县| 乳山市| 上蔡县| 江油市| 金华市| 乌兰察布市| 滦平县| 托克逊县| 孟村| 横峰县| 宜川县| 敦化市| 牟定县| 庆元县| 喜德县| 涞水县| 石台县| 涪陵区| 宁河县| 莲花县| 盐亭县| 石屏县| 于田县| 龙胜| 肃南| 临泽县| 大同县| 白银市| 璧山县| 凭祥市| 南江县| 普安县| 庆云县|