DeveloperSide.NET Forums
March 25, 2019, 06:42:17 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1] 2 3 4
  Print  
Author Topic: Installing mod_aspdotnet -- ASP.NET...  (Read 125145 times)
0 Members and 1 Guest are viewing this topic.
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« on: May 04, 2006, 08:25:26 PM »

Update: Note that this information is a bit inaccurate and is corrected in further posts in this thread.
Update: Also note that you can get the latest version of mod_aspdotnet here... http://www.devside.net/web/server/free/download

http://httpd.apache.org/mod_aspdotnet/
Quote
mod_aspdotnet works only with the .NET Framework version 1.0 and 1.1 at this time. Flexibility for the 2.0 .NET Framework and beyond is being considered.


Have .NET Framework v1.0 or v1.1 Runtime Installed.
Stop Apache.
Download current version of mod_aspdotnet-*.*.*.msi from...
http://www.apache.org/dist/httpd/mod_aspdotnet/
Run this msi file from the root of the drive that the Web-Server Suite is installed on.
This will copy mod_aspdotnet.so into your Apache2/modules/ directory, and install/register the Apache.Web.dll into the Global Assembly Cache.

Edit httpd.conf (watch those two line-breaks ("\")!)...
Code:

LoadModule aspdotnet_module modules/mod_aspdotnet.so

# Use the asp.net handler for all common ASP.NET file types
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 sampleapp example application
    AspNetMount /sampleapp "C:/www/webroot/sampleapp"

    # Map all requests for /sampleapp to the sampleapp application files
    Alias /sampleapp "C:/www/webroot/sampleapp"

    # Allow asp.net scripts to be executed in the sampleapp example
    <Directory "C:/www/webroot/sampleapp">
        Options FollowSymlinks ExecCGI
        Order allow,deny
        Allow from all
        DirectoryIndex Default.htm Default.html Default.aspx
    </Directory>

    # For all virtual ASP.NET webs, we need the aspnet_client files
    # to serve the client-side helper scripts.
    # NOTICE "C:/Windows/" -- change to %systemroot%
    # "C:/Windows/" for WinXP, "C:/WINNT/" for Win2k
    AliasMatch /aspnet_client/system_web/(\d+)_(\d+)_(\d+)_(\d+)/(.*) \
"C:/Windows/Microsoft.NET/Framework/v$1.$2.$3/ASP.NETClientFiles/$4"

    # NOTICE "C:/Windows/" -- change to %systemroot%
    # "C:/Windows/" for WinXP, "C:/WINNT/" for Win2k
    <Directory "C:/Windows/Microsoft.NET/Framework/v*/ASP.NETClientFiles">
        Options FollowSymlinks
        Order allow,deny
        Allow from all
    </Directory>

</IfModule>


Save file.
Create directory C:\www\webroot\sampleapp
Place any of the listed ASP.NET type files into this directory.
Start Apache.
Access as http://localhost/sampleapp/file.type

Here is an example...
helloworld.aspx
Code:

<%@ Page Language="VB" %>

<html>

   <body>

      <% Dim I As Integer
         For I = 0 To 7 %>
         <font size="<%=I%>"> Hello World! </font> <br>
      <% Next %>

      The time And date is now <%=now()%>

   </body>

</html>
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #1 on: May 06, 2006, 06:56:07 PM »

Consider using the latest snapshot release over the official release...

Official Release
v2.0.0 released 20-Nov-2004
(built under VC++ 2002 -- .NET v1.0)

Snapshot Release
v2.0.0.2003-snapshot-rev-rev280885 released 14-Sep-2005
(built under VC++ 2002 -- .NET v1.0)

http://httpd.apache.org/dev/dist/mod_aspdotnet/

And check the Mailing Lists (dev) and the Bug Database for solutions to any problems encountered...
http://mail-archives.apache.org/mod_mbox/httpd-cli-dev
mod_aspdotnet Bugzilla
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #2 on: May 06, 2006, 07:24:14 PM »

There is also a win32 version of mod_mono that runs ASP.NET and uses the .NET Framework...
http://www.mono-project.com/ASP.NET

Though its quite different from mod_aspdotnet...
http://mail-archives.apache.org/mod_mbox/httpd-cli-dev/200602.mbox/browser
Quote

At the present time, mono, via mod_mono, is a simple http proxy to a backend
mono http server running their implementation of the ASP.NET framework.  From
my earlier understanding, it was not implemented using the System.Web.Host
framework in the same way as Microsoft, but tightly coupled between their
http server implementation and the ASP.NET environment, meaning that plugging
in an alternate System.Web.Host provider into System.Web.Hosting isn't viable.
It is notably not distributed in their 'Patent-Safe' distribution for the
Americas and other places that defer to Microsoft's patent claims.  [If I'm
wrong, please correct me.]
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #3 on: May 06, 2006, 07:53:52 PM »

I just noticed this and have updated the above config code.

Quote

    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>


This will only work for WinXP. Change the above two references to "C:/Windows/", to "C:/WINNT/" if you are using Windows 2000.

If you are not sure what your %systemroot% directory is, run either of these two echo commands under cmd.exe...
echo %windir%
echo %systemroot%

Also, here is the aspnet.conf example that is out of the trunk branch...
http://svn.apache.org/viewcvs.cgi/httpd/mod_aspdotnet/trunk/aspnet.conf?view=markup
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #4 on: May 06, 2006, 09:11:36 PM »

It also seems that you need to use .NET Framework v1.1, and not v1.0, for best results.
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #5 on: May 07, 2006, 08:45:19 PM »

.NET Framework Versions and Side-by-Side Installations
Quote

Visual Studio .NET 2002 released with version 1.0 of the Microsoft .NET Framework SDK; Visual Studio NET 2003 released with version 1.1. If you have one of these versions of the .NET Framework installed, Visual Studio 2003 allows you to choose which version your projects support.

Visual Studio 2005 ships with version 2.0 of the .NET Framework. Visual Studio 2005 does not allow you to choose to support version 1.0 or version 1.1 of the .NET Framework. You can only create projects that support version 2.0.


If you are going to build mod_aspdotnet yourself, you will need to use VC++ 2003.
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
davecpm
Member
*
Posts: 4


View Profile
« Reply #6 on: May 08, 2006, 03:25:03 PM »

I'm running Windows XP Pro; .NetFramework 1.1(v1.1.4322 )

I installed Apache 2.2.2 and it works fine with the default page (It Works!)

I downloaded mod_aspdotnet 2.0.0.msi  installer.
1.  When running this, I receive the following message:
"C:\Program Files\Apache Software Foundation\Apache2.2\ is not a valid path to an installed instance of Apache. "
I tried multiple different paths, all with the same result.  

2.  I then unpacked mod_aspdotnet 2.0.0.msi   and placed mod_aspdotnet.so into C:\Program Files\Apache Software Foundation\Apache2.2\modules directory.  I placed Apache.Web.dll into C:Windows\System and C:Windows\System32 directories.  Apache now will not start and I receive the following message:
"httpd.exe: Syntax error on line 69 of C:/Program Files/Apache Software Foundation/Apache2.2/conf/httpd.conf: Cannot load C:/Program Files/Apache Software Foundation/Apache2.2/modules/mod_aspdotnet.so into server: The specified module could not be found. "

Any ideas on how to solve these issues?
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #7 on: May 08, 2006, 03:55:18 PM »

Quote
C:\Program Files\Apache Software Foundation\Apache2.2\


1) The msi might be searching for apache.exe -- you have httpd.exe

2) It might be all those spaces. Install Apache to a PATH that has no spaces. Also no "."

Also, you need to let the msi run as it will register some dlls.

And, use the mod_aspdotnet snapshot, not the official release. The only reason it's a snapshot is because the dev team could not get enough people to give feedback and vote when it was released. It *might* be able to handle Apache 2.2?

I have read that W. Rowe has builds for .NET 2.0 and Apache 2.2 -- but I can not find them anywhere.

You can pull the latest source from the Apache-SVN, read the directions, use VS2003 and build mod_aspdotnet for Apache 2.2 yourself -- though its a bit more complicated than that.
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
davecpm
Member
*
Posts: 4


View Profile
« Reply #8 on: May 09, 2006, 02:49:40 AM »

I have removed Apache and reinstalled into C:\SW\Apache222  .
Thus getting rid of any spaces in the path.
I've run the sample page from http://localhost and it displays correctly (It works!)

1.  After the install of Apache, there is no file by the name of apache.exe in any of the apache directories.  It is also not in any path; I tried running apache from the command line and it's not found.

2.  I have now installed in C:\SW\Apache222  directory.  The mod_aspdotnet snapshot does not like this path either. I get the message " C:\SW\Apache222    is not a valid path to an installed instance of Apache. "  The official release of mod_aspdotnet  shows the same message.

Looks like my next step will be to build manually.  I'll save that for another night.   :(
Thanks.
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #9 on: May 09, 2006, 03:15:27 AM »

Quote

1) The msi might be searching for apache.exe -- you have httpd.exe


Quote

After the install of Apache, there is no file by the name of apache.exe in any of the apache directories. It is also not in any path; I tried running apache from the command line and it's not found.


Apache 2.0 is apache.exe
Apache 2.2 is httpd.exe

From the readme.txt
Quote

Note that the .msi package searches for bin/apache.exe up to 3 levels
deep from the local hard drives, in sequence.


How about just creating a dummy file named apache.exe? See if that works -- use the snapshot.
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
Jorge
Customer, Basic Support
Guru
*****
Posts: 544

jorge_schrauwen@msn.com
View Profile WWW
« Reply #10 on: May 09, 2006, 02:27:04 PM »

IIRC the message that wrowe build for .net 2.0 was on the dev maillist some time ago... is the source available? then I'll give it a shot.
Logged

admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #11 on: May 09, 2006, 04:36:30 PM »

I do not think it is publicly available. You could always e-mail him and ask for it. Aside from that -- I think the development of mod_aspdotnet has been abandoned (due to lack of developers, testers, and general interest), though something I read on the dev list also said something about mod_aspdotnet being 'finished' (as in its done and complete for the most part).
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
davecpm
Member
*
Posts: 4


View Profile
« Reply #12 on: May 10, 2006, 02:39:46 AM »

OK, things are improving . . . I created a dummy apache.exe in the bin directory.  I was able to successfully install mod_aspdotnet snapshot !

But now, Apache service will not start ;  I get the following message in Application Event log:

"The Apache service named  reported the following error:
>>> httpd.exe: Syntax error on line 485 of C:/SW/apache222/conf/httpd.conf: Cannot load C:/SW/apache222/modules/mod_aspdotnet.so into server: The specified module could not be found.   "

I'll reboot after posting this message. . maybe that will help.  

I'm sorry to see the previous post . . . I do hope that mod_aspdotnet will continue to be updated as needed.  I work in an environment where everyone hates IIS and will not consider it.  If developers are giving up on mod_aspdotnet, I suppose my next endeavor will be to check out MONO on Linux.
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #13 on: May 10, 2006, 02:44:38 AM »

You can also check out mod_mono.

The mod_aspdotnet module is just a type of proxy to ASP.NET -- so I suppose after a point there is not much more to develop. There is an active bug database for it.

Also, the code in the repository looks like it can handle Apache 2.2 (It has Release Apache 2.2 targets). You just might need to build it yourself.
« Last Edit: April 05, 2007, 02:22:35 AM by admin » Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
davecpm
Member
*
Posts: 4


View Profile
« Reply #14 on: May 10, 2006, 02:50:07 AM »

Rebooted and still get the same message . . .
I'll look into building this myself.  Thanks for all of your help.

I believe I checked out the bug report. . . It seems that all the reports were over six months old.
Logged
Pages: [1] 2 3 4
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!