开发者

HowTo Publish ASP.NET Project on Web to work as it does locally?

I just followed a tutorial that created a database and two .aspx web forms.. And it runs perfectly when I view the asp pages in my browser. But when I FTP'd the files:

Default.aspx

AddEntry.aspx

And my entire App_Data folder (with the .mdf and .ldf files)

It doesn't view at the URL. For example.. When I go to http://www.mysite.com/project/Default.aspx it doesn't load my web form... It just displays raw text saying....

<%@ 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>

Etc. How do I properly publish it so it work开发者_开发百科s like when I view it locally?

EDIT:

Still haven't found expert settings -- Also...

I tried this on a web server that I'm pretty certain has ASP installed and it gives me an error:

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".

Whyy????


You need to properly configure the site on the server.

The easiest way to do that is to use the Publish Website command form the Build menu. I think you need to select Expert Settings in WebDeveloper first.

And the Server needs to be configured for ASP.NET, just install the right version of .NET on the server, and maybe fix-up by running ASPNET_REGIIS.exe

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜