ApplicationHost.CreateApplicationHost メソッド
ASP.NET をホストするアプリケーション ドメインの作成および設定を行います。
名前空間: System.Web.Hosting
アセンブリ: System.Web (system.web.dll 内)
構文
'宣言
Public Shared Function CreateApplicationHost ( _
hostType As Type, _
virtualDir As String, _
physicalDir As String _
) As Object
'使用
Dim hostType As Type
Dim virtualDir As String
Dim physicalDir As String
Dim returnValue As Object
returnValue = ApplicationHost.CreateApplicationHost(hostType, virtualDir, physicalDir)
public static Object CreateApplicationHost (
Type hostType,
string virtualDir,
string physicalDir
)
public:
static Object^ CreateApplicationHost (
Type^ hostType,
String^ virtualDir,
String^ physicalDir
)
public static Object CreateApplicationHost (
Type hostType,
String virtualDir,
String physicalDir
)
public static function CreateApplicationHost (
hostType : Type,
virtualDir : String,
physicalDir : String
) : Object
適用できません。
パラメータ
- hostType
新しいアプリケーション ドメインで作成されるユーザー指定のクラスの名前。
- virtualDir
アプリケーション ドメインの仮想ディレクトリ (/myapp など)。
- physicalDir
ASP.NET ページが配置される、アプリケーション ドメインの物理ディレクトリ (c:\mypages など)。
戻り値
ユーザーが指定したクラスのインスタンスであり、新しく作成したアプリケーション ドメインに呼び出しをマーシャリングするために使用します。
例外
例外の種類 | 条件 |
---|---|
Web ホスト コンピュータで、Windows NT プラットフォームまたは Coriolis 環境が実行されていません。 |
.NET Framework のセキュリティ
- SecurityPermission (アクセス許可によって保護されるリソースへのフル アクセスに必要なアクセス許可)。System.Security.Permissions.PermissionState.Unrestricted (関連する列挙体)。
プラットフォーム
Windows 98,Windows Server 2000 SP4,Windows CE,Windows Millennium Edition,Windows Mobile for Pocket PC,Windows Mobile for Smartphone,Windows Server 2003,Windows XP Media Center Edition,Windows XP Professional x64 Edition,Windows XP SP2,Windows XP Starter Edition
Microsoft .NET Framework 3.0 は Windows Vista,Microsoft Windows XP SP2,および Windows Server 2003 SP1 でサポートされています。
バージョン情報
.NET Framework
サポート対象 : 3.0,2.0,1.1,1.0
参照
関連項目
ApplicationHost クラス
ApplicationHost メンバ
System.Web.Hosting 名前空間