1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Running .asp scripts using IIS

Discussion in 'Web Design & Development' started by JiminSA, Aug 29, 2012.

Thread Status:
Not open for further replies.
Advertisement
  1. JiminSA

    JiminSA Thread Starter

    Joined:
    Dec 15, 2011
    Messages:
    2,058
    Is anyone familiar with how to run .asp programs/scripts from my hard drive? I was informed at this link that I should create a folder inside C:\Inetpub\wwwroot and save my asp files I wish to run, there.
    Well I did this and then tried (as per the link) to run it in my browser as which gives me a 404 Error...
    This hasn't surprised me, because I am running xampp and use the localhost url to run xampp htdocs and I think that maybe there is a conflict of interest between xampp and IIS.
    But frankly I am at a loss:(
     
  2. WendyM

    WendyM Trusted Advisor

    Joined:
    Jun 27, 2003
    Messages:
    4,032
    You have to enable active server pages in IIS. You don't say what version of IIS you're using, but here are the instructions for IIS 6. Hope that helps.
     
  3. JiminSA

    JiminSA Thread Starter

    Joined:
    Dec 15, 2011
    Messages:
    2,058
    Thanks for your input WendyM. I am using IIS 7 - Ah, I found out here that I have to install classic asp via Control Panel/Programs/Windows Features/Internet Information Services/Www services/Application Development Features/ASP, which I did, but I'm still not able to run asp locally...
     
  4. WendyM

    WendyM Trusted Advisor

    Joined:
    Jun 27, 2003
    Messages:
    4,032
    Are xampp and IIS using the same port?
     
  5. JiminSA

    JiminSA Thread Starter

    Joined:
    Dec 15, 2011
    Messages:
    2,058
    How would I determine that? (this is a new area for me...)
     
  6. JiminSA

    JiminSA Thread Starter

    Joined:
    Dec 15, 2011
    Messages:
    2,058
    The directory paths are completely different of course...
    c://xampp/htdocs/------------------------>xampp
    c://inetpub/wwwroot/--------------------->asp
    but ports in this context is new to me...
     
  7. WendyM

    WendyM Trusted Advisor

    Joined:
    Jun 27, 2003
    Messages:
    4,032
    For xampp, if it's running, stop the service and then open [XAMPP Installation Folder]/apache/conf/httpd.conf. Search for "Listen" and the port name should come afterward (likely either 80 or 8080).

    In IIS, right-click your site and select Edit Bindings. It should show you the port you're using (again, likely 80).
     
  8. JiminSA

    JiminSA Thread Starter

    Joined:
    Dec 15, 2011
    Messages:
    2,058
    I followed the procedure for xampp and yes the port is 80...
    With IIS things don't seem that straightforward... I got hold of this forum link which shows how to find the port using this command - int port = Request.Url.Port;
    how and where would I use this command to discover the port (which I read, defaults to 80, anyway)?

    Thank you for your patience with my ignorance...
     
  9. JiminSA

    JiminSA Thread Starter

    Joined:
    Dec 15, 2011
    Messages:
    2,058
    Aha! I managed to find the IIS manager via the control panel, administrative tools and discovered that the port is 80. When I attempt to start the site it comes back with an error msg (attached)...
    So I went in and changed the binding - port = 8080 - It then started ok, but when I attempted to run it in my browser I still get the 404 - I am using this URL... http://localhost/ClassAds/default.asp:confused:
    So I changed it to http://localhost:8080/ClassAds/default.asp and now I get through to the IIS 7.5 - which is progress at least! But the page tells me
    So I went to the web.config file and changed Default.asp to default.asp and now I get
    Now where do I change directory permissions??
     

    Attached Files:

  10. JiminSA

    JiminSA Thread Starter

    Joined:
    Dec 15, 2011
    Messages:
    2,058
    This is truly frustrating:(
    I have granted full permissions to my user account using IIS Manager and still get the 401.3 error. I have enquired at the relevant microsoft forum and they sent me this link which I have read and followed, setting everything to full permission, but still I am denied access.
    I will go over this page again just to make absolutely sure:mad:
     
  11. WendyM

    WendyM Trusted Advisor

    Joined:
    Jun 27, 2003
    Messages:
    4,032
    Did you enable the Anonymous Authentication and apply it to the application pool?
     
  12. JiminSA

    JiminSA Thread Starter

    Joined:
    Dec 15, 2011
    Messages:
    2,058
    No I gave permissions to User "Jim" - my sign on, but I shall try anonymous and report back...
     
  13. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1066933