我的问题是有关在共享服务器上托管Asp.Net网站的。我有一个网站,其中有 1个母版页和4000个子页,该网站是在asp.net中创建的,但是页面就像是静态的-我 不使用任何数据库 。我简单地从母版页创建一个子页,写上标题,标题,描述和内容。 该网站每天的网页浏览量为30,000至40,000 。
问题是:当我在母版页中进行任何更改时,网站关闭了3-4个小时。子页面上传没有问题-上传我使用FileZilla的页面(可以上传任意数量的子页面,没有网站问题)。
我正在使用GoDaddy's Ultimate Windows Hosting plan
这是我的母版页代码:
<%@ Master Language="VB" AutoEventWireup="true" CodeFile="mpageR.master.vb" Inherits="mywebsite" %>
<!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">
<head runat="server">
<title></title>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" href="css/W3.css"/>
<link rel="stylesheet" href="css/style1.css"/>
<!-- START: Analytics-->
<!-- Analytics code-->
<script type="text/javascript">
...
</script>
<!-- END: Analytics Code-->
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<!--Main Page Section-->
<form id="form1" runat="server">
<div class="w3-row">
<!--Header control (reading a file in this control to show header section)-->
<%@ Register TagPrefix="uc" TagName="header_cntrl" Src="~/user-controls/header.ascx" %>
<uc:header_cntrl id="header_cntrl1" runat="server"/>
<!--End of Header-->
</div>
<div class="w3-row">
<!--main section-->
<div class="left-panel">
<!-- Left Nav Menu (reading file for left panel)-->
<%@ Register TagPrefix="uc" TagName="LeftNavMenu" Src="~/plugins/LeftNavMenu.ascx" %>
<uc:LeftNavMenu id="LeftNavMenu" runat="server"/>
<!-- End of Left Nav Menu-->
</div>
<div class="main-panel">
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
<div class="right-panel">
<!-- Right Nav Menu (reading file for right section)-->
<%@ Register TagPrefix="uc" TagName="RgtNavMenu" Src="~/plugins/RgtNavMenu.ascx" %>
<uc:RgtNavMenu id="RgtNavMenu" runat="server"/>
<!-- End of Right Nav Menu-->
</div>
</div>
<br />
<!--Footer control (reading file for footer)-->
<%@ Register TagPrefix="uc" TagName="footer_cntrl" Src="~/user-controls/footer.ascx" %>
<uc:footer_cntrl id="footer_master" runat="server"/>
<!--End of Footer-->
</form>
<!--End of Main Page Section-->
</body>
</html>
Web.config文件:
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0">
</compilation>
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
<customErrors mode="On">
<error redirect="~/error.aspx" statusCode="404"/>
</customErrors>
</system.web>
<system.webServer>
<rewrite>
<rules>
<rule name="Redirect to WWW" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^mywebsiye.com$" />
</conditions>
<action type="Redirect" url="https://www.mywebsite.com/{R:0}"
redirectType="Permanent" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>