global.asa Application_Start イベント (クラシック ASP) で IIS アプリケーションの AppFriendlyName にアクセスする必要があります。
global.asax (ASP.NET) で HttpContext.Current.Request.ApplicationPath に相当するものを探しています
それを行う方法はありますか?
ご協力いただきありがとうございます !
ジェローム・ワグナー
global.asa Application_Start イベント (クラシック ASP) で IIS アプリケーションの AppFriendlyName にアクセスする必要があります。
global.asax (ASP.NET) で HttpContext.Current.Request.ApplicationPath に相当するものを探しています
それを行う方法はありますか?
ご協力いただきありがとうございます !
ジェローム・ワグナー
これはそれを行う1つの方法です。
path = Request.ServerVariables("URL")
position = InStr(2,path,"/",1)
Response.Write Right(Left(path,position-1),position-2) & "<br/>"
見た目は良くないかもしれませんが;)
更新:もちろん、Global.asaでは機能しません。Session_OnStartとSession_OnEndでのみRequestオブジェクトを使用できるためです。悪い、ごめんなさい。