Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Running an asp.net script on local machine?

Options
  • 26-11-2007 12:20pm
    #1
    Registered Users Posts: 2,073 ✭✭✭


    Hi all,

    I bought a small piece of software online called webfilebrowser

    I'm trying to run it on my local machine. I've installed the latest version of IIS. When I try to run the asp file in internet explorer it just opens notepad and displays the code.

    It's meant to run like this: http://www.webfilebrowser.com/WebFileBrowser/ASPFrames.html


Comments

  • Moderators, Science, Health & Environment Moderators Posts: 8,950 Mod ✭✭✭✭mewso


    Well it probably has to run via IIS. This means you need to place it in your IIS folder which is normally c:\inetpub\wwwroot\ and then open using a http link and not a c:\ file link.

    http://localhost/myapp/myfile.asp


  • Registered Users Posts: 15,065 ✭✭✭✭Malice


    musician wrote: »
    Well it probably has to run via IIS. This means you need to place it in your IIS folder which is normally c:\inetpub\wwwroot\ and then open using a http link and not a c:\ file link.

    http://localhost/myapp/myfile.asp
    You don't have to place things in c:\inetpub. I run various scripts off my L: drive, you just have to make sure the virtual folder in IIS is mapped correctly. Try this:
    • Right-click My Computer.
    • Left-click Manage.
    • Expand Services and Applications.
    • Expand Internet Information Services.
    • Expand Websites.
    • Right-click on Default Website.
    • Select New->Virtual Directory.
    • Hit Next.
    • For an alias enter "WebFileBrowser" or shorten it if you like to something like "WFB".
    • Hit Next.
    • Hit Browse and make sure you point the folder to the exact location where the scripts for the webfile browser program are located. At this point, also make a note of what the startup script for the program is called. Is it default.aspx, startup.aspx, index.aspx or something else entirely?
    • As I recall for the permissions screen, you can just leave the default Read and Run permissions ticked per the default.
    • Hit Next and hit Finish.

    Now, open a web browser and enter "http://localhost/WebFileBrowser/Index.aspx" without quotes into the address bar. Substitute the "Index.aspx" part for whatever the startup script is called.
    If you get a "Server Error in /WebFileBrowser Application" message then make sure you have the correct filename entered for the aspx script.
    If you get a "Server Error in / Application" message then make sure you have the correct alias entered for the folder.


  • Registered Users Posts: 15,065 ✭✭✭✭Malice


    I have just noticed your thread title mentioned ASP.NET whereas the product you linked to is ASP. If you are running an ASP script, you won't get the error pages I described above, you'll get "The page cannot be found". Also the script names I referred to won't end in .aspx, they'll end in .asp.


  • Moderators, Science, Health & Environment Moderators Posts: 8,950 Mod ✭✭✭✭mewso


    malice_ wrote: »
    You don't have to place things in c:\inetpub.

    It's called keeping things simple until it works.


  • Registered Users Posts: 15,065 ✭✭✭✭Malice


    musician wrote: »
    It's called keeping things simple until it works.
    What if the original poster keeps his files in a different place? Why should they have to be moved? If the original poster is going to be running web applications on their system doesn't it make sense for them to learn about how IIS works? There's keeping it simple and then there's over simplifying an issue.


  • Advertisement
  • Moderators, Science, Health & Environment Moderators Posts: 8,950 Mod ✭✭✭✭mewso


    My point is pop it in wwwroot and see if it works. Then you know not having it in a properly mapped virtual directory is the problem. Going beyond that is making things complicated when you don't know what the actual problem is. I had a suspicion on what might be the reason for the problem so I posted up the quickest and simplest way to check that. If you want to teach the OP how IIS works then fair play to you.


  • Registered Users Posts: 15,065 ✭✭✭✭Malice


    musician wrote: »
    My point is pop it in wwwroot and see if it works. Then you know not having it in a properly mapped virtual directory is the problem.
    True, I suppose until the original poster comments again, it won't be apparent just what is being done to open the scripts.
    musician wrote:
    If you want to teach the OP how IIS works then fair play to you.
    I'm hardly qualified to do that since I just about know enough to get it to work myself :).


  • Registered Users Posts: 7,468 ✭✭✭Evil Phil


    What version of IIS are you running?


  • Moderators, Science, Health & Environment Moderators Posts: 8,950 Mod ✭✭✭✭mewso


    malice_ wrote: »
    True, I suppose until the original poster comments again, it won't be apparent just what is being done to open the scripts.

    I think the OP has left us to argue about it :)


  • Registered Users Posts: 2,073 ✭✭✭jamieh


    Hi lads,

    Sorry about the the delay in getting back to you!! Thanks for all the replies.

    I got in working in the end.

    I went into IIS 7.0 Manager. Then Providers and then pointed the default website to the .asp file and it's working now when I got to //localhost. :)


  • Advertisement
Advertisement