(日)

今更感があるが、WindowsXP機にXAMPP Liteがインストールしてあるので、Apache HTTP Server 2上でASP.NET 2.0を動かしてみたときのメモ。
まず、mod_aspdotnetからダウンロードしたmod_aspdotnet-2.2.0.2006-setup-r2.msiをインストールしたら、次に、C:\xampplite\apache\conf\httpd.confの末尾に以下の2行を追加した。

# ASP.NET
Include "conf/extra/httpd-aspdotnet.conf"

んで、"How to make Apache run ASP.NET / ASP.NET 2.0"に従って、C:\xampplite\apache\conf\extra\httpd-aspdotnet.confを以下の内容で作成した。

LoadModule aspdotnet_module modules/mod_aspdotnet.so

AddHandler asp.net asax ascx ashx asmx aspx axd config cs csproj licx rem resources resx soap vb vbproj vsdisco webinfo

<IfModule mod_aspdotnet.cpp>
# Mount the ASP.NET /asp application
AspNetMount /asp "c:/xampplite/asp"
#/asp is the alias name for asp.net to execute
#"c:/xampplite/asp" is the actual execution of files/folders in that location

# Map all requests for /asp to the application files
Alias /asp "c:/xampplite/asp"
#maps /asp request to "c:/xampplite/asp"
#now to get to the /asp type http://localhost/asp
#It'll redirect http://localhost/asp to "c:/xampplite/asp"

# Allow asp.net scripts to be executed in the /asp example
<Directory "c:/xampplite/asp">
Options FollowSymlinks ExecCGI
Order allow,deny
Allow from all
DirectoryIndex index.htm index.aspx
#default the index page to .htm and .aspx
</Directory>

# For all virtual ASP.NET webs, we need the aspnet_client files
# to serve the client-side helper scripts.
AliasMatch /aspnet_client/system_web/(\d+)_(\d+)_(\d+)_(\d+)/(.*) "C:/Windows/Microsoft.NET/Framework/v$1.$2.$3/ASP.NETClientFiles/$4"
<Directory "C:/Windows/Microsoft.NET/Framework/v*/ASP.NETClientFiles">
Options FollowSymlinks
Order allow,deny
Allow from all
</Directory>
</IfModule>

最後に、C:\xampplite\asp\index.aspxを以下の内容で作成した。

<%@ Page Language="JScript" %>
<html>
<head>
<title>ASP.NET 2.0 Sample Page</title>
</head>
<body>
<p><% Response.Write("'Hello, world!' on " + ScriptEngine() + " Ver." + ScriptEngineMajorVersion() + "." + ScriptEngineMinorVersion() + "." + ScriptEngineBuildVersion()) %></p>
</body>
</html>

ウェブブラウザでhttp://localhost/asp/に接続したところ、「'Hello, world!' on JScript Ver.8.0.50727」と表示され、JScript .NETのバージョンから.NET Framework 2.0が動作していることを確認できた。
上手くイッたw

Posted by at 13:02+09:00
Categories: コンピュータ | 楽天
Comments | Trackbacks

TopBottom

Trackbacks

Trackback URL:
http://ventura.pv.land.to/tt-cgi/tt_tb.cgi/176

TopBottom

Comments






保存しますか? Yes No


(URL以外は入力必須、過少コメント・連続投稿は不可)

TopBottom

< 東日本大震災 | Home