logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Third-party Modules View previous topic :: View next topic
Reply to topic   Topic: mod_aspdotnet not working
Author
bbxrider



Joined: 24 Feb 2007
Posts: 27
Location: stocktown ca

PostPosted: Sat 13 Sep '08 21:43    Post subject: mod_aspdotnet not working Reply with quote

i'm running win xp pro and Apache/2.2.4 (Win32) PHP/5.2.1 mod_aspdotnet/2.2

when pointing browser to index.aspx for the test i get:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request. please contact .......

in the error log there is no error messages that i can see, see following for the messages written during a restart, they seem to look ok

[debug] mpm_winnt.c(481): Parent: Sent the scoreboard to the child
[debug] mod_aspdotnet.cpp(336): mod_aspdotnet: Module initialization commencing...
[notice] mod_aspdotnet: CorBindToRuntimeEx has loaded version v2.0.50727 of the .NET CLR engine.
[debug] mod_aspdotnet.cpp(388): mod_aspdotnet: Module started .NET CLR...
[debug] mod_aspdotnet.cpp(425): mod_aspdotnet: Module initialized .NET default AppDomain...
[debug] mod_aspdotnet.cpp(479): mod_aspdotnet: Module initialized HostFactory...
[debug] mod_aspdotnet.cpp(491): mod_aspdotnet: HostFactory configuration complete.
[debug] mod_aspdotnet.cpp(786): mod_aspdotnet: Sucessfully created Host for /SampleASP mapped to C:/sampleAsp

in the access.log i get this 500 error:

"GET /index.aspx HTTP/1.1" 500 541

to resolve the address i am using the virtual host redirect for the domain i'm using.

i have not seen anything to help with the 500 541 error and am stuck with nothing more than what i have in the logs.

anybody have experience with this, does it really work?

[img][/img]
Back to top
PipoDeClown



Joined: 20 Dec 2005
Posts: 77

PostPosted: Sun 14 Sep '08 19:59    Post subject: Reply with quote

Misconfiguration...
Unless your documentroot is also at C:/sampleAsp .

Quote:
[debug] mod_aspdotnet.cpp(786): mod_aspdotnet: Sucessfully created Host for /SampleASP mapped to C:/sampleAsp


It's how Asp.net works.
Define a directory as an Asp.net application and then ur good to go.
Maybe u can do it with a .htaccess instead of editing your apache conf's and restarting if u install a new asp.net application.
Back to top
bbxrider



Joined: 24 Feb 2007
Posts: 27
Location: stocktown ca

PostPosted: Sun 14 Sep '08 21:20    Post subject: mod_aspdotnet not working Reply with quote

thanks for the reply

its all making more sense now how it works, especially after your reply and reading the comments in the asp stuff added to the conf file Embarassed , but still getting the same 500 541 error and no new messages in the log files

i set a virtual host to the c:/sampleAsp for the DocumentRoot
i tested phpinfo in that virtual host dir and it works so i know at least the virtual host can work out of the sampleAsp dir for non asp files, for all this testing i'm using a domain name, not localhost

i've got my LogLevel set to 'debug', would another level give more info on this?

any other ideas, or am i still missing something very basic?
Back to top
PipoDeClown



Joined: 20 Dec 2005
Posts: 77

PostPosted: Mon 15 Sep '08 21:55    Post subject: Reply with quote

i assumed you have installed mod_aspdotnet-2.2.0.2006-setup-r2.msi from http://mod-aspdotnet.sourceforge.net/

first u need to setup a common config somewhere in httpd.conf
Code:
# 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

# 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>


then define your asp.net application this is just an example from the documentation
Code:
# Mount the IBuySpy C# example application
AspNetMount /StoreCSVS "C:/StoreCSVS/StoreCSVS"

# Map all requests for /StoreCSVS to the IBuySpy application files
Alias /StoreCSVS "C:/StoreCSVS/StoreCSVS"

# Allow asp.net scripts to be executed in the IBuySpy example
<Directory "C:/StoreCSVS/StoreCSVS">
    Options FollowSymlinks
    AspNet Files
    Order allow,deny
    Allow from all
    DirectoryIndex Default.htm Default.aspx
</Directory>


i think you can define your documentroot as an Asp.net application with
Code:
AspNetMount / "C:/Apache2/htdocs"

and add AspNet Files to the section where u define your documentroot directory, like this:
Code:
<Directory "C:/Apache2/htdocs">
    Options FollowSymlinks
    AspNet Files
    Order allow,deny
    Allow from all
    DirectoryIndex Default.htm Default.aspx
</Directory>


this should work.
of course you can define a AspNetMount inside your virtualhost.
a Alias is needed when your AspNetMount is outside the documentroot
and dont forget AspNet directive
Back to top
bbxrider



Joined: 24 Feb 2007
Posts: 27
Location: stocktown ca

PostPosted: Tue 16 Sep '08 7:23    Post subject: Reply with quote

[color=blue]assumed you have installed mod_aspdotnet-2.2.0.2006-setup-r2.msi from http://mod-aspdotnet.sourceforge.net/
yes installed

first u need to setup a common config somewhere in httpd.conf
Code:
i used the .conf setup based on these instructions,

http://weblogs.asp.net/israelio/archive/2005/09/11/424852.aspx

they look very similar to your instructions, all the directives etc i added is in one big block at the end of .conf
i was trying to run asp out of a directory i created, called c:/apacheAsp, what i have in my conf file is after the ******
the big difference i see is:
- ifmodule statement that surrounds everything
- i don't follow what your saying about htdocs


************************************************************
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 /apacheAsp "c:/apacheAsp"
#/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 /apacheAsp "c:/apacheAsp"
#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:/apacheAsp">
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>
Back to top
PipoDeClown



Joined: 20 Dec 2005
Posts: 77

PostPosted: Tue 16 Sep '08 8:19    Post subject: Reply with quote

PipoDeClown wrote:
and dont forget AspNet directive


from the docs:
Quote:
The AspNet directive determines what content may be served by the ASP.NET host. This directive does -not- actually expose the content or mount the URI to physical files, you must use the Alias and AspNetMount directives to expose the content to the remote user.

The AspNet files directive is the equivilant for ASP.NET files to the behavior of Options ExecCGI for CGI content. In the original version of mod_aspdotnet, in fact, Options ExecCGI was used to determine if ASP.NET content would be invoked through mod_aspdotnet. In version 2.0.2 and later, this is no longer true, and your configuration files must be updated from Options ExecCGI to AspNet files.

The None option disables all ASP.NET processing, while the individual options below enable ASP.NET processing for specific request types:

All
All options below. This is generally not a recommended setting.
Files
Files that exist in the filesystem, which are directed to the asp.net handler.
Directories
Directories that exist in the filesystem, which are directed to the asp.net handler. This can be used to invoke an HttpHandler to produce custom directory listings.
Virtual
Requests that map to neither a file nor directory in the filesystem, which are directed to the asp.net handler. This is used to invoke any HttpHandler which accesses non-file based resources, such as ASP.NET remoting requests.
Error
Error result pages generated by ASP.NET. This option bypasses the normal Apache ErrorDocument error content. This is required to return the full debugging results from the ASP.NET environment in development environments. Caution is urged before using this option in production environments, where path-revealing flaws should be avoided.

Normally, if multiple AspNet directives could apply to a directory, then the most specific one is used and others are ignored; the AspNet directives are never merged. See how sections are merged for a better understanding of which Files, Directory, or Location section will take precedence.
Back to top
bbxrider



Joined: 24 Feb 2007
Posts: 27
Location: stocktown ca

PostPosted: Fri 19 Sep '08 18:51    Post subject: making progress Reply with quote

i made the change to the directory directives
<Directory "c:/apacheAsp">
Options FollowSymlinks
AspNet Files
Order allow,deny
Allow from all
DirectoryIndex index.htm index.aspx
#default the index page to .htm and .aspx
</Directory>

now the htm runs but the asp script appears in the browser (which is scary) trying to resolve that, i found a link, http://www.apache-asp.org/faq.html
that talks about compiling with expat disabled, is there a way i can check that and then if not disabled, recompile my version with expat disabled?
Back to top


Reply to topic   Topic: mod_aspdotnet not working View previous topic :: View next topic
Post new topic   Forum Index -> Third-party Modules