Mono on Linux plus MVC3: Root directory shows file/folder list on web browser - linux

I'm struggling getting my MVC3 site I developed on Windows to correctly run on Linux (Ubuntu) and Apache using Mono 2.10.5.
When I browse to the site root via my web browser, I see my file/folder structure instead of the home page of the site, which appears to me as though routing is not working. Everything works fine on my development environment on Windows.
When in this view, if I click on Global.asax, for instance, I see the standard ASP.NET "yellow screen of death" (YSOD) with a 500 error stating "Could not load type 'System.ComponentModel.DataAnnotations.KeyAttribute' from assembly 'MyWebSite'.".
On the bottom of the YSOD, I see the following: Version information: Mono Runtime Version: 2.10.5 (Debian 2.10.5-1); ASP.NET Version: 4.0.30319.1
I've followed the instructions for configuring Mono for MVC3 here: http://www.integratedwebsystems.com/2011/06/get-mvc3-razor-running-on-mono/
Does anyone have any clues as to why the file/folder structure is being listed when I visit the site root from my browser?

It turns out that mono was running under port 8080, and I couldn't configure it to run on port 80 due to a conflict with another module. I am able to run things fine on port 8080 now.

Related

why the localhost page isn’t working in lampp (Ubuntu)

I am trying to run my cakephp project in LAMP. My LAMP is already running phpmyadmin and it is also working well for another project. When I search http://localhost/mobishop/ then it works only home page. If I go to my panel with http://localhost/mobishop/mobiadmin it does not work and shows this message: "The localhost page isn’t working."
this is my browser screen short:

Access Remote Glassfish4 Server from Eclipse Luna

I am working on a Mac.
I am running Linux Ubuntu server in a VirtualBox. GlassFish 4 and MySql are already running there. The Linux IP is 10.0.1.12.
On the guest system (Mac) I am running Eclipse Luna. I installed the GlassFish Tools for Eclipse Luna and restarted Eclipse.
Then I wanted to add server for GlassFish4. But Eclipse is asking me for "Server root" and I have no clue what it means! I entered "10.0.1.12:4848/" just as I can access GlassFish from the host system (Mac OS) by a browser. But it just doesn't accept that URL. It seems to expect a local directory path. Here is the dialog box:
Thanks in advance for any hints!!
You need to install a Glassfish4 Server to your local machine (the one Eclipse is running on) despite the fact that you want to connect to and manage a remote Glassfish server; Eclipse will use some of the files in that local installation to manage the remote Glassfish server. Assuming you already have Glassfish4 installed on a remote machine:
[For example purposes]
Let's assume the remote Glassfish server is at 192.168.2.7 on default port 4848 for administration and you've set a password for 'admin' user as 'gfish'.
Let's also assume that your local desktop (development machine running Eclipse Luna) is at 192.168.2.3
Download Glassfish4 Open Source edition zip
Unzip the contents to a directory on your local machine: let's say inside of path /glassfish_server/ you will now have:
/glassfish_server/glassfish4/glassfish/ structure
Back in Eclipse:
Create a New Server -> Select 'Glassfish4' option
Server's Hostname =[remote ip address] // E.G. 192.168.2.7
Server Name: GlassFish 4 at 192.168.2.7 // get's auto-filled
[Next] This is the page you were specifically having issue with:
Set the Root Path to your Local Glassfish Server install directory
so in this example: /glassfish_server/glassfish4/glassfish/ should be accepted
[Next] Now use the credentials and configuration for your remote glassfish server. Run a Ping-Test to test connection.
The server root means the directory where GlassFish is located. This might be, for example, /opt/glassfish4/glassfish. Eclipse needs this so that it can look for the bin/ directory and be able to start/stop the server using the scripts in there.

CSHTML not rendering under mod_mono/mono3.2.5

Background:
I currently have a working ASP.NET4.0 + Razor2.0(view engine only, no MVC) + mod_mono + Apache + mono3.0.4 + Ubuntu12.10 on a cloud server provider. I found another service provider which is more cost-effective than my current one.
The Issue:
This server is running on Ubuntu13.04 and was able to compile Mono 3.2.5(the latest release on Mono site). I configured it almost identical to my other server and made a simple CSHTML page which works on my MSVS2010; a simple page with layout. I uploaded everything to the directory and when I tried to open the page, instead of being rendered, the server only let me download the whole cshtml file.
I added these lines in mod_mono.conf:
<IfModule mod_mono.c>
MonoAutoApplication enabled
MonoServerPath /usr/bin/mod-mono-server4
</IfModule>
AddType application/x-asp-net .cshtml
Then on my virtual hosting file for Apache2, I added these lines to let Mono handle everything:
<Location /mono>
SetHandler mono-ctrl
Order deny,allow
allow from all
</Location>
My configurations are identical to my previous server which is working properly. The only difference I know is I'm using Mono 3.2.5 and Ubuntu 13.04, also I'm using the master branch of XSP, mod_mono, and libgdiplus. I pulled the code through git.
UPDATE
I checked again the the current stable version of Mono and found out that it is 3.2.4 so I re-compiled it to this version but the the issue is still there.
UPDATE 10-Dec 2013
I was able to rebuild the server using Debian 7.0 and it is already running ASP.NET 4.0(and theoretically even 4.5). It can now run properly execute regular ASPX but not CSHTML.
The page runs properly under IIS on MS Windows 7 but it can't render and just download the page when I try to run it on mod_mono(mono 3.2.7 runtime) + Apache2 + Debian or XSP4 + Windows 7 though both can run ASPX pages properly. This test site still runs on my older server running mod_mono(mono 3.0.4 runtime) + Apache2 + Ubuntu 12.10. Both servers have the same configuration on both mod_mono.conf and site(/etc/apache2/sites-enabled/000-default) but can't make it run on my new server.
Even if the following are already in the GAC, copying and placing the files in the "bin" directory fixed the issue:
System.Web.Helpers.dll
System.Web.Razor.dll
System.Web.WebPages.dll
System.Web.WebPages.Razor.dll

Beginner - setting up local host for Angular app using XAMPP on Windows 7

I have taken a Angular App which works on Local host when I use visual studio IIE server.
I don't want to use Visual Studio and I am trying to test the app locally using XAMPP.
I am a complete beginner, and I cannot get the local host to pick-up the html initialization file. I have checked the following:
Skype is off and the port is set to 80 in XAMMP
the root server in HTTPd.conf is setup correctly (no slash at end)
I am getting a little confused as to 'how' angular will work on the XAMMP local host.
Do I need to get Yeoman or grunt (seen these apps in some posts, but they seem to be for command line environment).
Any help, or even a pointer to a step by step set-up would be great!
Angular is no different from a normal html web page, when it comes to working in a localhost.
Does your XAMPP work with standard HTML files?
Do you have any error generated?
OK. Got this sorted. I was over complicating things entirely, angular runs sweet on regular XAMPP, no Grunt/ Yeoman etc. required.
All you need to do is: 1. install XAMPP 2. Close Skype 3. Place you app, libraries and everything else in the folder C:\xampp\htdocs\
localhost/Angularappstartpage.html
BOOM!
it works.
You may need to adjust the port number on the localhost (default is 80 e.g. localhost:80/...)
You can also change the root folder in your XAMPP config setup to point to your local GIT.
Do this by changing the line in the HTTPD.conf file (click 'config' on the apache module)
DocumentRoot "C:/xampp/htdocs" to DocumentRoot "C:/myLocalGIT"
Hopefully this will help all the new guys out there. Good luck!
Skype blocks the port 80, which is used for browsing. XAMPP uses the same port so exactly.
https://support.skype.com/en/faq/FA148/which-ports-need-to-be-open-to-use-skype-for-windows-desktop
If you use mysql, also open first XAMPP and start your services and then keep working on your SO as always.

PHP JAVA Bridge

I am very new to Linux but I am trying best to learn. We have dedicated hosting server of CentOS 6. It is configure with Apache Server as our public website. Now we need to install PHP JAVA Bridge on it.
What I did is, I install TomCat 6 and jdk 1.6. Then I copy JavaBridge.war file to $CATALINA_HOME/webapps folder and jar files on $CATALINA_HOME/lib folder. When I check from tomcat 8080 port JavaBridge is working very good.
Then I make symlink of $CATALINA_HOME/webapps/JavaBridge on my apache server. Untill here everything is okay
But when I try to browse from browser like http://www.xxx.com/JavaBridge I will get following error
You don't have permission to access /JavaBridge/ on this server.
Apache Server at www.gizeleonline.com Port 80
Now my question is that do I am doing it in wrong way or do I have to get rid of Apache server or I am missing something.
Kindly help on this experts :)
Actually it was my mistake. I just re-image my server and re-install everything it start working everything. thanx for help every body

Resources