1.Apacheのインストール。 これは、今使って居るので必要ない。スキップだ。
2.
Mod_AspDotNetのインストール。 これが必要なんだ。早速インストールする。
3.次は、Apacheの設定ファイルのhttpd.conf に追加とある。
まず、インストールしたモジュールの宣言だ。
3-1.
LoadModule aspdotnet_module "modules/mod_aspdotnet.so" でも、他のモジュールを見ると「"」が付いていないので、これを省略した。LoadModule文の一番最後に追加した。
3-2. 次の文も追加だな。今の追加した文の次に入れて置こう。
AddHandler asp.net asax ascx ashx asmx aspx axd config cs csproj licx rem resources resx soap vb vbproj vsdisco webinfo 3-3. 次は、少々長いぞ、これは一番最後にしよう。
<IfModule mod_aspdotnet.cpp>
# Mount the ASP.NET /asp application
AspNetMount /SampleASP "c:/SampleASP"
#/SampleASP is the alias name for asp.net to execute
#"c:/SampleASP" is the actual execution of files/folders in that location # Map all requests for /asp to the application files
Alias /SampleASP "c:/SampleASP"
#maps /SampleASP request to "c:/SampleASP"
#now to get to the /SampleASP type http://localhost/SampleASP
#It'll redirect http://localhost/SampleASP to "c:/SampleASP"
# Allow asp.net scripts to be executed in the /SampleASP example
<Directory "c:/SampleASP">
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>
ここで注意が必要なのは、/SampleASP "c:/SampleASP" を自分の環境に合わせて変える事だ。試したのは、index.htmlのある場所にホルダーの「asp」を作ったとする。その場合、
/asp "c:/..../asp"となる事だ。変える個所は3か所ある。後は、そのままで良さそうだ。Apacheを再起動する。エラーも無さそうだ。
で、次の分は、index.aspxの例か。
<%@ Page Language="VB" %>
<html>
<head>
<link rel="stylesheet"href="intro.css" mce_href="intro.css">
</head>
<body>
<center>
<form action="index.aspx" method="post">
<h3> Name: <input id="Name" type=text>
Category: <select id="Category" size=1>
<option>One</option>
<option>Two</option>
<option>Three</option>
</select>
</h3>
<input type=submit value="Lookup">
<p>
<% Dim I As Integer
For I = 0 to 7 %>
<font size="<%=I%>"> Sample ASP.NET TEST</font> <br>
<% Next %>
</form>
</center>
</body>
</html>
これを、先程のaspホルダーに名前をindex.aspxとして入れる。早速に、http://.../asp/index.aspxとすると、難なく起動した。感動だね。