Parser Error when deploy ASP.NET application

后端 未结 17 601
既然无缘
既然无缘 2021-01-03 22:56

I\'ve finished simple asp.net web application project, compiled it, and try to test on local IIS. I\'ve create virtual directory, map it with physical directory, then put al

相关标签:
17条回答
  • 2021-01-03 23:42

    When you add subfolders and files in subfolders the DLL files in Bin folder also may have changed. When I uploaded the updated DLL file in Bin folder it solved the issue. Thanks to Mayank Modi who suggested that or hinted that.

    0 讨论(0)
  • 2021-01-03 23:43

    Sometimes it happens if you either:

    1. Clean solution/build or,
    2. Rebuild solution/build.

    If it 'suddenly' happens after such, and your code has build-time errors then try fixing those errors first.

    What happens is that as your solution is built, DLL files are created and stored in the projects bin folder. If there is an error in your code during build-time, the DLL files aren't created properly which brings up an error.

    A 'quick fix' would be to fix all your errors or comment them out (if they wont affect other web pages.) then rebuild project/solution

    If this doesn't work then try changing: CodeBehind="blahblahblah.aspx.cs"

    to: CodeFile="blahblahblah.aspx.cs"

    Note: Change "blahblahblah" to the pages real name.

    0 讨论(0)
  • 2021-01-03 23:43

    I've solve the issue. The solution is to not making virtual dir manualy and then copy app files here, but use 'Add Application...' option. Here is post that helped me http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/7ad2acb0-42ca-4ee8-9161-681689b60dda/

    0 讨论(0)
  • 2021-01-03 23:52

    In my case, There were new code branch and old code branch was deployed locally in IIS. So it was pointing to old branch code that was not available. So i had deployed my code to IIS with new branch and it is working now.

    0 讨论(0)
  • 2021-01-03 23:52

    Looking at the error message, part of the code of your Default.aspx is :

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="AmeriaTestTask.Default" %>
    

    but AmeriaTestTask.Default does not exists, so you have to change it, most probably to the class defined in Default.aspx.cs. For example for web api aplications, the class defined in Global.asax.cs is : public class WebApiApplication : System.Web.HttpApplication and in the asax page you have :

    <%@ Application Codebehind="Global.asax.cs" Inherits="MyProject.WebApiApplication" Language="C#" %>
    
    0 讨论(0)
提交回复
热议问题