In some cases the web.config file isn't in the correct format.
Open the web.config file and check all XML tags.(For example, by putting the following codes in the web.config, if the project is executed, then the problem is from it)
<?xml version="1.0" encoding="utf-8"?><configuration></configuration>