简体   繁体   English

生产/开发中的 ASP.Net 问题

[英]ASP.Net Problem in Prod/Dev

I am facing strange problem, Whenever I commented second if condition, it works in Production, but fail in development.我面临一个奇怪的问题,每当我评论第二个if条件时,它在生产中工作,但在开发中失败。

And when I dont comments second if condtion of code, it works for development and fail for production.而且,当我不评论代码条件时,它适用于开发而无法用于生产。

    protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                lblDocument.Text = "Document :" + this.Request.QueryString["A_No"].ToString();
                //if (!frmViewer.Action.Contains("?"))
                //{
                //    frmViewer.Action = String.Format("{0}?A_No={1}&A_Format={2}",
                //                                     frmViewer.Action,
                                                     //this.Request.QueryString["A_No"].ToString(),
//                                                     //this.Request.QueryString["A_Format"].ToString());
//                }
            }
        }

Here is Error message:这是错误消息:

CS0117: 'System.Web.UI.HtmlControls.HtmlForm' does not contain a definition for 'Action' CS0117:“System.Web.UI.HtmlControls.HtmlForm”不包含“操作”的定义

Did you verify that your ASPX file was migrated up to production with the latest changes?您是否确认您的 ASPX 文件已通过最新更改迁移到生产环境?

It looks to me that the Action control was added in development, and the DLL file migrated up to production, but not the corresponding ASPX file.在我看来,Action 控件是在开发中添加的,并且 DLL 文件已迁移到生产环境,但不是相应的 ASPX 文件。

Other people that have reported this problem have downloaded the .NET 3.5 SP1 Update, and that fixed their issue. 报告此问题的其他人已下载 .NET 3.5 SP1 更新,并解决了他们的问题。

Make sure both production and development are running the latest version of the .NET Framework (currently the version listed above).确保生产和开发都运行最新版本的 .NET 框架(当前是上面列出的版本)。

Also, make sure you 'clean' your solution, then rebuild it.此外,请确保您“清理”您的解决方案,然后重新构建它。

Well Barbaros Alp give me following hint to solve this problem...那么Barbaros Alp给我以下提示来解决这个问题......

Right Click on the solution > Click Clean Solution then Build Solution –右键单击解决方案>单击清洁解决方案然后构建解决方案 -

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM