Solution: Unrecognized attribute ‘targetFramework’. Note that attribute names are case-sensitive.


I was using Visual Studio 2012 and was writing a Web App using .NET 4.5 so in my web.config I had:

<compilation debug="true" targetFramework="4.5">

However every time I run my app, I was getting an error “Unrecognized attribute ‘targetFramework’. Note that attribute names are case-sensitive.”

This is caused by the IIS running an older version of ASP.NET

Solution to fix on local dev box:

  • Click on “Website” tab in the top menu
  • Select “Start Options..”


  • From the pop-up window, on the left menu select “Build”
  • Choose your .NET framework desired
  • Click OK/Apply


That should be it 🙂

WinSCP authentication using private key C#


I was trying to connect to WinSCP from my Web Application using C# however I kept on getting an unknown server error. After doing some research (of which I did not find much), my dear friend helped me out figuring out the solution. So here it goes..


winscp> open "" -privatekey=C:\keys\private.ppk
Searching for host...
Connecting to host...
Continue connecting to an unknown server and add its host key to a cache?
The server's host key was not found in the cache. You have no guarantee that the server is the computer you think it is.
The server's dss key fingerprint is:
ssh-dss 1024 68:57:83:42:c9:42:08:db:13:0d:80:ec:8b:e2:43:c0
If you trust this host, press Yes. To connect without adding host key to the cache, press No. To abandon the connection press Cancel.
(Y)es, (N)o, C(a)ncel, (C)opy Key: Cancel
Host key wasn't verified!
Host key fingerprint is ssh-dss 1024 68:57:83:42:c9:42:08:db:13:0d:80:ec:8b:e2:43:c0.

Authentication failed.

Continue reading