2012-07-13 73 views

回答

1

如果您嘗試使用您的代碼更改配置,以下內容應該有所幫助。無論何時執行以下代碼,您的網站都將重新啓動。所以記住這一點。

var config = (Configuration)WebConfigurationManager.OpenWebConfiguration("~"); 
var configSection = (MySectionTypeHere)myConfiguration.GetSection("system.web/section"); 

//make your edits here 

myConfiguration.Save(); 

如果這不是你正在尋找的,也許你可以提供更多的信息。

+0

謝謝你的答覆哥們。但我去這個鏈接http://learn.iis.net/page.aspx/578/package-an-application-for-the-windows-web-application-gallery/ – 2012-07-16 04:56:55