Home Asp.net Parser Error While Deploying Website to Server in Asp.net

Parser Error While Deploying Website to Server in Asp.net

61
1

When deploying asp.net application to host on live server or IIS server, you might get this type of parser error.

Parser error occurs while some resources are required to serve the request but not able to get the source.

Parser Error

Parser Error apsneto

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 ‘assembly.Default’

Following might be the possible solutions to solve out this error.

Solution 1

Web Application’s “Bin” folder is missing or the application’s DLL file is missing. Check all files are
successfully copied to production server or virtual directory.

Solution 2

Your application may not have successfully compiled because Visual Studio .NET is caching an old
version of the DLL files. So, you need to re-compile or build all DLL’s before uploading to production or
IIS server.

Solution 3

1. Use IIS WebServer Configuration
2. Right-Click on your WebSite > Properties
3. Then in the “Directory”, Create your Application, Add it to your ApplicationPool and verify that your
virtual directory is mounted properly
4. Then in the “bin” directory should be seen and used with all the files under it

Solution 4

You may have deployed to the “/” (web root) directory, but have not changed some of the settings
in the “Web.config” file. So, cross check those settings

Note: In most cases issue is we forget to upload latest built DLL’s under “bin” folder or failed to upload some files on server during uploading through FTP program. So, cross check all files are successfully uploaded to server.

Tip: You can get more tutorials on Solutions, Asp.net, IIS here.

1 COMMENT

  1. Should I Exclude references to the bin..project..dll in TFS or Visual Studio ONline Builds?

    One of our customers uses Visual Studio Online which is based on capabilities of Team Foundation Server (TFS)

    We were researching how to do automated Builds and automated Unit Tests using the Visual Studio Online hosted build agent.

    We are trying to build one of our Web Applications on it.

    Our Web Application solution contains a number of csproj files under the solution.

    Note: The Web Applications will build properly and run properly on our local development computers using Visual Studio 2012.

    However, when we build the web application on the Visual Studio Online’s Hosted Build Agent, it throws the following error about not finding the my application’s main dll( my application is called BlahBlah ):

    C:Program Files (x86)MSBuildMicrosoft VisualStudiov11.0WebApplicationsMicrosoft.WebApplication.targets (182): Could not copy the file “binBlahBlah.dll” because it was not found. C:Program Files (x86)MSBuildMicrosoftVisualStudiov11.0WebApplicationsMicrosoft.WebApplication.targets (182): Could not copy the file “binBlahBlah.pdb” because it was not found.

    Therefore, I checked the various csproj files within our Web Application solutions, and I found the following code:

    In order to make it run properly on the Visual Studio Online’s Hosted Build Agent, the above references were replaced by the following:

    After replacing the references, our application would build properly on the Visual Studio Online’s Hosted Build Agent.

    However, Should I Exclude references to the bin..project..dll in TFS or Visual Studio ONline Builds? In other words, is my above successful build a “False Pass” ?

LEAVE A REPLY

Please enter your comment!
Please enter your name here
Captcha verification failed!
CAPTCHA user score failed. Please contact us!