En utilisant HttpContext.Current.Request.ServerVariables [ "SERVER_NAME"] en mode intégré donne une erreur dans IIS7 selon: http://mvolo.com/blogs/serverside/archive/2007/11/10/Integrated-mode-Request-is-not-available-in-this-context-in-Application_5F00_Start.aspxremplacement pour HttpContext.Current.Request.ServerVariables [ "SERVER_NAME"] en mode intégré
Est y at-il un remplacement que je peux utiliser dans le code global.asax pour HttpContext.Current.Request.ServerVariables ["SERVER_NAME"]?
Ce serait similaire à l'utilisation
String strPath =
HttpContext.Current.Server.MapPath(HttpRuntime.AppDomainAppVirtualPath);
au lieu de
//String strPath =
HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ServerVariables["PATH_INFO"]);