IIS 7.5 doesn't open aspx, html pages - asp.net

I have two ASP.NET sites on my IIS 7 (Windows Server 2008 R2)
First one works perfect, it opens default.aspx page any other aspx pages as well as html, but second site doesn't open neither .aspx nor .html links, so for example if I try to open http://mysite.com/Default.aspx url, it just shows an empty page without any content or any error.
What it could be?
Thanks.

Well, many things can be broken.
Few tips:
Start Chrome, Firefox (with Firebug addon) or Fiddler or any other http proxy and check what the server is sending - is it HTTP 200, 404, something else?
check IIS logs c:\inetpub\logs\Logfiles\w3svc
check EventLog
compare httpmodules in working website with those of the website which is not working
ensure correct app pool with correct .net version is set for site
try to convert website to webapp
if all fails, delete website and create it from scratch. If it works it may suggest that IIS metabase was damaged.

Another workaround that I suggest:
Open the "hosts" file using Notepad in C:\Windows\System32\Drivers\etc\hosts
then add
127.0.0.1 YourWebsite
Next, try to add binding to a site as suggested here at (http://technet.microsoft.com/en-us/library/cc731692%28v=WS.10%29.aspx)
I hope it helps you.

Related

Blank ASP.NET Webpage for the application deployed on IIS

I have an asp.net application deployed on IIS Server located at 10.0.0.74, when
i tried to access it with chrome browser i get an empty or blank webpage.
However if my colleague tries to access it from his computer he get normal webpage with content on it.
It seems really weird to me what might be the problem.
The screen shot below is what the page looks like.
I would appreciate any help
This is not enough to go on, assuming ASP MVC 5 on IIS here are some suggestions.
On your server
Check the following
Is the physical path in IIS correct - actually point to your code?
Do you have any rewrite rules in your web.config that could be redirecting?
Did you set up the bindings correctly?
Are you hitting the site under https / http?
Checked "Turn windows features on/off" and see if ASP.NET 4.8 installed
Did you setup the HTTP Redirection and HTTP Errors
See how you are setting up error handling setup in your global.asax, see here and disable it
Goto your Control panel > Programs and features > Turn Windows features on or off and under "World Wide Web Services" / components:
Common HTTP features:
Default document
Directory browsing
HTTP Errors
HTTP Redirection
Static Content
Security
Basic authentication
Request filtering
URL Authorization
Windows authentication
The problem was that the plugins in "Content" folder were not included in the projects.
I included all the files shown in the image below.
I apologize for wasting your time, i should have checked the console before!

Site functions locally, "Internet Explorer cannot display the webpage" on server

I have an ASP.Net Website (not a web app, fwiw) that builds and works just fine locally through IIS on my dev laptop.
However, when I publish it to our QA box and try to view while I'm remoting into that server, I get a message from IE saying "Internet Explorer cannot display the webpage". Firefox just spits back a quick "Connection Timed Out"
There is absolutely nothing in the event log nor the IIS log about this. I'm unsure where I can look for more info.
I'm fairly confident it is an ASP.Net issue. I can install a sample site from our vendor, Ektron, into IIS and it will run. If I overwrite the sample's web.config with my own, it continues to run. If I then blow away the entire sample site and copy over my site from my local, I'll get the message about how "Internet Explorer cannot display the webpage".
I've tried to keep the environments as close together as I can. Both boxes are running IIS 7.5 under an integrated app pool for .Net 4.0. I browse via localhost on dev and via an IP on the server.
I am not terribly familiar with the Website template, so I might be missing something obvious (I hope!). I'm hoping someone can provide some guidance into how I can get more info on what the heck is going on so I can resolve this issue.
UPDATE
I think I'm getting closer. By using Fiddler (thanks for the suggestion, Amy!) I notice that it redirects the request to SSL. SSL requires a different license from our vendor, so that might be it. I'm still trying to understand why that redirect is taking place, but at least I have something now to look at.
I'd look into the SSL settings in the web.config / IIS - settings for Mime Types and also into Ektron's MIME Types in the MimeType.config file. I found that some .aspx pages like (ekajaxtransform.aspx) weren't functioning correctly because of firewall/proxy issues/restrictions.
Hope it helps. :)

ASP.NET development server cannot find localhost ?

I have a web site opened in VS 2008 . I try to run it from VS2008 and the asp.net development server starts up.But the browser returns the following error
Firefox can't find the server at www.localhost.
The web address in browser is http://localhost:2921/WebSite2/Default2.aspx
There is no such thing as www.localhost, and nothing built-in to asp.net will redirect you automatically (unless you tell it to). Sounds like you have code that looks at the url and redirects to a www version if you're not there. You shouldn't do that, and instead use relative urls internally that work no matter which way a user hits a page.
Check following :
Are your proxy settings correct in your Firefox browser. Firefox->Tools->Options->Network->Settings.
Are you browsing the correct address, everytime you run/debug your website a dynamic port is assigned unless explicitly specified.

asp.net setting up subdomain on localhost

I added the following entries in the HOSTS file.
127.0.0.1 abc.localhost.com
127.0.0.1 xyz.localhost.com
Using the VS2010 ASP.NET Development server I am unable to run or execute the website.
When browsing http://localhost:2687/TestProject/ it shows up the default.aspx page. But when accessing http://abc.localhost:2687/TestProject/ it shows a website cannot be found page.
Is there anything else to be done when setting up subdomain on localhost.
EDIT: To make this work I removed the .com and in IE-->Connections-->LAN uncheck everything. Subdomains with port works are correctly getting forwarded. Nothing else need to be configured.
Obvious mistake is that in your hosts file you have abc.localhost.com, whereas you are browsing to http://abc.localhost/folder
Not the same thing.
Not sure this will work as you intend anyhow. I would also recommend IIS Express, part of WebMatrix, which I think is still in beta, or just use IIS. IIS 7+ on Vista, W7, Server 2008 is all really easy to use.
Use IIS or IIS express, rather than Cassini. (For several reasons, which you can google or look for on stackoverflow)
With the IIS you can easily add a hostheader entry to you webapplication with just 2 clicks.
Be aware, that you are assigning both a Url and a port.
So adding abc.localhost won't allow you to browse abc.localhost2687, just the default port (80). If you also want to browse to abc.localhost:2687 you need to a a hostheader entry according to that that Url and port.
This screenshot shows you the dialog to add hostheaders (the picture is from IIS 6, but in IIS 7 or IIS 7.5 it looks very similar)

Getting 404 with locall IIS 7 served page

My setup:
Vista 64-bit PC (my local PC)
IIS 7 obviously
VS 2008
I setup a new "Application" manually under the IIS default site. It's running.
The application is pointing to the correct directory (where my default.aspx exists)
I've setup this same exact setup on our dev server running Server 2008 and it runs fine
But for me, when I go to http://localhost/MyAppName I get a 404 not found.
I have no clue why.
So since that did not work and still got a 404, then I tried instead changing from using the VS web server to using IIS in my web project properties in the "Web" tab in VS 2008. Then clicked the "Create Virtual Directory" button and it created a new Application in IIS for me. Same thing though. If I go to that address, I get a 404 on my local machine where it's running.
Ok, I had not installed the IIS 6 functionality of IIS in Vista. I did not know it still used legacy features in IIS 7 to run sites locally....I guess. Not sure why but I guess it uses these IIS6 features. Will have to research why it's dependent on this stuff.
Do you have the home directory to look for "default.aspx" as the default page?
A couple things to check:
First, look at your access logs to see exactly what request is getting logged.
Check your IIS config - you may have a default.aspx page, but is IIS configured to use that as one of the default pages? If you go to http://localhost/AppName/default.aspx do you still get a 404?
If you put a static test.html file in the same directory, can you access it?
These should all help determine the cause.

Resources