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 While Deploying Website to Server in Asp.net
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.
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.
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.
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
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.
That’s it, these are the possible ways to fix the parse error in asp.net.
Let me know if you’ve any questions or doubts about this solutions by writing down your queries in comment below. I would be happy to provide you my feedback as soon as possible.