I faced some problems after hosting my web project in IIS 7 / Windows 2008. Images are not shown when I run the project on my browser.
I copied my project folder (webtest) to c:\inetpub\wwwroot\. To be sure, I chose image from webtest\image\sample.jpg again. It works properly when I run it. However, after putting up for hosting and I call it from browser it doesn't show the image.
What are the possible causes of the problem?
Possible solution is to add .jpg/.jpeg mime type in IIS Manager if it doesn't exists.
Related
I created a IIS website about a year and a half ago with a lot of pictures on various aspx/asp tabbed pages. My development PC is Windows 8.1 Pro with IIS version 8.5.9600.16384 website. The website was developed using Visual Studio 2012. The website was published onto the same Windows PC.
The published website was then copied onto a Window Server 2012R2 on an IIS Version 8.5.9600.16384 web and worked well. Gradually search engine bots found the site and all was well.
This week I went to make some updates to the website and found none of the pictures working. They are all returning a 404 html code. When I view the .jpg files individually from IIS Firefox returns "cannot be displayed because it contains errors". Chrome and Edge both say the file can't be found. If I view these files from Windows File Explorer they look fine.
So I deleted the files on the server and then copied the published website from my development PC. Still no pictures.
I have another similar web application on the same server so moved one of the jpg files to that directory and tried to view it via IIS - still 404. I copied a picture from the other website to my "broken" directory and the other picture was viewable via IIS. All of these pictures were reduced in the same manner using Photoshop 7.0.
I went back to my development PC and viewed the original website via IIS. The pictures were viewable so I republished the website, copied it to the server - no pictures.
I then found the original picture (not reduced) and moved it to the server. Still 404.
My problem doesn't seem to be permissions because I can view pictures copied from another web to that directory.
The website had been working for over a year but the pictures now return 404's.
The pictures can be viewed on the development PC using IIS but not after publishing them and then copying the website to the server.
Another website with essentially the same code with pictures reduced in the same manner is displaying pictures fine.
I'm really perplexed and would love to hear some of your ideas as to what might be my problem. Thanks for taking the time to read this.
The first place I always start with missing images is to View Source and make sure the path to the image is actually what I think it is.
Could you have done something so the path is now built relative to the machine's file structure instead of relative to the site? That could cause the image to be found locally, but not on your server.
It might be easier for someone to get an idea if you included the URL so we could examine the page displayed.
I'm pretty sure I figured out the problem but it leads to other questions.
I shortened the filename and now I can browse to it via IIS.
So here are my current questions:
Why had the pictures been browse-able originally but not now? Has there been some kind of internet change about acceptable file length? Or possibly some kind of Server 2012R2 update that caused this change?
Why are these pictures browse-able on my Windows 8.1 PC via IIS but not on the Server 2012R2? I can also open the website and see all of the pictures on Windows 8.1.
It's nice to have tackled one problem but I would still like to know the cause if anyone should have any suggestions.
I FINALLY figured out why my pictures disappeared. Yes renaming my .jpg files did fix the problem but that wasn't the cause. The problem was that I had added /2018, /2019 and /2020 to my IIS Request Filtering denied. All of my picture files had dates on them. When I renamed/shortened the file names I removed the /year. Phew! The stupid things I do! This also explained why I could view these webpages on my development PC but not the server - no request filtering. Hopefully my error helps someone down the line.
I have a sitecore site running on .NET 4.0 and IIS 7.5 on Windows 7 machine.
While setting up sitecore, I had installed only the sitecore client and then set up IIS7. I think some permissions have got messed up because of that.
Whenever I try to change a code file in my website in Visual Studio, it gives me a message that I don't have any permissions to modify the files. I can overwrite the existing one, however, this is not normal.
Also, I have ApplicationPoolIdentity set as my Identity for my Application Pool. Whenever I try to go to sitecore desktop it doesn't work, however I can go to content editor upon login. Even after logging in, if I try to go to sitecore desktop mode like /sitecore/shell/default.aspx, the page never loads and the progress wheel just keeps spinning.
It happens in FF, Chrome and IE so it can't be a browser issue.
I checked the permissions of various folder and they all look fine. System, Administrator and Local computer user have full control on the website folder and the files and folders underneath it.
It would be great if someone can help in trying to figure out the right configuration and settings for my website folder.
Firstly, as per the best practice of installing Sitecore, we should set the identity as NetworkService.
So please do 2 things:
Change the Identity in Application Pool as Network Service
Make sure that Website and all its descendants + the Data Folder and all its descendants have Read & Write access for Network Service.
Mostly this should work.
Regards,
Varun Shringarpure
Does IUSR have "Read" permissions on the \Website folder and on all descendants?
Additionally, you may want to look at the Sitecore logs under the \Data\logs folder. You may be having a database connectivity issue that may show up there.
I have a problem with caching of aspx and ascx files in one of my web applications on localhost (windows 7). If I make changes to one of these types of files, for example changing a hardcoded text, no browser picks up this change. I have tried ctrl+f5, and clearing the browser cache. Recompile doesn't help either since no code changes has been done. The only thing that helps is resetting IIS.
I have another web application running on the same IIS instance, where I don't experience this behavior. However, I can't figure out what the difference between those two applications is. I don't publish any files, the IIS sites are pointing directly to the files I edit in Visual Studio.
Any ideas?
For some reason this fixed it self when we went from Subversion to TFS this week.
I have MVC3 app. When I run it under ASP.NET Development Server from Visual Studio, everything is fine. But, when I run it under IIS, the CSS is not loading at all.
Any manipulation with permission didnt help, even if I sent full access to everyone for the whole solution folder. I have IIS 5.1 on Windows XP. I enabled MVC3 support (.*) in IIS, the application runs fine, except CSS is not loading for some reason.
When running under IIS - doesnt pick up static content.
Actually, no static content work - not css, not javascript files from the Script folders.
And this is weird, since I have another MVC3 app with exactly same Web.Config and exactly the same VirtuialDirectory configuration that works just fine, all JS and CSS are loaded correctly.
And I dont see any difference, except one works, another one -doesnt ;(
UPDATE
After playing with creating default MVC3 applications in different folder and with different names, I found that the problem ONLY happens when the application name contains DOT :)
Something like "MyCompany.MyApplication" WILL not work correctly under IIS 5.1.
If I call it just "MyApplication1" - everything works ! Go guess....
In my case it turned out to be UrlScan fault: I changed "AllowDotInPath" option in the "UrlScan.ini" to 0 and voila! Here is the reference:
www.iis.net/learn/extensions/working-with-urlscan/urlscan-3-reference
I developed a website in ASP.Net 3.5. When I compile it with Visual Studio on the HOST Machine, the website shows up correctly! But when I publish the website to the host machine's website hosting folder, type the navigate to the site in the IE, it shows up this way:
the images do not show up
fonts are not recognized
Does anyone have any idea what could be the issue?!
I mean the same Host Machine! Same IE (version8)! Compiling it with Visual Studio 2008 on that machine, every thing is fine, but when calling the published site on the same host machine by typing the URL in IE, the images don't show up and the fonts are not recognized.
Images/fonts not showing up is a sign that your relative paths are off. One common cause of this is forgetting to creating the IIS application when you deploy. If you don't create the application, then image paths written like this:
~/content/images/img1.jpg
will be broken. (They'll resolve to mydomain.com/content/images/img1.jpg instead mydomain.com/myapplication/content/images/img1.jpg.)
Another possibility is that your relative paths are written like this:
/content/images/img1.jpg
This type of link will always be broken if you deploy to any sub-path within a domain. Ie, if you deploy to mydomain.com then the links will be good, but if you deploy to mydomain.com/myapplication, then URLs written like the above will resolve incorrectly as mydomain.com/content/images/img1.jpg.