c# – How to fix the Server Error(parse Error) after deploying te asp.net site


I uploaded my asp.net application through FTP from visual studio, after deploying it is throwing runtime(Parse Error).

Sorry, I can’t post my images here due to reputation points..so I’m forced to use links.
Any high rep user, please edit this!
Thanks in advance!

I have seen several posts and tried many alternatives but none of them is working:

After uploading, the error was:

As mentioned in this post: Parser Error Message: Could not load type ‘webmarketing’, I changed CodeBehind to CodeFile but a new error has been raised stating that asax.cs does not exist!

View post on imgur.com

At the time my plesk file manager looked like this:

View post on imgur.com

And then I uploaded Global.asax.cs file and then this error showed up:

View post on imgur.com

As shown in this post: Parser Error: Server Error in ‘/’ Application I changed Global.asax.cs namespace such that it is equal to the inherits path in asax!

Modified namespace code in asax.cs:

View post on imgur.com

code in asax:

<%@ Application CodeBehind="Global.asax.cs" Inherits="SimpleEchoBot.WebApiApplication" Language="C#" %>

but still, the above “This program is blocked by group policy” error is getting raised!

And I deployed the same application to Azure, same parse error, mentioned at the top is showing up!
link to Azure site :https://microsoftbothungerbotbot20190106113733.azurewebsites.net/

Can someone let me know what’s the fix for this?
Thanks in advance!


Please enter your comment!
Please enter your name here