I am a student who is trying to teach myself webforms, who has just downloaded VS express 2010 and created the default website webform. I have built the web site with no errors, and I have copied the web site into the root folder c:\inetweb\www.root\webtrial\trial2
and refreshed.The web site is fine when it is viewed in browser, However, when I browse within iis manager, I get the above error. Why? Please note that sometimes within the mnager, the option to change .Net settings, sometimes =v2.0(50727) with the option
to change it to V4.0(30319). Apologies it this question has been asked before. windows 7 i5 laptop
You would get this error if the application pool for that site is running ASP.Net v 2.x to 3.x. The targetFramework attribute was introduced starting in the 4.0 version of the framework, so previous versions hiccup when they see it. If it's a 4.0 site, change
the application pool to the 4.0 framework and the error will go away.
You'll probably just want to change the application pool to 4.0 as Visual Studio doesn't necessarily know what IIS is doing as it can work without ever talking to it's settings. That's the main reason for some of the errors. When viewing through Visual Studio
you aren't usually going through IIS, but instead a baby developer server which binds just to that project while it's running. Hence the no errors since it's not IIS.
Don't forget to mark useful responses as Answer if they helped you towards a solution.
Marked as answer by Tickthebox on Oct 12, 2011 08:08 AM
Tickthebox
Member
11 Points
9 Posts
compilation debug="false" strict="false" explicit="true" targetFramework="4.0" />
Oct 11, 2011 10:35 PM|LINK
Hello Chaps.
I am a student who is trying to teach myself webforms, who has just downloaded VS express 2010 and created the default website webform. I have built the web site with no errors, and I have copied the web site into the root folder c:\inetweb\www.root\webtrial\trial2 and refreshed.The web site is fine when it is viewed in browser, However, when I browse within iis manager, I get the above error. Why? Please note that sometimes within the mnager, the option to change .Net settings, sometimes =v2.0(50727) with the option to change it to V4.0(30319). Apologies it this question has been asked before. windows 7 i5 laptop
Ta
markfitzme
Star
14451 Points
2231 Posts
Re: compilation debug="false" strict="false" explicit="true" targetFramework="4.0" />
Oct 12, 2011 12:45 AM|LINK
You would get this error if the application pool for that site is running ASP.Net v 2.x to 3.x. The targetFramework attribute was introduced starting in the 4.0 version of the framework, so previous versions hiccup when they see it. If it's a 4.0 site, change the application pool to the 4.0 framework and the error will go away.
You'll probably just want to change the application pool to 4.0 as Visual Studio doesn't necessarily know what IIS is doing as it can work without ever talking to it's settings. That's the main reason for some of the errors. When viewing through Visual Studio you aren't usually going through IIS, but instead a baby developer server which binds just to that project while it's running. Hence the no errors since it's not IIS.
Tickthebox
Member
11 Points
9 Posts
Re: compilation debug="false" strict="false" explicit="true" targetFramework="4.0" />
Oct 12, 2011 08:09 AM|LINK
Thanks very much. It worked!