簡體   English   中英

為asp.net 3.5數據庫應用程序安裝和配置sql server和IIS [基本]

[英]installing and configuring sql server and IIS for asp.net 3.5 database app [basic]

對於這個非常老套的問題,我感到非常抱歉,但是我確實需要了解一些特定的東西。

每次我在Visual Studio 2010中添加一個sql服務器數據庫時,它都會在App_Data下創建一個數據庫,然后服務器資源管理器使用的連接字符串是一個具有指向該文件的AttachDb字段的字符串。

現在,當我在2台IIS服務器6和7.5上嘗試該操作時,出現了一系列錯誤,提示用戶

"An attempt to attach an auto-named database for file XX failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."

如果我使用這種格式“ Server = \\ sqlexpress; Database = xxx; Trusted_Connection = True”,我會得到

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.

我花了一整天的時間嘗試各種不同的連接字符串,配置和組合!! = S

我的問題是:正確的方法是什么? 我應該在sql management Studio 2008 R2 Express中制作數據庫嗎? 我需要什么類型的連接字符串,以及在SQL SERVER 2008 R2 Express IIS Windows Server 2003 R2上需要什么配置?

似乎我需要使用集成的安全性(Windows身份驗證)連接字符串,我也必須使用localhost \\ sqlexpress而不是。\\ sqlexpress。 對於IIS 7.5,需要將應用程序池登錄名添加到sql服務器登錄名中!

暫無
暫無

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

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