c# - 发布 .NET c# 应用程序时出错

标签 c# .net deployment frameworks publish

已经两天了,我还没能让这个应用程序在主机上运行。这个应用程序在一个子目录中,用 C# 编写,另一个应用程序是 C#。它在我的开发计算机上工作得很好。我一直在尝试以下方法。

  1. 1.我对 web.config 进行了更改,因此不会发生冲突。 (好像没问题)
  2. 当我创建应用程序时,它是使用 3.5 版创建的。我降级到 2.0
  3. 我一直在重新编译,确保 .aspx 文件和 .cs 文件在目录下。 我错过了什么。

如有任何建议/意见或问题,请告诉我。这令人沮丧。下面是链接和我得到的错误

http://www.martinesexpress-inc.com/PhoneControl/Default.aspx

Server Error in '/' Application. Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'ElLogPh._Default'.

Source Error:

Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ElLogPh._Default" %>
Line 2:
Line 3: Source File: /PhoneControl/Default.aspx Line: 1 Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053

最佳答案

您正在发布到应用程序根目录 (http://www.martinesexpress-inc.com/) 的子目录 (PhoneControl)。如果 PhoneControl 不是 IIS 中的应用程序,则它不会在 http://www.martinesexpress-inc.com/PhoneControl/bin 中查找程序集。但是http://www.martinesexpress-inc.com/bin .

关于c# - 发布 .NET c# 应用程序时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1411547/

相关文章:

deployment - gh - 页面上的 SvelteKit 部署不起作用。仅显示 HTML,不加载 CSS 和 JS

asp.net - 如何避免困惑的 ASP.NET Web 应用程序部署?

c# - 使用 JavaScript 将参数传递给代码隐藏函数

c# - 是否可以在 Swagger UI 的参数部分显示请求主体对象?

c# - Parallel.For 与 Parallel.Invoke

c# - xUnit 不会将消息写入输出 Pane

c# - 两个验证组

asp.net - 将代码更改部署到 IIS 中托管的 asp.net 网站

c# - 通用约束和接口(interface)实现/继承

c# - F# 和企业软件