I have a website set up on IIS 7.5. The host headers are working, the pages are returning fine. But when the browser requests an image, I get a 404 message. And I noticed that in the 404 details, the "Physical Path" that is specified is on the "c:\inetpub\wwwroot\images...".
The reason this is so strange is that the website is on the "D:" drive: "d:\inetpub\wwwroot\images...". The physical path is configured properly on IIS (I've done this a million times) but when attempting to serve images, it's using the wrong drive... why? Where is it getting this? I'm competently experienced with IIS for more than a decade and I have never seen this before. WTF??
You probably have two web sites binding to the same IP address, and one of them (with the physical path shown) is being honored.
If you add your application/virtual under the one website that's not being honor, you will see this error.
You need to set up the application under the web site that's being honored by IIS when using the IP.
Related
IIS7 serving .Net web application (simple database site).
I have a weird issue where the backgroundimage(URL) property of a element will be served as "http:\localhost" instead of "http:\servername". This is a problem because when a user connects to my site, "localhost" would be their workstation, not the IIS server. So the image (in this case a button) is blank.
The issue is intermittent, recycling the application pool seems to fix the issue for a time and then it comes back. IIS server also runs a SQL instance which eats ~28/36GB RAM.
Anyone ever seen anything like this?
In order to fix this you need to search for all locations where "http:\localhost" is hardcoded in your web app and replace it with a dynamic path. Even though localhost can work in your code if it is relative to the server, there are times when it will not work, such as in a link. You should get in the habit of never hardcoding your urls.
If you are using MVC -
value = Url.Content("~/Images/MyImage.png");
If you are using Forms -
value = ResolveUrl("~/") + "Images/MyImage.png"
Or relative pathing -
value = "~/Images/MyImage.png"
the linux-guy here has a question about IIS v6.
The case is, that i have a site running, when i do some specific tasks on this site ( Like deleting a specific item, three times in a row) the site will break, and a completely blank page will appear. Checking the response headers, i noticed that the server sends a "403 Forbidden: IP address of the client has been rejected."
Through a proxy, i can connect just fine.
Checking the site-options in the IIS manager, shows me that my IP is not blocked globally, its something thats just happening.
Where can i check for this? It happens automatically and the block ends after about 8-12 minutes, every time?
best regards.
Jonas
do you have access to IIS?
i assume blocking occure on web site side (inside ASP code), not in IIS.
please check IIS console, and make sure that there are no blocked IP's. If it's true, you should find database/table or some config file, where stored all blocked IP's. After that, you should get able to find ASP code, which is responsable for blocking....
you also could try make quick search inside all ASP pages for text like: "REMOTE_ADDR" and ".ServerVariables"
I have moved an Orchard CMS site from one host and server to another host and server. The IP address is obviously different.
All the files have been correctly copied and the correct html is rendered.
However, all the styles sheets produce a 404 error. I repeat that the files are where they should be.
Indeed, any other resource, such as images or stylesheets produce the same problem. Again, the files are all in place.
Can anyone think what could be causing this. Nothing has changed other than the server and IP.
I have another orchard site on the same IP and server that is working fine. However, it was not moved from a different server.
I ping for the site and it comes up with the correct IP address for the new server
EDIT:
Not sure that this is Orchard specific, although something related to Orchard's themes and how they work could be to blame... But I really can't see what.
It sounds much more like an IIS issue.
Can you get the CSS files, by entering their URLs into the browser address-bar directly?
Try "Copy image location" or from the Image Properties, of one of the failed images. Again, can you get this if you enter it direct into the browser?
Check the URL of failed resources, against the URL of working HTML resources or dynamic pages. make sure there are no differences in webapp path or context..
You'll also need to try Ctrl-R reloading.
There could also possibly be some caching in the way.. that might be holding the "404" or "not found" results, even after the content has moved. Try & shutdown/ or force refresh all server & proxy caches.
The server people got back to me. They changed the "website to 4.0 Integrated Pipeline mode." and all now works. Go figure.
I am sure I had checked that it was in Integrated Pipeline mode, but hey ho.
We've just set up a new dedicated server at hostgator, running Windows 2008 Server, IIS7 and ColdFusion 8 ENT.
On browsing the homepage, sometimes the site works, sometimes, part of the site runs and I can see a 403 error in Firebug. At other times, I only get an IIS error page saying:
"403 - Forbidden: Access is denied. You do not have permission to view this directory or page using the credentials that you supplied."
The site is http://www.asia-buy.com. It might run first time, but if you refresh it a few times, you'll probably encounter the problem.
There is a lot of ajax and JSON stuff going on under the hood and I'm wondering if that has any bearing on the problem.
Would appreciate advice from anyone who may have solved a similar issue in the past.
Resolved: Hostgator says this is actually a security setting in IIS to attempt to prevent DDOS attacks on the website. A a developer, I use CTRL-F5 a lot. A normal user would not.
Full error:
HTTP Error 403.502 - Forbidden
The IP address from which you are browsing is not permitted to access the requested Web site because it has made too many requests over short period of time.
Open IIS Manager.
Go to your website.
Go to Features/IP Address and Domain Restrictions/Dynamic IP Restriction Settings
Uncheck the boxes, or change the values, as needed
I have inherited a system with a number of servers, but I have never worked with IIS before.
Currently there is a web server set up using IIS, it holds a number of 'test' sites and the server is called Staging. I have network access to the files on the server and I can login to the server via VNC. What I cannot do is view any of the sites in the 'webs' folder. I know they are all switched on and working as they have been used by my predecessor.
I have tried putting into the url bar the IP address, the IP address with the folder appended, the name of the server and still I cant access the sites.
I am behind a firewall so these sites should be accessible to anyone in the network, but obviously I am mising something.
Any tips, anything I can look at to try and find the site. Annoying thing I only need to look at one of the sites in the D:\webs\test site folder for about 5 seconds :(
Look in the IIS properties of the site and look at what IP address and host header values have been assigned to the site.