views:

502

answers:

3

Hi,

My department doesn't have a server to host web applications developed in ASP.NET. They do have RHEL boxes having Apache web server, which won't host my ASP.NET web pages. I inquired and they said they have mono which would run my .NET applications.

I created a simple web page and it worked on my windows laptop.

My question is what exactly should I copy to my home directory (has CGI environment) on the RHEL box. Copying dll's won't make sense, so should I copy the .aspx files?

I read a bit about it here http://www.codeproject.com/KB/cross-platform/introtomono2.aspx

They say just copy the .aspx files. In that case how does it all work? I mean does mono compile the .aspx files and makes it compatible for Apache to host them?

Does it have any flip sides like everything I develop in ASP.NET on windows can be shown on linux web server as it is using mono?

cheers

+2  A: 

If you are using the Website model, you should copy the whole directory contents (they'll be compiled at run time). If you are using the Web application model, you can skip copying .cs files (the .cs files will be compiled to .dll files in the bin folder beforehand). You should copy bin folder instead, along with all other .aspx, .ascx, .asax, .config, ... files.

Mehrdad Afshari
A: 

Copying DLLs does make sense since they are MSIL and that is exactly what Mono needs.

chris166
+1  A: 

Your Apache server should have mod_mono configured or should use xsp2. Copy your ASP.NET code to the a dir on the Apache server and configure the directory in Apache and it should work.

Sajee