I am moving an old asp classic (sigh...) local website to a new IIS7.5 server. The asp code renders fine, but the images don't show up.
This mini website is located on a virtual directory under the Default Web Site.
My guess was it's a permissions issue, so I've added the IIS_IUSRS group to the permissions of the folder, both under the IIS manager and on the windows explorer, but the images still don't show up. Do I need to restart the server after such a change?
In an effort to debug this, I've created the simplest "hello world" html file, and that didn't render at all. After saving the very same file with an asp extension, it now renders fine.
So my server doesn't show html files, and doesn't show images, but does show asp classic files.
Any ideas?
Problem solved!
Turns out I had to enable "Static Content" on the iis. Now it serves images and plain html pages just fine.
Related
We have a problem under Microsoft IIS. People are not able to request the favicon through the browser. We checked all the coding of the website we are hosting on it and it is all fine. Problem is that the icon file seems to be blocked in general for the outside world:
Icon location: http://www.raakbeleving.nl/favicon.ico (gives 404)
Anybody any clue what could make this happen?
Our hosting provider cannot seem to solve the problem.
Thanks in advance.
See this page for a way to set up the content type in IIS 7.
Here there are a number of additional hints for it..
MS IIS Manager version 1809 includes a MIME type of .ico
**To Clarify the Problem: **
I have my favicon.ico in the root directory of my application which has an alias name of the website. I have run the same html through a number of servers. Each one looks for the favicon.ico, finds it, and uses it.
When you access a website without a favicon.ico, the icon on the browser tab for that site will have a browser default icon. The favicon.ico, when it exists, will replace that tabl icon with a custom one. I have found a lot of sites that discuss how MS IIS does not support favicon.ico.
I have created a stock Web App in VS2010. In Cassini the web-app is rendered normally, but in IIS no styles are shown. I am using IIS 7 in Win7
Probably a security issue with the folder that the css is stored in. Easiest way to debug (imo) is using Fiddler or Firebug and seeing what is happening to the request for the css files.
My asp.net web application works fine locally and when I deploy it as the default web site on my test server. So for example, when I type http:// 10.10.10.100 it works fine.
I created a virtual directory called "Test" under my "Default Web Site".
When I type http://10.10.10.100/Test it loads correctly to my log-in page, however when I log-in and click on a link it goes back to my log-in page and the url goes back referencing http://10.10.10.100 instead of http://10.10.10.100/Test/Default.aspx, for example.
My goal here is to run my application from the virtual directory and not as the default, but I don't want to change my code to a hard coded path since then it won't work anywhere else.
Any workarounds for this?
You have left a few unanswered questions, but some things to check:
Which links are you using? In other words, are they plain HTML links (<a href=""> links), ASP.NET links (<asp:HyperLink>), LinkButtons (<asp:LinkButton>), etc.?
How are you specifying the URL in those links? ASP.NET has a "shortcut" for root directory of the website if you use the tilde (~) character. So, to link to a page on your site called "MyPage.aspx", you might use "~/MyPage.aspx".
Trying to copy a website to a new server as the old one is dying. :(
I tried copying over the files and setting it up manually, but some specific user accounts needed to be used and the guy who set all this up left the company nearly 5 years ago. And is even worse at documentation than I am.
Anyway, at that point the ASP pages were serving, but getting errors. Ok, fine... I went back and exported the configuration from the old server (lucky that worked at all) and created a new website from that config on the new server. On the new website, from the config file, the ASP pages are giving 404 errors.
The Active Server Pages extension is enabled, and I can actually get the asp pages to serve from another website on the server... so I'm thinking it's something at the website level. No idea what though.
Any ideas?
Back when I was doing classic ASP development we used Parent Paths. This is at the top of your ASP file you'll see something like;
<!--#include file="../../resource/includes/MSSQLconnection.asp"-->
This isn't enabled by default in IIS. It may not be answer but worth looking at. But was a long time ago now.
Hope this helps,
Mike
404 is a file not found error.
Start by checking you can access a 'hello world' HTML file in the folder using http: //localhost/path/toyour/HelloWorldFile.htm
Hello World
is all you need in the file = you don't need to bother with any HTML markup to test what we're interested in.
This will check that your virtual directories, application settings etc are correct before you move on to the Active Server Page settings.
Once you've got your paths sorted out and you know you are looking for your application in the correct place move on to a 'hello world' ASP file
<%="Hello World"%>
is all you need in that file!
You ask about settings in IIS which will stop ASP from working. These come to mind as the most obvious.
Depending on the OS (or more specifically the IIS version) you may also need to activate ASP pages.
These instructions from msdn cover Windows 2003 (IIS6) and Windows 2008(IIS 7.x)
If you can get your hello world script working you can move on to debugging your application.
It will be a great help when debugging the application if you can see what's going wrong so I recommend that you turn off friendly error messages if you are using Internet Explorer. Also set IIS to pass error messages on to the browser
see:
http: //learn.iis.net/page.aspx/564/classic-asp-script-error-messages-no-longer-shown-in-web-browser-by-default/ --excuse the link formatting but SO's newbies can't post more than 2 hyperlinks in a message was getting in the way of me trying to be helpful and earning enough rep to post more!
(that may only be relevant to IIS 7.x I don't have an IIS6 installation lying around to refresh my memory.
Make sure you are browsing your application on the server using http: //localhost - this should ensure you see any errors
Good luck
Good Morning,
I was having serious problems regarding this website.
What happens is everyytime I try to open a .shtml page in the site it always has an error "The Page Cannot Be Found" but this is highly unlikely since I already all have the resources in my local pc and already did a virtual directory for the entire site. Can you please tell me what's the problem? i've checked all the codes and they're constructed just fine.
If you're attempting to view the page in Internet Explorer then I recommend turning off friendly HTTP error messages in the advanced settings. Disabling the setting may result in more verbose error messages, especially if it's an HTTP/500.
This is not actually an ASP problem. .shtml files are handled by the server-side include ISAPI application extension.
In Web service Extensions folder under the server icon in IIS manager, ensure that Server Sice Includes is set to "Allowed".