Sunday, October 23, 2005

Change Default aspnetdb location

近日開始Review ASP.NET 2.0的一些功能,
由於前幾次的CTP版本混亂的緣故,這次並
未安裝預設的SQLEXPRESS,結果發現ASP
.NET Config Web Site無法設定Security頁
面,經查證結果是預設連結至SQLEXPRESS,
這個設定是在mechine.config(i thinking you know
where to found,c:\windows\microsoft.net\framework
\2.xxxx\config)中的LocalSqlServer,只要改變
這個值就能將預設連結至SQLEXPRESS的
ASP.NET Web Site Administrator改成連結
至你要的SQL Server中.
如.
"Data Source=CODE6421\CODE6421_2005_B3;
Initial Catalog=aspnetdb;Integrated Security=True" />

PS:記得要執行aspnet_regsql.exe 來建立預設的aspnetdb資料庫.