Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Following the article entitled https://our.umbraco.com/documentation/Tutorials/Porting-Packages-V8/
section 'New Composer & Component way' I have changed my code accordingly, but now get a compilation error (see screen snippet).
I've had a similar issue and fixed it by changing Umbraco.Core.Components to Umbraco.Core.Composing.
Also, implementing the code in the documentation I figured that you also need to use Umbraco.Web.
Thanks, docs updates with the correct namespace now 👍
I created a pull request for that, should I delete it (https://github.com/umbraco/UmbracoDocs/pull/1616)? Also, the docs still don't have Umbraco.Web in the usings, which makes SetContentLastChanceFinder() throw a missing error.
Thanks Koen that's done the trick
I would suggest not putting code in App_Code, and if you do, try to compile your website to make sure the code actually compiles :)
Quick question: I'm trying to get Umbraco v8 to force Tls1.2 as its default protocol and assumed that putting a component .CS file in App_Code was the right place for that, but you're saying it should go elsewhere maybe? Not well-versed in the new Components structure so am a bit lost.
This will work on v8:
[RuntimeLevel(MinLevel = RuntimeLevel.Run)]
public class MyComposer : ComponentComposer<MyComponent>
//this automatically adds the component to the Components collection of the Umbraco composition
public class MyComponent : IComponent
// initialize: runs once when Umbraco starts
public void Initialize()
if (ServicePointManager.SecurityProtocol.HasFlag(SecurityProtocolType.Tls12) == false)
ServicePointManager.SecurityProtocol = ServicePointManager.SecurityProtocol | SecurityProtocolType.Tls12;
// terminate: runs once when Umbraco stops
public void Terminate()
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted