ASP.NET Website issue - will not load externally - asp.net

I have a site that works fine on the server itself. I can browse to the site from within IIS or by launching a browser on the server itself. However, if I try to access this externally, I get a 404 error.
I have tested DNS for the domain in question (www.phanetworktest.com) and that is not the issue. I was able to create another site with a single, simple HTML page and the site was then accessible outside of the server. I believe it is either a configuration issue with IIS or maybe a problem with the application itself. It is an ASP.NET 4.6 application.
The error when I try to navigate to the site externally is "404 - not found".
There is a variety of other sites also running on this server, including a classic ASP site, an ASP.NET 4.6 website, and two ASP.NET MVC sites.
Any help would be greatly appreciated.

Related

Mulitple application under Default website IIS asp.net

We have got a space in our company server with url tools.mysite.com which is a .net based web application. So its working fine in our domain. But now we have new requirement of setting up a new application under tools.mysite.com which is also a separate web project done in ASP.NET 4.0. Unfortunately I dont have any previous experience of setting up IIS single site with multiple application. But with little googling, I tried creating a applicaiton under Default website (tools.mysite.com) and specified the physical location and alias as downloads.
So obviously as I expected I am getting that path in browser like this and for testing I put a test.txt file there.
tools.mysite.com\downloads\test.txt
which is working fine
But the challenge is when I try
tools.mysite.com\downloads\default.aspx
its triggering an error resource cannot be found. But default.aspx is there which is my home page I have created and its loading fine when I run the application from Visual Studio itself.
So please help me to run my second .NET based application.

Why a 404 on every available page on a Web Site project?

I've just opened a Web Site project found on my predecessor's machine and - I hate the things and don't ever work with them - I get a 404 on every link I click, while the page is definitely present. If I directly view the individual page in the browser, that page works fine, except for any links on it to other pages.
It's like the built-in dev web server isn't operating and interpreting URL requests, but I have no idea where to look to clear this up.
USING IIS: If I create and deploy this site under IIS, everything seems to work normally.
MY MAIN QUESTION IS: Why do pages get not get served on this site and do get served on similar sites, under debugging a Web Site project on VS2012. It is not how to solve the problem by deploying to IIS.

ASP.NET Friendly URLs 404 errors

When I start a web app by loading a page deep in the site, I consistently get a 404 error when using ASP.NET Friendly URLs.
I can reproduce this by:
Start web app by loading page in website root
Navigate to page such as /Manage/ViewEmployee/1
iisreset
Reload page /Manage/ViewEmployee/1
Step 4 will always result in a 404 error. I can reproduce this consistently in my test environment:
Windows 2008 R2
IIS 7.5
ASP.NET 4.5
Microsoft ASP.NET Friendly URLs 1.0.0
I cannot reproduce this issue, however, with IIS Express on Windows 7.
Are there any web.config settings that I can add to address this with IIS 7.5?
Were you able to load the page in the first place by entering the URL in the browser? I suspect the issue to be a problem with the URL and not with the IISRESET. Since you are using the latest version of IIS, there should be no problems with the settings too for handling friendly url's.

asp .net 4.0 app on IIS7 Error 404.17

I am having a problem setting up a website under IIS 7. I have created an application and the application pool for the application. Application pool is using .Net Framework 4.0 as my .net app is written in .Net Framework 4.0. Application pool is set to use classic Pipeline Mode. MIME Types have been automatically added to .asp & .aspx.
When I run the website windows explorer is showing me "View Downloads" and trying to download "application name localhost" when it downloads the file I notice that its the html of my default.aspx. I have checked Default Document and it contains Default.aspx.
If I remove .asp & .aspx MIME Types then I get an error: HTTP Error 404.17 - Not Found The requested content appears to be script and will not be served by the static file handler.
I have seen this problem many times. IIS is not serving aspx pages and most likely is not running for the entire server or that site.
For the entire server: Check to see if iis world wide web service is running.
For the site alone: Hit run inside IIS.
You can easily know if IIS is running properly by going to IIS and hit the browse option from inside a web site.
With the data you have put these are the things I would try in order if I were you:
Check in Server Manager/ Features if ASP.NET is installed (ServerManager/Roles/Web Server(IIS) look for ASP.NET
Check IIS Manager if everything is ok by:
Try to browse a test.html file to see if you are able to browse normal
Check Basic settings by clicking Test Settings
Check Handler Mappings to see if aspx is there.
Try to browse a sample test.aspx page with test data.
Check Application pool settings.
Reinstall Framework 4.0
Reboot machine ( a classical)
If you gave us more info and/or the ouput of my proposed tests maybe can help more. Good Luck :)
I had the 404.17 error happening on a server today. As you and cad mentioned, I checked the framework of the Application Pool that my site was using to make sure it was set to ASP.Net 4.0, and it was. What happened in my case is that my site was not using the application pool that I thought it was. My site was nested under another site, meaning my site pointed to a subfolder but another site was pointing to the root folder. Even though I had my site set to use the ASP.Net 4.0 Application Pool, the root site used a different Pool that had ASP.Net turned off, it was set to "No managed code". When I set the framework to 4.0 for the Pool the parent site was using, then my site started working.
In my case the solution was fixing the Handler mappings as explained here: http://forums.iis.net/post/1943489.aspx
IIS Manager->high-light you web site->click Handler Mappings icon on
the home pane->click Revert to Parent...
on the right Actions pane

Precompiled .NET app receiving "Internet Explorer cannot display the webpage"

We have a web server that is running many web applications. When I took over this server, I noticed that the sites were not precompiled, so in an effort to clean it up, I precompiled the site using the Publish option in VS2008 (and allow the precompiled site to be updatable).
When I deployed the site to the web server, the site stopped working - In IE, I get "Internet Explorer cannot display the webpage" - in firefox I get "Unable to connect. Firefox can't establish a connection to the server at >>sub.domain.com<<". Here are a few things I've noticed:
I am able to manually browse to the one static .html file that is part of the site
If I replace the precompiled files on the server with uncompiled code, the site works fine
If I switch the application pool to use .NET 4.0, I get errors with duplicate system.web.extensions module, which I would expect to see with an application built for .NET 3.5.
When I initially browse to the site after a fresh IISRESET, the app redirects to /Login.aspx, which the web.config defines as the forms auth login page. It then redirects to /default.aspx and displays the error in question.
CustomErrors is OFF, debugging is ENABLED, and yet I don't get a helpful .NET error page, and I see no System or Application-level events in the Windows event log.
Any hints as to why this might be happening? I was able to successfully precompile another site on the same server with ZERO problems.
I found the problem myself. The login page was redirecting to HTTPS if the host header wasn't localhost. I noticed that in the uncompiled site, someone manually went into the .VB file for the login page and added the specific domain for the beta site into this check, preventing the redirect to HTTPS. I copied the code into my local, recompiled, and deployed, and now the site works as expected.

Resources