In my solution, there are several projects. One project was upgraded to .NET Framework 4.5.2
. All other projects are using the version .NET Framework 4.5.1
.
The project upgraded is the main site (root), other projects are sub sites. The sites are hosted to the server. The sub sites are working and the main site not working. The server having the version .NET Framework 4.6
.
When I run the main site, the site shows Object reference error.
Source code changes in project file
EDIT: The site is working fine when I run the application from Visual Studio 2013. I did not get any Object reference error. When I published and deployed the site in the server, it is not working, showing the Object reference error.
NOT AN ISSUE: I found the issue, somebody in the team changed the appSettings value in web.config changed in server, that cause the issue. I thought it was because of .NET Framework upgrade issue, because no other code changes done in the application. I appreciate all for your valuable comments.