Site is showing HTML code instead of page

by dv8
11 replies
  • WEB DESIGN
  • |
Trying to help someone out. They just got new hosting and now they need to get their files onto the server.

They gave me files of their website and I used FileZilla to FTP them to the server. But, when you go to their homepage, it is nothing but the HTML code. Obviously this needs to be fixed. Never came across this problem before, so I'm not sure how to fix it.

All of the files are .asp files. I'm only familiar with HTML files, so perhaps this is why I can't figure it out?? I didn't know what asp was, so I Googled it. Doesn't help me much.

Below is the code that displays.

Another quick question, you'll notice there are no head, html, or body tags...is this normal when dealing with asp? Something tells me they should be there. If they're not there, how do you put in keywords and such??

Note that I deleted most of the code in the middle
to hide company details and such, but it was basically a bunch of tables. So pay no attention if you see a tag that isn't closed or things like that. Unless of course that may be part of the problem, then let me know and I'll post all of the code with just company details removed.


<!-- #include file="include/database.asp" -->

<!-- #include file="include/header.asp" -->

<table border="0" cellspacing="1" width="100%" bgcolor="#FFFFFF">
<tr>
<td width="100%" align="top">
<table border="0" cellspacing="1" width="100%">
<tr>
<td width="79%" align="top" valign="top">
<table border="0" cellspacing="1" width="100%">
<tr>
<td width="100%">
<table border="0" cellspacing="0" width="100%" cellpadding="5">
<tr>
<td valign="top" align="center">
<p align="center">


<iframe id="datamain" src="rotate_random.asp" width="410" height="260" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameBORDER="0" scrolling="no" align="center"></iframe>


<br>
<a class="copybig16" href="photogal.asp">Visit the Photo Gallery</a><br><div align="center"><FONT
color="#ffffff" size="+1"><MARQUEE bgcolor="#000080"
direction="left" loop="5" width="75%" scrolldelay="100" style="font-family:Verdana"></MARQUEE></FONT></DIV>

</td>
<td width="50%" valign="top"><font class="copy">

<%

dbfpage = dsnStr

Set rsfpage = Server.CreateObject("ADODB.Recordset")

sqlpage = "select description from fpage where id=1"

rsfpage.Open sqlpage, dbfpage
%>
<font class="copy"><%= rsfpage("description")%></font>
<%
rsfpage.Close
Set rsfpage = Nothing
%>



This is where a bunch of tables are,
I just removed them to hide company details and to save space.



<!-- #include file="include/footer.asp" -->
#code #html #page #showing #site
  • Profile picture of the author imdesigner
    Hey dv8,

    Looks to me like your hosting does not support asp.
    what are you trying to install? you should check with your hosting company..
    {{ DiscussionBoard.errors[5186931].message }}
  • Profile picture of the author RobKonrad
    Did you upload the files to a Linux server?

    It is possible to have ASP running under Linux via mod_mono for example, but this technology is not really suitable for a shared server....

    Cheers,
    Rob
    Signature
    ================================================== ===
    This blog is awesome: http://www.robkonrad.com/blog. Read it.
    ================================================== ===
    {{ DiscussionBoard.errors[5187225].message }}
  • Profile picture of the author dv8
    Oh great. It's under a HostGator business account. I just checked, it's a linux server. You need dedicated hosting with HG to get a windows server.

    Can you think of any reason the original web designer coded it in asp and not html? Is asp common?

    Is there anyway to solve this issue without changing hosting companies? Getting a dedicated server at HG is not an option (too expensive). Anything else that can be done?

    If not, what is a good hosting company that supports asp?

    I didn't realize a hosting company had to support it and even if I did, I would have thought a big company like HG would support it with shared accounts.

    I'm the one who suggested HG to them. Well, this should be a fun conversation...


    Did some research: HostGator does offer Widows hosting. I would just have to have the people I'm helping cancel their current Linux hosting and then sign up for Windows. They would get their money refunded, so it's not that big of a deal.

    Before I do that, is it "normal" to have every page of a site asp? I can't recall really seeing asp before. The site isn't anything that fancy. Nothing that can't be accomplished with a WordPress site and some plugins. They just didn't have any plans of having their site redesigned.


    Lastly, may be a dumb question, but can you host php and HTML on a Windows server? Because they are adding a mobile site which is in php. So that needs to be hosted as well.
    {{ DiscussionBoard.errors[5187512].message }}
  • Profile picture of the author DGFletcher
    From what I can tell, no, asp is not incredibly common.

    I picked up the code that you wrote and stuck it in my HTML editor to see what came up. It was not happy with that. ^ ^

    I did a bit of research and from what I saw, you'll have to go through and manually convert all the .asp files into .html for it to work. After you do that, it'll be easier to work with, 'cause .asp files are kinda a pain.
    {{ DiscussionBoard.errors[5187885].message }}
    • Profile picture of the author dv8
      Originally Posted by DGFletcher View Post

      I did a bit of research and from what I saw, you'll have to go through and manually convert all the .asp files into .html for it to work. After you do that, it'll be easier to work with, 'cause .asp files are kinda a pain.
      How do I go about converting them?

      Did a Google search and really haven't come up with anything beneficial yet.
      {{ DiscussionBoard.errors[5188253].message }}
    • Profile picture of the author John Romaine
      Originally Posted by DGFletcher View Post

      From what I can tell, no, asp is not incredibly common.
      Are you serious?

      Classic ASP is a Microsoft coding language and has been around for decades.

      It pairs nicely with MS SQL server. I programmed in it for years.

      Active Server Pages - Wikipedia, the free encyclopedia
      Signature

      BS free SEO services, training and advice - SEO Point

      {{ DiscussionBoard.errors[5191718].message }}
      • Profile picture of the author shqipo
        Yep, pretty much what ronc0011 said. I don't use Hostgator so I had to go and look at their shared hosting offers; I don't see anywhere they support ASP or MS SQL. Theirs are Linux-based, although I think one can still support ASP in a Linux environment via i.e. Chilisoft - I've seen some host offer that. And if your website is running off a Database then no, your developer didn't just create asp code for the heck of it
        {{ DiscussionBoard.errors[5198332].message }}
  • Profile picture of the author RobKonrad
    I see a LOOOOOT of problems along the way.

    My suggestion: Either find a win server or start from scratch.

    Cheers,
    Rob
    Signature
    ================================================== ===
    This blog is awesome: http://www.robkonrad.com/blog. Read it.
    ================================================== ===
    {{ DiscussionBoard.errors[5188296].message }}
    • Profile picture of the author dv8
      Originally Posted by RobKonrad View Post

      I see a LOOOOOT of problems along the way.

      My suggestion: Either find a win server or start from scratch.

      Cheers,
      Rob
      Ok, thanks for your help.

      I'll just have them switch to a Windows server. I'll mention getting a new site, but I doubt they'll go for it.
      {{ DiscussionBoard.errors[5188544].message }}
      • Profile picture of the author ronc0011
        ASP is just a different technology it will do anything PHP will do and a lot more although it does require that the server has the .net Framework installed and that it is a windows server. Though, as has been mentioned there are addons for linux servers that allow them to run the .net framework. A windows Server will serve up HTML pages but if the .net Framework is installed and your pages have the .aspx file extension the server will parse the page and look for asp commands An aspx page also has HTML markup but the header or first line in the page ...
        Code:
        <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
        is gibberish to a server without the .net Framework installed. Depending on what else is on the page you might try just deleting this line or comment it out and see what the page does it should still have all the HTML markup
        Unless you are actually taking advantage of the asp technology there is no reason you can't just take out all the asp stuff unless it's a large site which could mean a lot of work. Basically any tag that starts with <asp: needs to be rebuilt in plan HTML and any tag that has a runat:server directive is an asp tag.

        Actually there is a lot of asp out there .MYspace is written in asp. It's just that PHP was established in the marketplace before asp really matured .
        {{ DiscussionBoard.errors[5191641].message }}
        • Profile picture of the author ronc0011
          Ahhh, OK I see what's going on at least some of it anyway, your pages are using a database backend and if they were built in asp they are most likely an MS SQL database. There is no question, you need to put the site on a Windows server with ASP support. Also if you are going to be maintaining this site you should spend some time in the video tutorials at Home: The Official Microsoft ASP.NET Site ad get familiar with all the data objects in asp
          {{ DiscussionBoard.errors[5191686].message }}

Trending Topics