尋找一個人誰設置的Telerik Rad Controls for ASP.NET AJAX Live Demos項目之前......我最近下載了Telerik Rad Controls for ASP.NET AJAX框架。我正在使用Telerik Rad Controls for ASP.NET(非AJAX)框架將我們公司的一些代碼從大約5-6年前升級到新的AJAX框架。許多舊控件在最新的瀏覽器版本(Google Chrome 12,Mozilla Firefox,Internet Explorer)中無法使用。有些控件在某些瀏覽器中可用,但在其他瀏覽器中不起作用,有時並不總是與瀏覽器打開的瀏覽器相同。Telerik「Live Demos」解決方案 - 連接字符串和數據庫設置
我盡最大努力解決了我們公司框架中存在的問題,但我們仍然存在一些問題,以前我發佈過的問題都是如此。這些正是我想要解決的問題。於是我開始安裝演示項目。
我們公司還沒有使用Visual Studio 2010,所以昨天我將Telerik Live Demos項目降級到Visual Studio 2008.我手動轉換* .sln文件進行了3次更改。幸運的是,沒有.csproj/ .vbproj文件(很明顯,因爲它們在他們的網站項目中都有這兩種語言)。然後,我將.NET版本從4.0更改爲3.5,對網站bin文件夾進行了必要的Bin35更新,刪除了項目中的4個不同的.NET 4.0 dll,並使用這些程序集卸載了任何文件,在IIS 7中進行了必要的更改,編譯的解決方案,一切都很好....
直到我試圖查看一些控件。然後我發現他們有2個需要下載的數據庫(Northwind & Telerik)(10.mdf/.ldf文件)和Attach to SQL Server 2008.我今天做了這個,更新了連接字符串,但是我仍然有一個問題。我希望這是我需要解決的許多問題中的最後一個,以使其正常工作,以便我可以理解該框架。
僅供參考:我現在使用web.config.35文件作爲我的「web.config」文件。我還將解決方案/項目的.NET版本從2.0更改爲3.5。這個可以嗎?我認爲這是因爲2.0 dll仍然可以在3.5網站上正常運行,因爲它仍然是2.0體系結構。
有人可以向我解釋所有這些連接字符串的用途和必要的設置?我有連接到SQL Server的* .mdf和* .ldf文件,但它們仍處於集成模式(用於訪問)。我也重新命名了數據庫...在附加和添加* .mdf文件後,數據庫名稱真的很長!
web.config中的連接字符串:
<connectionStrings>
<add name="NorthwindConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|Northwind.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" />
<add name="TelerikConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|Telerik.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" />
<add name="NorthwindConnectionString35" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|Northwind.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" />
<add name="TelerikConnectionString35" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|Telerik.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" />
<add name="NorthwindEntities" connectionString="metadata=res://*;provider=System.Data.SqlClient;provider connection string="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Northwind.mdf;Integrated Security=True;User Instance=True;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient" />
<add name="TelerikEntities" connectionString="metadata=res://*;provider=System.Data.SqlClient;provider connection string="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Telerik.mdf;Integrated Security=True;User Instance=True;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient" />
<add name="QSFRatingsConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|QSFRatings.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" />
<add name="SelfReferencingDbConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|TelerikSelfReferencingDb.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" />
</connectionStrings>
在現場演示觀看ComboBox控件時(運行現場演示網站時)仍收到此錯誤:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.
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: Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SqlException (0x80131904): Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4849015
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2394
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +35
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +144
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +342
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +221
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +189
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +4863459
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +31
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +433
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +499
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +65
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117
System.Data.SqlClient.SqlConnection.Open() +122
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +31
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +112
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +287
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +92
System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1297
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +19
Telerik.Web.UI.RadComboBox.OnDataBinding(EventArgs e) +635
Telerik.Web.UI.RadComboBox.PerformSelect() +21
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
Telerik.Web.UI.RadComboBox.DataBind() +37
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.BaseDataBoundControl.OnPreRender(EventArgs e) +22
Telerik.Web.UI.RadComboBox.OnPreRender(EventArgs e) +15
System.Web.UI.Control.PreRenderRecursiveInternal() +80
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.4961; ASP.NET Version:2.0.50727.4955
張貼在此基礎上一個新的問題..因爲這並沒有完全解決我的問題。 http://stackoverflow.com/questions/7366295/sqlexpress-connection-fails-in-iis-7-w-user-instance-error-failed-to-generate – MacGyver
在這裏迴應,所以我不堵塞那新鮮的職位,但是您提到您在SQL服務器下以「網絡服務」用戶身份登錄。您是否嘗試過使用本地系統(在SQL Server屬性選項卡中的登錄選項卡下)?如果是這樣,結果是什麼? – KreepN
絕對..讓我檢查錯誤是什麼(如果我記得..同樣的錯誤) – MacGyver