0

After 4 hours of looking through stack overflow and searching Google I've finally decided to go check in with the "hopefully" gurus...

My problem is this, when querying from the local machine through remote desktop, querying for www.domainname.com/Content/Styles/reset.css i get the css fine.

When doing the same from an external machine, I get a 404 error... I know why, the reason is that it's trying to get the file from: C:\inetpub\wwwroot\Content\Styles\reset.css

This is kind of bad considering that the website is actually hosted at: c:\http\www.domainname.com\

The error in the browser, from IIS, gives the following information: Module IIS Web Core Notification MapRequestHandler Handler StaticFile Error Code 0x80070002 Requested URL http://www.domainname.com:80/Content/Styles/reset.css Physical Path C:\inetpub\wwwroot\Content\Styles\reset.css Logon Method Anonymous Logon User Anonymous

I've been looking at the other sites running on the IIS, and none of them point to InetPub as their directory, so I simply can't see why it's trying to get the item from this path.

Calling the main application, a MVC based site running Umbraco, works fine, or rather, all the dynamic content works fine, just not static content.

To give a little more information: Currently the IIS 7.5 has 4 sites and 1 ftp server running.

1 site with the following bindings: http - this 1st site host name - port 80 - ip address * https - blank host name - port 443 - ip address *

1 site with the following bindings: http - the 2nd site host name - port 80 - ip address *

1 domain with the following bindings: http - the 3rd site host name - port 80 - ip address *

The actual domain http - www.domainname.com - port 80 - ip address *

And finally a ftp server

I hope that someone have any idea what is going on...

Best regards and praying (despite being an atheist), Poul

2 Answers2

0

Could it be that the Static File Handler is not included for your website? Check for your website if the Handler Mappings contains Static File as Handler. ( preferrably at the bottom of the list)

Update: Is there a physical folder under wwwroot called content\styles? or a folder www.domainname.com for that matter?

Did you look at logs from IIS for the application pool of this website --> C:\inetpub\logs\LogFiles\W3SVCxx (xx = number assigned to your app pool) I forgot how to find that on ( usually I quickly check the couple of folders here.

Maybe it's a security problem -> do you see events in the security eventlogger.

Schwarzie2478
  • 2,186
  • 26
  • 30
  • I considered that since it's not on by default in the services for the IIS roles, and checked it, but how would it be able to show it when calling from the local machine then? – Poul Ryste Hansen Jul 25 '12 at 17:20
  • The StaticFileModule is one of the last modules in the Modules section, and for the Mappings, StaticFile handling path * is the final element. – Poul Ryste Hansen Jul 25 '12 at 17:22
0

So I found the problem...

It turns out to be a Proxy issue... As this is a new site, the DNS wasn't set up yet and we were using the HOSTS file.

Unfortunately in Bangkok when using a Cable connection, True (the largest ISP) forces you to use a Proxy, without telling you...

Now the DNS was actually pointing to another IIS server...

When I made my request, asking for a file on domain name X.. My machine looked up the IP address through my HOSTS file, sent the request, the proxy then also did a DNS lookup, but got another IP address, and forwarded the request to this IP address instead.

The IIS on that server, knew the IP, knew the domain name, but had another configuration and didn't know the file we were asking for (for the new website)...

So indeed there is a logical explanation for everything, just not always an obvious one.

I actually got onto the problem by testing with another domain, one that didn't exist at all, on this one the proxy of course could not look it up, and started returning code 324.