Umbraco 4 won't support the .NET 4.0 framework, but can you use .NET 4.0 in your own dll's if you update the web.config to support .NET 4.0? Just like you can now download Web.config file to use with .NET 3.5+ (Recommended default) will there also be a release for .NET 4.0?
I hope so too, as that might be a huge deal breaker for a client of us who wants all their tools and sites in .net 4.0 i got alot of otther issues to look at but i will eventually need to know about this too before we agree on contract :)
that was one of the first things I tried after installing VS 2010 and it works :) yeah (I run 4.1 beta II on Framework 4.0). There were some things I had to do befor got it working:
1. Set the Application Pool to .Net Framework 4
2. Edit the web.config! In Framework 4 many of the settings from the previous versions went to the machine.config wich made the web.config much smaller. It will append my config so you could check yours against it.
well, i took the latest 4.1 beta 2, and alot is different in your web.config
i'm compairing them, while trying to figure out what changes were made for the .net 4.0 version and what were made just for your project.
should there be more than just changing the compiler version targetFramework="4.0"
well theres that and of course the 4.0 appPool. The site is running in that application Pool and gives this error after the config changes:
The value for the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if you are compiling for version 4.0 or later of the .NET Framework. To compile this Web application for version 3.5 or earlier of the .NET Framework, remove the 'targetFramework' attribute from the <compilation> element of the Web.config file.
if you could be a little more speciifc on what you changed that would be a big help thanks
and deleted the complete assemblies-section under that
2. remove/comment out the asp-prefixed controls under system.web/pages/controls
3. under system.webServer and system.web remove/comment out all ASPNETAJAX handlers and modules
4. remove/comment out the whole system.codedom section
As a rule of thumb youcould go through your web.config file search for ' Version=3.5.0.0' and comment out all those lines and the system.codedom-section
seems to work i do think you left something out though :) site runs, backend runs, but when publishing it renders the potentially harmfull script because there are html tags in the node for the rich text editors)
weirdly enough adding ValidateRequest="false" to the page directive of editContent.aspx
most of the things you comment / removed are things that found another place in the 4.0
in the machine config you say.
as i have assemblies i want to add, but since the assemblies node in the compilation node had to be removed for the above goal (transfering to .net 4.0)
you are correct if you would like to add your own controls do add them where you used to add them :) It's just a matter of not having to declare those .Net 3.5 Controls.
Maybe you could check your default web.config file which you can find here: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config everything which is defined in ther does not have to be in the web.config file sinc yours inherit settings from this standard web.config. So you could check to figure out what to remove from your web.config.
Except for the ValidateRequest issue everything seems to work every postback in backend with fields holding html returns an error to the screen for a possible dangerous script it does not help to add ValidateRequest="false" in the pagedirective, nor does it help adding the attribute to the pages element in the web.config. i'm going to include my web.config for reference maybe someone finds the reason for this blocking error
you might notice there is some code inserted for MVC too, tagged with <!-- ASP MVC --> these have nothing to do with the error, i tried cutting them out , same result
Owkay, i found the issue weird that you did not have these difficulties toby, as your web.config does not contain this:
<httpRuntime requestValidationMode="2.0" />
adding that line (in configuration/system.web) does fix it (somehow) its not actually a fix, more like a "please use the old validation, that did not trigger on those specific postbacks in .net2.0"
anyway, publishing and editing xslt's and css files works again.
the the web.config i use is not 100% good, as the umbraco does not seem to be working properly after moving changes to the testing server.
locally i can run a 4.1 umbraco with the above web.config and it works well in .net 4.0
but after moving to the server, it fails at loading the content tree's when i remove the web.config changes and put it back in the default app pool, the tree loads again so i'm going to do more testing and see what changes made this issue come up.
cool maybe a wiki doc would be great for this topic!
Is there a complete .Net 4.0 on the server! I've read that from 4.0 the framework is devided into two different profiles (the client profile and the full blown one). Can you check which one is installed on the server as i suppose you (as i) have installed the full framework on your machine this could make a/the difference...
I've just installed the last Umbraco 4.1 RC, compiled my projects and changed the app pool to target the .net framework 4 but i got this following error :
BC30560: 'ExtensionAttribute' is ambiguous in the namespace 'System.Runtime.CompilerServices'.
It targets the InternalXmlHelper file which contains unmanaged code, has someone encountered this problem ?
Does umbraco work with .NET 4 framework?
I ran the web installer and I'm getting an error. I installed the .net 4 framework monday and I think that's my problem.
Here's the error: Error Summary
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
I have VS2010 installed on my machine, and have so for quite a while with no problems.
Make sure your IIS is set to run .NET 2.0, as Umbraco is only for the 2.0 CLR. Umbraco 4 will not support the .NET 4.0 framework.
Interesting .NET framework isn't backward compatible, or it's web.config issue?
Umbraco 4 won't support the .NET 4.0 framework, but can you use .NET 4.0 in your own dll's if you update the web.config to support .NET 4.0? Just like you can now download Web.config file to use with .NET 3.5+ (Recommended default) will there also be a release for .NET 4.0?
I hope so too, as that might be a huge deal breaker for a client of us who wants all their tools and sites in .net 4.0
i got alot of otther issues to look at but i will eventually need to know about this too before we agree on contract :)
Hi all,
that was one of the first things I tried after installing VS 2010 and it works :) yeah (I run 4.1 beta II on Framework 4.0). There were some things I had to do befor got it working:
1. Set the Application Pool to .Net Framework 4
2. Edit the web.config! In Framework 4 many of the settings from the previous versions went to the machine.config wich made the web.config much smaller. It will append my config so you could check yours against it.
Hope this helps
Toby
well, i took the latest 4.1 beta 2, and alot is different in your web.config
i'm compairing them, while trying to figure out what changes were made for the .net 4.0 version
and what were made just for your project.
should there be more than just changing the compiler version targetFramework="4.0"
well theres that and of course the 4.0 appPool. The site is running in that application Pool and gives this error after the config changes:
The value for the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if you are compiling for version 4.0 or later of the .NET Framework. To compile this Web application for version 3.5 or earlier of the .NET Framework, remove the 'targetFramework' attribute from the <compilation> element of the Web.config file.
if you could be a little more speciifc on what you changed that would be a big help
thanks
Okay, i try to remember (please backup your web.config first ;) ):
1. change in compilation Tag change from
to
and deleted the complete assemblies-section under that
2. remove/comment out the asp-prefixed controls under system.web/pages/controls
3. under system.webServer and system.web remove/comment out all ASPNETAJAX handlers and modules
4. remove/comment out the whole system.codedom section
As a rule of thumb youcould go through your web.config file search for ' Version=3.5.0.0' and comment out all those lines and the system.codedom-section
Hope that helps
Toby
P.S. ScottGu mad a blog post about the changes in the standard web.config: http://weblogs.asp.net/scottgu/archive/2009/08/25/clean-web-config-files-vs-2010-and-net-4-0-series.aspx
seems to work i do think you left something out though :)
site runs, backend runs, but when publishing it renders the potentially harmfull script because there are html tags in the node for the rich text editors)
weirdly enough adding ValidateRequest="false" to the page directive of editContent.aspx
or doing it globally in web.config
does not change a thing
so if i understand you well,
most of the things you comment / removed are things that found another place in the 4.0
in the machine config you say.
as i have assemblies i want to add, but since the assemblies node in the compilation node had to be removed for the above goal (transfering to .net 4.0)
Hi,
you are correct if you would like to add your own controls do add them where you used to add them :) It's just a matter of not having to declare those .Net 3.5 Controls.
Maybe you could check your default web.config file which you can find here: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config everything which is defined in ther does not have to be in the web.config file sinc yours inherit settings from this standard web.config. So you could check to figure out what to remove from your web.config.
Except for the ValidateRequest issue everything seems to work
every postback in backend with fields holding html returns an error to the screen for a possible dangerous script
it does not help to add ValidateRequest="false" in the pagedirective, nor does it help adding the attribute to the pages element in the web.config.
i'm going to include my web.config for reference maybe someone finds the reason for this blocking error
you might notice there is some code inserted for MVC too, tagged with <!-- ASP MVC -->
these have nothing to do with the error, i tried cutting them out , same result
Owkay, i found the issue
weird that you did not have these difficulties toby, as your web.config does not contain this:
adding that line (in configuration/system.web) does fix it (somehow) its not actually a fix, more like a "please use the old validation, that did not trigger on those specific postbacks in .net2.0"
anyway, publishing and editing xslt's and css files works again.
great! i would give a "thumb up" for this one but it's only allowd from karma 70+ sorry
Just as information,
the the web.config i use is not 100% good,
as the umbraco does not seem to be working properly after moving changes to the testing server.
locally i can run a 4.1 umbraco with the above web.config and it works well in .net 4.0
but after moving to the server, it fails at loading the content tree's
when i remove the web.config changes and put it back in the default app pool, the tree loads again
so i'm going to do more testing and see what changes made this issue come up.
cool maybe a wiki doc would be great for this topic!
Is there a complete .Net 4.0 on the server! I've read that from 4.0 the framework is devided into two different profiles (the client profile and the full blown one). Can you check which one is installed on the server as i suppose you (as i) have installed the full framework on your machine this could make a/the difference...
Has a wiki already been added? Would love to see a good overview of how to use .Net 4.0 with Umbraco.
Jeroen
I've just installed the last Umbraco 4.1 RC, compiled my projects and changed the app pool to target the .net framework 4 but i got this following error :
BC30560: 'ExtensionAttribute' is ambiguous in the namespace 'System.Runtime.CompilerServices'.
It targets the InternalXmlHelper file which contains unmanaged code, has someone encountered this problem ?
So far that i've read, it is because of IronPython :
http://lists.ironpython.com/pipermail/users-ironpython.com/2008-August/008126.html
is working on a reply...