But the thing is why it works in other fresh machine with same configuration and why not on this? possible solution are below (apart from changing on config file level or unlocking config elements)
- If you are using WCF make sure you have turned on the feature called "http activation" is turned on - It worked for me
- If you are using windows authentication, make sure it is installed and turned on
- run "c:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i"
I know there are many reason which can cause this but i just drafted which worked for me as i was working with windows auth and WCF so may be if you have the same kind of scenario, it might help without locking/unlocking things from web.config