2016-09-22 72 views
0

我一直试图上传我的网站到我的Hostinger域几天,但由于某些原因,.aspx文件显示原始代码,并没有显示任何GUI存在时通过浏览器运行。 你会怎么建议?仅ASPX文件显示代码

<%@ Page Title="" Language="C#" MasterPageFile="~/Mater Pages/Primary.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> 


<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> 
<style type="text/css"> 
.auto-style1 { 
    width: 873px; 
    height: 455px; 
    } 
</style> 
</asp:Content> 
<asp:Content ID="Content2" ContentPlaceHolderID="cpMainContent" Runat="Server"> 
<h2 style="text-align: center"> 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Hello and welcome to my personal website. I hope that you enjoy your visit.</h2> 
<h3 style="text-align: center"> 
    If for any reason you can&#39;t find exactly what you are looking for then please use the contact form <a href="Main%20Pages/Contact%20Me.aspx">here</a> and you&#39;ll get a response within 2-3 working days</h3> 
<h3 style="text-align: center"> 
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    <img alt="" class="auto-style1" src="Images/Default/image%20for%20hompage.png" /></h3> 
<p style="text-align: center"> 
    &nbsp; 
    <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> 
<!-- Website Ad Test --> 
<ins class="adsbygoogle" 
style="display:inline-block;width:728px;height:90px" 
data-ad-client="ca-pub-8284273019831171" 
data-ad-slot="7241345648"></ins> 
<script> 
(adsbygoogle = window.adsbygoogle || []).push({}); 
</script> 
</p> 
</asp:Content> 
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> 
</asp:Content> 
+1

您确定主机帐户是.NET吗?只有运行IIS的服务器才能显示ASPX文件。 –

+0

请在调用您的母版页时检查是否没有任何问题。 –

回答

1

看着Hostinger的网站,在我看来,他们不支持.net框架。

0

看来您的服务器不会执行.aspx网页中的代码,它只是返回它的内容(源代码)。

请联系您的Web服务器提供商,并确保它们正在提供.NET页面。