HTTP Error 404 when trying to browse aspx - asp.net

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.

Related

ASP.NET Core RC2 403.14 Forbidden error

I am trying to set up an ASP.NET Core test website on my Windows 10 machine. I followed the steps found in the ASP.NET Core documentation (https://docs.asp.net/en/latest/publishing/iis.html), but when I browse to the site, I get a 403.14 Forbidden error. I can Run the app through Visual Studio, fine and everything is rendered as expected, but when I Publish the site, the error appears. A few other items:
The root of the site is pointing to the wwwroot folder of the published output as it should be.
I can place a static file in the wwwroot folder and access it through the browser fine. Problem only seems to happen when browsing to MVC code. When enabled, directory browsing works fine as well.
Routing, controllers, and views are set up correctly. I can Run and Debug the site in VS fine with an instance of Kestrel running.
I am trying to access the site via port 80 on a test URL specified in my hosts file (I am hosting a number of other sites fine on the same machine already with this common config).
The app pool is configured correctly using No Managed Code.
The IIS instance has full file permissions to the folder.
I am thinking I have something messed up in my installation (I had a previous install of HttpPlatformHandler installed previous to the RC2 where it was replaced by AspNetCoreModule). Any thoughts?

ASP.NET web application working on test server but not on production server

I have an application that we've recently converted from a Web Site to a Web Application, and migrated to a more modern server.
After some rigorous testing on what I'll refer to as our "test box", we launched the new version of the application, but we've had some strange errors, some of which are causing real trouble for our users.
When I press a button that previously performed some action, it now causes a 404 error (viewed using Chrome dev tools), to the path ScriptResource.axd?d=aaabbbbccc[snip].
The functionality works fine on the testing box, and the web.config files are identical on both boxes. ASP.NET, MVC etc. are all installed on the production box, as on the test box. The production box and test box are both running IIS7.5 on Windows Server 2008.
What am I missing?
Have you checked the other similar questions on Stackoverflow?
ScriptResource.axd 404 not found
scriptresource.axd 404 error in asp net 4 application - webresource works fine though
.axd files generate a 404 error
When I browse http://localhost:8004/elmah.axd, it generates 404 error

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.

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

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.

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