asp.net网站怎么发布

来源:百度知道 编辑:UC知道 时间:2024/05/29 16:55:41
我用vs2008做了一个asp.net网站 我上传到Microsoft Office Live Home的空间但是却提示The codefile attribute on the page directive is not allowed in this page. 怎么解决?我的代码能编译通过本机上测试完全没问题 我想代码是没问题的 是不是发布前有什么东西我没做
我贴一页代码 请帮我看看 多谢多谢!!!! 解决了追20我的全部家当了
===================================================================
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!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>我的测试站test0501</title>
<style type="text/css

貌似The codefile attribute on the page directive is not allowed in this page.翻译为中文为不能执行
是不是你的空间不支持。net啊

对了 你不是直接把你做的网站的源文件发上去了吧也就是.cs文件和.aspx都上传了吧
晕 如果是的话请先在vs里面发布一下 编译后再上传

以前我给某家企业做网站的时候发布上去也是这样子的,最后才发现实服务器不匹配比如他只支持asp的而你发布aspx就不可以了,你仔细看下吧...

你把前后台的代码都发上来啊

生成选项里面-就有 发布网站选项 的