Parser Error when deploy ASP.NET application

后端 未结 17 602
既然无缘
既然无缘 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:31

    Faced the same error when I had a programming error in one of the ASHX files: it was created by copying another file, and inherited its class name in the code behind statement. There was no error when all ASPX and ASHX files ran in IIS Express locally, but once deployed to the server they stopped working (all of them).

    Once I found that one ASHX page and fixed the class name to reflect its own class name, all ASPX and ASHX files started working fine in IIS.

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

    After a lot of searching ,i found the problem was in my project dll file .i cleaned and rebuild my project when there were compilation errors ... simple solution is to remove all compilation errors in all pages either by removing contents or commenting lines ,then clean and rebuild your project ... this will sort out your problem ..

    0 讨论(0)
  • This happens when the files inside the Debug and Release folder are not created properly(Either they are having wrong reference or having overwritten many times). I have faced the same problem in which, i everything works fine when we build the solution, but when i publish the website it gives me same error. I have solved this in following manner:

    1. Go to your Solution Explorer in Visual Studio and click on show hidden files (if they are not showing ! )
    2. you will find a folder named obj, open it .
    3. Here there are again 2 folder named respectively as Debug and Release. Now, delete the content from these two folder, Make sure that you do not delete the folders Debug and Release. Only delete the files and folders inside Debug and Release folder.
    4. Now build and publish your solution and everything will work like charm.
    0 讨论(0)
  • 2021-01-03 23:37

    I have solved it this way.

    Go to your project file let's say project/name/bin and delete everything within the bin folder. (this will then give you another error which you can solve this way)

    then in your visual studio right click project's References folder, to open NuGet Package Manager.

    Go to browse and install "DotNetCompilerPlatform".

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

    In my case I missed the compile tag in the .csproj file

    <Compile Include="Global.asax.cs">
      <DependentUpon>Global.asax</DependentUpon>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Compile>
    
    0 讨论(0)
  • 2021-01-03 23:42

    I know i am too late to answer but it could help others and save time.

    Following might be other solutions.

    Solution 1: See Creating a Virtual Directory for Your Application for detailed instructions on creating a virtual directory for your application.

    Solution 2: Your application’s Bin folder is missing or the application’s DLL file is missing. See Copying Your Application Files to a Production Server for detailed instructions.

    Solution 3: You may have deployed to the web root folder, but have not changed some of the settings in the Web.config file. See Deploying to web root for detailed instructions.

    In my case Solution 2 works, while deploying to server some DLL's from bin directory has not been uploaded to server successfully. I have re-upload all DLL's again and it works!!

    Here is the reference link to solve asp.net parser error.

    0 讨论(0)
提交回复
热议问题