How to run an ASP.NET web page on Ubuntu Server? - asp.net

I have been trying to follow this tutorial to the letter:
http://library.linode.com/frameworks/mod-mono/ubuntu-10.04-lucid
Here's what I have done so far:
Installed Ubuntu server and successfully run it
I can access and HTML page perfectly fine on the server
I installed MONO on Ubuntu server
I created /srv/www/example.org/public_html & logs
I added the link to the /ect/apache2/sites-available/example.org
I added my ASP.NET file to /srv/www/example.org/public_html/test.aspx
I added a config file: /srv/www/example.org/public_html/test.aspx
I then reloaded apache and went to the web page
I came to a site that listed the available files. I saw web.config and test.aspx. When I click on test.aspx it shows the code instead of the ASP web page. What am I doing wrong?

Basically, Microsoft did just about everything possible to ensure that you need to run ASP.Net on a Microsoft server.
Nevertheless, you should be able to run at least some .aspx scripts on an Apache server, using mod_mono.
Q: Are you sure you installed the mod_mono plugin correctly?
Q: Are you sure you configured Apache to recognize the mod_mono plugin, and invoke it for .aspx files?
Here are a couple of other links that might help you:
http://mono-project.com/Mod_mono
https://help.ubuntu.com/community/ModMono
Note in particular the "troubleshooting" tips at the bottom of the Ubuntu link.

Related

HTTP Error 404 when trying to browse aspx

I am trying to browse some aspx pages which are part of MVC application.
I have tried the usual steps such as installing asp.net using aspnet_regiis.exe -i -enable to no avail.
Weird things is that its working fine in the development environment but failing in our UAT environment. Same machine/environment as far as I can see. Only difference I can see is that when I look at the contents view in IIS for the folder holding the aspx pages, on dev the type of the files says ASP.NET Server Page whereas on UAT it says ASPX File. Everything else seems to be the same on both machines.
Server details: Windows Server 2008R2 Standard Service Pack 1
All help greatfully appreciated.

aspx pages downloads after hosting in IIS?

We hosted the website in IIS. When we test the home page of our site IIS suddenly offering to download the aspx page instead of rendering .
We hosted the website in IIS 7.0. Website developed with DotnetFramework 4.0.
Please help me in identify the bottom of the problem.
You'll need to drop into the command prompt and navigate to the folder;
c:\windows\microsoft.NET\Framework\V4.0.30319\
and type the command aspnet_regiis -i
this will configure the IIS server to correctly process the aspx files - not sure why it would work previously and then suddenly stop working, have you used this explicit version of .NET on this server before?
You have to configure it once again. Before that, follow some steps mentioned below:
You have to build the web application within your Visual Studio.
After successful build,you have to publish the application and save that published copy to specific folder say 'MyPublieshedApp'.
Start IIS and add new website. You have to point the folder which contains the published content of your application. In this case the folder should be 'MyPublishedApp'.
Set the application pool and set the framework version to ASP.NET 4.0.
5.Then browse one of the page after configuring it into the IIS.
May be this will help you.

ASP.NET pages not loading on IIS8 (Windows Server 2012)

I am trying to set up my Windows Server 2012 to run an ASP.NET website. The website can serve html pages and .svc pages, but whenever I visit an .aspx page, it will simply time out.
Error 118 (net::ERR_CONNECTION_TIMED_OUT)
If I would at least get some sort of error description, I could go from there, but I just get a timeout message, as if the server is completely unavailable, so I am stuck with this problem.
It seems the aspx pages are not loaded at all, since I've already tried drastic measures such as putting a "throw Exception" in the first line of Page_Load.
If I create a new site and put just an aspx page in there, it executes fine.
The Event Log is not showing anything in relation to this.
Does anyone have any suggestions?
Creating a new web site in IIS8 and pointing to the same folder made it work. Now the site is working fine and running code as normal.
My guess is, that if I created the website before installing all needed features, they were not part of that site. Now, after installing a new site, it contains all the current features.
It doesn't make TOO much sense, though, as the server had ASP.NET 4.5 from installation (it's Windows Server 2012).
Open up the Web Platform Installer.
Now look for IIS: ASP.NET 4.5 and install that.
I had the same problem as everyone else and nothing worked until I did that.
There is a difference between installing dotNET on your computer/server and dotNET for IIS.

Changing "Project Url" causes ASP.Net Web app to not be debuggable

I have an ASP.NET Web Application project that I am using to host a WCF Data Services (OData) project.
I went and changed the url from:
http://localhost/MyProject
to
http://localhost/v1/MyProject
after I did that I created a Virtual Directory for the new project URL.
Now when I run I get this error:
Unable to start debugging on the web server. The web server is not configured correctly. See help for common configuration errors. Running the web page outside of the debugger may provide further information.
I clicked help but it was no help (was IIS 6 level instructions, I have IIS 7). I did some googling and it was all fairly generic responses.
How can I get this working again? (Aside from revert to my old Url. Reverting works but I changed it for a very good reason.)
Your virtual directory need to point to the same scr directory you were originally debugging against.
Also, make sure the virtual directory is configured for Windows Authentication, which is required for debugging.
I had to go to my website in IIS and add a folder under it called v1. After I did that it all worked perfectly.

IIS 7 Wont Open My Aspx Files

I am new to IIS and it is annoying the hell out of me!
I have an asp.NET website that runs beautifully on visual studio 2010, so what i do, is publish the website, put the published website folder in the inetpub/wwwroot folder, connect all the dots, then in my browser i type in http://localhost:8080/A3Media/ and it brings up my index.html page. So the IIS is working correctly because it happily displays .html files. but when i try and access a .aspx file in my website. I get i weird 404 error saying the document doesnt exist. When it obviously does exist because... I checked... multiple times!
So i deducted that my IIS doesnt like .aspx files or anything to do with asp.NET.
So i make sure that i have all the asp.net modules installed by following the usual "windows features" and making sure the asp.net folder is ticked and installed, along with all the depending asp.net folders.
and my website still doesnt work.
have i missed something?
i have no idea:(
One of two options spring to mind.
Have you registered ASP.NET? aspnet_regiis.exe -i Link
cmd -> cd C:\Windows\Microsoft.NET\Framework\v4.0.30319
C:\Windows\Microsoft.NET\Framework\v4.0.30319> aspnet_regiis.exe -i
In IIS manager - Request Filtering - Is .aspx denied?
Make sure you convert your "A3Media" directory into ASP.NET Application via IIS Manager, please see Deploying ASP.NET Websites on IIS 7.0 for more details.

Resources