2010-05-26 57 views
0

问题我想通过DotNetNuke的连接到SQL Express 2005。我的操作系统是Windows 7(IIS 7),当我试图连接我得到了以下错误:与SQL Server Express用户实例和ASP.net Web应用程序项目(DOTNET核弹)

An attempt to attach an auto-named database for file (file location).../Database.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

我已经试过我在下面的链接找到了解决办法,但我仍然得到同样的错误。

http://support.microsoft.com/kb/2002980

然后我试图在我的SQL Server名称更改从SYSTEMNAME\SQLEXPRESSSystemIP\SQLEXPRESS我得到一个DotNetNuke的错误如下:

DotNetNuke的错误

System.ArgumentException: Invalid value for key 'attachdbfilename'. at System.Data.SqlClient.SqlConnectionString.VerifyLocalHostAndFixup(String& host, Boolean enforceLocalHost, Boolean fixup) at System.Data.SqlClient.SqlConnectionString..ctor(String connectionString) at System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous) at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(String connectionString, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions) at System.Data.SqlClient.SqlConnection.ConnectionString_Set(String value) at System.Data.SqlClient.SqlConnection.set_ConnectionString(String value) at System.Data.SqlClient.SqlConnection..ctor(String connectionString) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, CommandType commandType, String commandText) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, String spName, Object[] parameterValues) at DotNetNuke.Data.SqlDataProvider.TestDatabaseConnection(DbConnectionStringBuilder builder, String Owner, String Qualifier) at DotNetNuke.Services.Install.InstallWizard.TestDatabaseConnection() at DotNetNuke.Services.Install.InstallWizard.wizInstall_NextButtonClick(Object sender, WizardNavigationEventArgs e) at System.Web.UI.WebControls.Wizard.OnNextButtonClick(WizardNavigationEventArgs e) at System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) at System.Web.UI.WebControls.Wizard.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) at System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

任何一个可以帮助我解决这个问题?

+0

你能告诉我们正在使用您的连接字符串?你是** 150 **%确保SQL Server 2005 Express的确实是那台机器上安装? – 2010-05-26 05:32:29

回答

0

有类似问题,发现我不得不升级到SQLExpress 2008R2,因为示例数据库在2008R2,我只有2008 Sp1安装。

关键是另一条消息:“数据库C:\USERS\....\APP_DATA\ASPNETDB.MDF无法打开,因为它是version 661。此服务器支持version 655及更早版本,不支持降级路径。”

0

我想这在IIS7,和它的工作:

ApplicationPools->DefaultAppPool->Advanced Settings...,在Process Model部分,我的Identity酒店需要从下拉列表中设置到LocalSystem。为DotNetNuke优选设置是NetworkService

LocalSystem设置工作,因为代码将使用用于登录到计算机的本地身份连接到SQL Server。如果该登录名在Sql Server中配置为登录名,则这是必需的。我认为,如果SQL Server登录/身份相应的修改,NetworkService设置也应该工作(我没有试过)。

相关问题