Jump to content

Setting up ASP on new website


mboehler3
 Share

Recommended Posts

Hi all, I work for a company that uses ASP files on the website. I'm not sure if it's ASP or ASP.net. The company site is here.I would like to recreate the same environment for a website I recently purchased from GoDaddy. There's two main reasons I want to use ASP:1.) Use include files in ASP2.) Define and pass variables through the query stringNow, I've just gone ahead and saved the first page as default.asp. I've created a separate header file, and the default.asp calls for the header as an include file. When I uploaded these files to the server, the include file does not show up.I was hoping that making the site ASP would be easy, but I'm not sure if it works like that. Can someone help me out?Is my work website ASP or ASP.NET? I want to set up my new website just like that, so what steps do I need to take in order to do this?Thanks to anyone who can help out and set me straight.

Link to comment
Share on other sites

The web server supports ASP.NET, but it's hard to tell from looking at web pages and headers what language is actually used. You would need to look at the code. As for the include problem, if you post your code then that will help figure out why it's not working. Other than that, start going through ASP tutorials if that's what you want to use.

Link to comment
Share on other sites

The web server supports ASP.NET, but it's hard to tell from looking at web pages and headers what language is actually used. You would need to look at the code. As for the include problem, if you post your code then that will help figure out why it's not working. Other than that, start going through ASP tutorials if that's what you want to use.
Do I need to set up MySQL? Here's the code on my page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><title>Bumper Stickers</title><meta name="description" content="" /><meta name="keywords" content="" /><link rel="stylesheet" href="skins/style.css" /></head><body><!-- #include virtual = "/header.asp" --><img src="images/stage-header.gif" /><div class="stage"><h1 title="Bumper Stickers You Won't Find at the Gift Shop">Bumper Stickers You Won't Find at the Gift Shop</h1><h2 title="Dazzle the Accounting World with Your Bumper Sticker — You Could Win a $500 Gas Card">Dazzle the Accounting World with Your Bumper Sticker — You Could Win a $500 Gas Card</h2><img src="images/free-500-gas-card.jpg" /><p>Come on — we know you've got a creative side. We're giving you the opportunity to show you can have fun with the best of them.</p><p><strong>Make Your Own Bumper Sticker for Your Chance to Win a $500 Gas Card</strong></p></div><img src="images/stage-footer.gif" /></div></body></html>

Link to comment
Share on other sites

Do I need to set up MySQL?
If you're going to use a MySQL database, then yeah, you need to set it up. If you're not going to use a MySQL database, then no, you don't need to set it up.Are you sure the file you're trying to include exists? Try including a file in the same directory first, and once you get that working then experiment with different paths.
Link to comment
Share on other sites

Are you sure the file you're trying to include exists? Try including a file in the same directory first, and once you get that working then experiment with different paths.
I have "header.asp" in the root directory where "default.asp" exists. I've tried putting a "/" before header.asp and tried without it, both times the header did not load.
Link to comment
Share on other sites

If you're trying to include a relative file, don't use virtual. That tells it you're looking for a virtual directory.http://www.w3schools.com/asp/asp_incfiles.asp
Ok, I've changed the code around to look like this:
<!--#include file="/header.asp"-->

And the header file still does not load. I've tried "header.asp" and "\header.asp," both did not work. I don't understand what I'm missing...

Link to comment
Share on other sites

If you have this:<!--#include file="header.asp"-->And there is a file called header.asp in the same directory as that file, and that is in an ASP file, and you are accessing it over HTTP, and the server is configured to run ASP, then it will work. If it doesn't work, one of those things isn't true.If that is referencing a file that doesn't exist, and ASP is working, then you will see an ASP error message. What exactly are you seeing in the browser? What do you see if you view the source code through the browser?

Link to comment
Share on other sites

If you have this:<!--#include file="header.asp"-->And there is a file called header.asp in the same directory as that file, and that is in an ASP file, and you are accessing it over HTTP, and the server is configured to run ASP, then it will work. If it doesn't work, one of those things isn't true.If that is referencing a file that doesn't exist, and ASP is working, then you will see an ASP error message. What exactly are you seeing in the browser? What do you see if you view the source code through the browser?
Ok, I believe the problem is because I do not have the server configured to run ASP. This is the error message I see:
Not FoundThe requested URL / was not found on this server.Apache/2.0.54 Server at www.mywebsite.com Port 80

I found this resource here: http://www.w3schools.com/ASP/asp_install.asp but I don't see anything about setting it up on your website. Is it difficult?

Link to comment
Share on other sites

You shouldn't need to configure ASP for individual web sites, as long as the server supports it that should be enough. According to that error, your server is an Apache server. Apache doesn't natively run ASP code, you need to use a module for it. Are you sure that has been set up?

Link to comment
Share on other sites

You shouldn't need to configure ASP for individual web sites, as long as the server supports it that should be enough. According to that error, your server is an Apache server. Apache doesn't natively run ASP code, you need to use a module for it. Are you sure that has been set up?
No I'm not. I'm pretty sure it has not. I apologize, this is the first time I've set up an ASP environment by myself. I'm not sure how to set up the ASP module for Apache.
Link to comment
Share on other sites

I've actually never set up ASP on Apache, ASP was developed by Microsoft so I've only ever ran it on IIS servers. It looks like the site you linked to in the first post is an IIS server if you want to use that for testing. It looks like you're using Apache 2.0.54, so this may help:http://weblogs.asp.net/israelio/archive/20.../11/424852.aspx

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...