一个典型的web.config文件有一个<system.web/>节和一个<system.webServer/>节。我的印象是IIS7 / IIS7express忽略了<system.web/>部分。因此,如果我们永远不会使用被诅咒的Cassin/Web Development Server,而只针对IIS7 or IIS7Express进行开发,那么我们能从我们的web.conf
USER_FOLDER\Documents\Visual Studio 2012\Projects\MY_PROJECT\_templates\myFile.htmlstring myFile = (new DirectoryInfo("_templates/myFile.html")).FullName;"C:\\Program Files\\