2016-09-22 5 views
0

私のサイトをHostingerドメインに数日間アップロードしようとしましたが、何らかの理由で.aspxファイルに未加工コードが表示され、ブラウザを実行します。 どのようにアドバイスしますか?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のWebサイトでは、.netフレームワークをサポートしていないようです。

0

あなたのサーバーは.aspx Webページのコードを実行していないようですが、そのコンテンツ(ソースコード)を返します。

Webサーバープロバイダーに連絡し、.NETページを提供していることを確認してください。

関連する問題