【发布时间】:2011-12-12 02:48:31
【问题描述】:
我刚刚遵循了一个创建数据库和两个 .aspx Web 表单的教程。当我在浏览器中查看 asp 页面时,它运行完美。但是当我 FTP 文件时:
默认.aspx
AddEntry.aspx
还有我的整个 App_Data 文件夹(带有 .mdf 和 .ldf 文件)
它不会在 URL 上查看。例如..当我去http://www.mysite.com/project/Default.aspx它不会加载我的网络表单...它只是显示原始文本说......
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" 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></title>
</head>
等等。如何正确发布它,使其像我在本地查看时一样工作?
编辑:
还没有找到专家设置——还有……
我在一个网络服务器上试过这个,我很确定它安装了 ASP,它给了我一个错误:
Server Error in '/' Application
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
为什么????
【问题讨论】:
-
另外,我正在使用 Visual Web Developer 2008 速成版
-
您的机器和 IIS/您使用的任何网络服务器上是否安装了 ASP.NET?它在调试模式下运行良好吗?
-
好像没有安装ASP.NET。
-
您要发布到的文件夹需要设置为该服务器上运行的 IIS 下的虚拟文件夹。这是你做的吗?
-
Raze:我自己还没有在我的 Web 服务器上安装 ASP.NET。 (Godaddy) 但我确实看到我的主机包支持 ASP。是的,它在调试模式下运行良好。