1

My .asp page is in the folder named "MyWeb", and "MyWeb" folder is under wwwroot folder which is under inetpub. I also added MIME types in IIS Manager for .asp as application/asp, and for .aspx as application/aspx I tried it a long but still it is not working. When I go to open that .asp file it is asking for download in IE browser and displaying a blank page in Mozilla Firefox. Please can any body tell me how to solve this issue?

ANSWER=

Issue solved I just changed the setting in IIS Manager set Enable Parent Paths to true and Send Errors To Browser to true and it happened. Localhost Home Page of IIS was displayed and my asp scripts are also running.

  • Can you access a .html file in the same folder? – Adrian Wragg Mar 18 '14 at 08:58
  • "http://localhost/MyWeb/Hello.asp", where MyWeb is my folder under wwwroot. – Niranjan Kulkarni Mar 18 '14 at 08:59
  • @AdrianWragg, yes I can access .html file in same folder. – Niranjan Kulkarni Mar 18 '14 at 09:00
  • If you use just "localhost" as url u get the iis page? – Alist3r Mar 18 '14 at 09:03
  • @NiranjanKulkarni Can you go to the Handler Mappings for the site, and check that ASPClassic has been enabled? You're tripping over an IIS security setting, I believe. – Adrian Wragg Mar 18 '14 at 09:05
  • @Alist3r, I am getting this page "http://localhost/SitePages/Home.aspx" on using just localhost. – Niranjan Kulkarni Mar 18 '14 at 09:08
  • @AdrianWragg, I have already installed IIS, and I am using Windows 7. How to go to handler mapping of the site? Would you just tell me what to do next. After IIS gets installed and .asp file is created. – Niranjan Kulkarni Mar 18 '14 at 09:11
  • Maybe you have to run the IIS manager and see if your "site" its correctly added – Alist3r Mar 18 '14 at 09:12
  • @Alist3r, How to run IIS manager? Sorry I am new to classic asp. – Niranjan Kulkarni Mar 18 '14 at 09:14
  • @Alist3r, I ran IIS Manager, but my .asp file is not visible under, Sites --> Default Website --> MyWeb. – Niranjan Kulkarni Mar 18 '14 at 09:24
  • possible duplicate of [How to enable ASP classic in IIS7.5](http://stackoverflow.com/questions/9072048/how-to-enable-asp-classic-in-iis7-5) – user692942 Mar 18 '14 at 09:29
  • @Lankymart, I added script map under "Handler Mappings", as told on respective page but still not working. – Niranjan Kulkarni Mar 18 '14 at 10:00
  • @AdrianWragg, Yes the ASPClassic has been enabled, I saw it just now. – Niranjan Kulkarni Mar 18 '14 at 10:09
  • @NiranjanKulkarni Are you sure you have installed the ASP role? See [Answer by rockspider to How to enable ASP classic in IIS7.5](http://stackoverflow.com/a/13879032/692942) – user692942 Mar 18 '14 at 10:19
  • @Lankymart, They have given it for windows server 2008, and I am using Window 7. Would be it possible here on my place? – Niranjan Kulkarni Mar 18 '14 at 10:38
  • Guys pardon, I have been trying these for since some couple of days, what should I do to run .asp code on Windows 7 ? – Niranjan Kulkarni Mar 18 '14 at 10:45
  • @NiranjanKulkarni People are trying to help, but we have no idea what you have and haven't done already; hence asking you to check things that you have already checked for yourself. You may find more help on other StackExchange sites instead. – Adrian Wragg Mar 18 '14 at 11:36
  • @AdrianWragg, ok thanks for consideration and guidance – Niranjan Kulkarni Mar 18 '14 at 13:48
  • @NiranjanKulkarni I get the feeling the more I speak to you that you know little to nothing about setting up a website in IIS this also makes me think that you probably don't even have a ASP page in the first place to test (chicken egg scenario). For that reason I'm going to leave this topic alone until you provide so more detailed information in your original question. – user692942 Mar 18 '14 at 14:28
  • Issue solved I just changed the setting in IIS Manager set Enable Parent Paths to true and Send Errors To Browser to true and it happened. Localhost Home Page of IIS was displayed and my asp scripts are also running. – Niranjan Kulkarni Mar 24 '14 at 05:38

1 Answers1

2

It possible that you haven't got Classic ASP support installed in IIS. To do this in Windows 7 follow the steps below;

How to enable Classic ASP support on IIS for Windows 7

Installing Classic ASP support

  1. Goto Control Panel -> Programs and Features

  2. Select from the left navigation bar

    Turn Windows features on or off

  3. From the Windows Features dialog expand Internet Information Services -> World Wide Web Services -> Application Development Features and tick the option ASP this will also tick ISAPI Extensions if not already ticked (see image).

    Windows Features dialog

Configuring IIS Web for Classic ASP

  1. Open Administrative Tools -> Internet Information Services (IIS) Manager and select the website you wish to configure.

  2. In Features View under the IIS section select Handler Mappings check the existing mappings list that appears for a handler that points to *.asp if one doesn't exist select Add Script Map from the right hand navigation bar.

  3. Fill in the options as per the below image

    ClassicASP Handler

    IMPORTANT If using 64-bit and want to enable 32-bit support you may wish to use the 32 bit equivalent ISAPI DLL. See Dee's answer to How to enable ASP classic in IIS7.5

  4. Select the Request Restrictions button to open Request Restrictions dialog. The three images below detail the values that should be configured if not already set.

    Request Restrictions - Mapping

    Request Restrictions - Verbs

    Request Restrictions - Access

Community
  • 1
  • 1
user692942
  • 16,398
  • 7
  • 76
  • 175
  • I have already done with this. – Niranjan Kulkarni Mar 18 '14 at 10:56
  • @NiranjanKulkarni Also added detailed instructions on configuring the Classic ASP handler, will update with details of configuring the Application Pool soon. – user692942 Mar 18 '14 at 11:15
  • Thanks I have went through above steps given, but how to run the asp file in the wwwroot folder? – Niranjan Kulkarni Mar 18 '14 at 12:47
  • @NiranjanKulkarni If the website is running and your Classic ASP page is in the `wwwroot` (or your own configured Home Directory path) you should be able to access it via `http://localhost/.asp`. – user692942 Mar 18 '14 at 12:50
  • Ya you are 100% right but I am confused why it is not happening by my side. – Niranjan Kulkarni Mar 18 '14 at 13:46
  • Instead I would request you that would you tell me how to execute an .asp page, right from the beginning, suppose if I am having a "Hello World" asp program how to display that hello world? I tried it as given in w3 schools but still not getting it. – Niranjan Kulkarni Mar 18 '14 at 13:51
  • @NiranjanKulkarni If you are still getting a `404 Not Found` try these steps in the `IIS Manager` select your website and bring up the `Basic Settings` and check your `Physical Path` if you are doing this in the `Default Website` that comes pre-installed it will be something like `%SystemDrive%\inetpub\wwwroot` locate that folder using `Windows Explorer` and check your `.asp` file is there, if not copy it there and try that site address again. – user692942 Mar 18 '14 at 13:51
  • or, just tell me what I have to do after installing IIS. – Niranjan Kulkarni Mar 18 '14 at 13:59
  • Okay let me clear one thing, Is that compulsion that I have to create a website before writing a .asp program? And if so How should I achieve it step by step? – Niranjan Kulkarni Mar 18 '14 at 14:02
  • @Lankymart, Ya as you said I checked that physical path and that folder resides in default website, I located that folder using windows explorer it is showing me that .asp page. But when I go to open that page browser asks me to open or save file. – Niranjan Kulkarni Mar 19 '14 at 05:39
  • Issue solved I just changed the setting in IIS Manager set Enable Parent Paths to true and Send Errors To Browser to true and it happened. Localhost Home Page of IIS was displayed and my asp scripts are also running. – Niranjan Kulkarni Mar 24 '14 at 05:38
  • @NiranjanKulkarni Glad you finally managed to sort your issue, thing is though parent paths not being enabled would not cause a `HTTP 404 Not Found` if you had `#include` in your ASP code and you needed parent paths you are more likely to get a `HTTP 500 Internal Server Error` so you must have done something else. – user692942 Mar 24 '14 at 08:56