This is a migrated thread and some comments may be shown as answers.

ASP.Net RadEditor alongside Sharepoint RadEditor

17 Answers 212 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
Rudy Yonkov
Top achievements
Rank 1
Rudy Yonkov asked on 07 Jan 2010, 09:27 PM
We are currently using Moss2007 with the free sharepoint editor 4.5.1.0 that comes with 7.3.2.0 RadEditor.Net2.dll
We decided to write some user controls that would host the RadEditor
Trying to use 7.3.2.0 dll  inside a user control gives:
The type 'Telerik.WebControls.RadEditor' has no constructors defined

Downloaded trial full .Net version 7.1.0.0, which worked fine for user control development
Then In Moss 
placed the dll in the _app_bin folder and copied RadControls folder of the trial control to
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\wpresources\RadEditorSharePoint\7.1.0.0__852c9eb6525c1b53
Set the RadControlsDir in web.config to point to the above directory
Referenced the 7.1.0.0 dll from within our user control 
Now we have the sharepoint editor and the asp.net version co-existing in Moss.

Question
Is this the right way to set it all up? 
Isn't there a way to have only one RadControls folder that would drive both controls?
currently we have one under 4.5.1.0__1f131a624888eeed and one uder 7.1.0.0__852c9eb6525c1b53

Thanks,
Rudy

17 Answers, 1 is accepted

Sort by
0
Stanimir
Telerik team
answered on 08 Jan 2010, 08:39 AM
Hello Rudy,

Could you provide me with your web.config file? It will help me in giving you more accurate answers.

Thank you.


Greetings,
Stanimir
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Rudy Yonkov
Top achievements
Rank 1
answered on 13 Jan 2010, 07:19 PM
I am sending you the web.config relative information

<SafeControls>
      <SafeControl Assembly="RadTabStrip.Net2, Version=3.6.6.0, Culture=neutral, PublicKeyToken=a87324b017ca21ce" Namespace="Telerik.WebControls" TypeName="*" Safe="True" />
      <SafeControl Assembly="RadEditor.Net2, Version=7.3.2.0, Culture=neutral, PublicKeyToken=852c9eb6525c1b53" Namespace="Telerik.WebControls" TypeName="*" Safe="True" />
      <SafeControl Assembly="RadEditor.Net2, Version=7.3.2.0, Culture=neutral, PublicKeyToken=852c9eb6525c1b53" Namespace="Telerik.RadEditorUtils" TypeName="*" Safe="True" />
      <SafeControl Assembly="RadEditor.Net2, Version=7.3.2.0, Culture=neutral, PublicKeyToken=852c9eb6525c1b53" Namespace="Telerik.RadEditorConverters" TypeName="*" Safe="True" />
      <SafeControl Assembly="RadEditor.Net2, Version=7.3.2.0, Culture=neutral, PublicKeyToken=852c9eb6525c1b53" Namespace="Telerik.RadEditorDesigners" TypeName="*" Safe="True" />
      <SafeControl Assembly="RadSpell.Net2, Version=3.2.4.0, Culture=neutral, PublicKeyToken=b5dad7bf2bf594c2" Namespace="Telerik.WebControls" TypeName="*" Safe="True" />
      <SafeControl Assembly="RadEditorSharePoint, Version=4.5.1.0, Culture=neutral, PublicKeyToken=1f131a624888eeed" Namespace="Telerik.SharePoint" TypeName="*" Safe="True" />
      <SafeControl Assembly="RadEditorSharePoint, Version=4.5.1.0, Culture=neutral, PublicKeyToken=1f131a624888eeed" Namespace="Telerik.SharePoint.FieldEditor" TypeName="*" Safe="True" />
      <SafeControl Assembly="RadEditorSharePoint, Version=4.5.1.0, Culture=neutral, PublicKeyToken=1f131a624888eeed" Namespace="Telerik.SharePoint.ListFieldEditor" TypeName="*" Safe="True" />      
      <SafeControl Assembly="RadEditor.Net2, Version=7.1.0.0, Culture=neutral, PublicKeyToken=852c9eb6525c1b53" Namespace="Telerik.WebControls" TypeName="*" Safe="True" />
</SafeControls>

<appSettings>
<add key="Telerik.WebControls.RadControlsDir" value="~/_wpresources/RadEditorSharePoint/7.1.0.0__852c9eb6525c1b53/RadControls"/>
  </appSettings>

Please advise, thanks,
Rudy 
0
Stanimir
Telerik team
answered on 14 Jan 2010, 03:23 PM
Hello Rudy,
The two versions of RadEditor.Net2 can coexist in MOSS as long as you do not use RadEditor for MOSS and the
7.1.0.0 ASP.NET RadEditor on the same page. The setup is OK, just make sure that there you do not use the two controls on the same page.

Isn't there a way to have only one RadControls folder - I suggest you do not use only one folder since the two versions of the control might be using different resources.

Sincerely yours,
Stanimir
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Rudy Yonkov
Top achievements
Rank 1
answered on 14 Jan 2010, 06:29 PM
We do currently use both controls on the same page (page layout).
Moss version of the Rad Editor is used for simple data gathering fields and the ASP.Net full version is used within some web user control that provides more specific functionality at places we need.  
We have a very complex environment with probably the biggest Moss 2007 deployment in the world, therefore having just one control or the other on a page is not an option. 
What issue or issues do you see having having both controls on the same page? As I said this setup seems to work fine.
Please advise since we are continuing our development with that idea in mind and would have to go to production soon.

Thanks,
Rudy
0
Stanimir
Telerik team
answered on 18 Jan 2010, 09:38 AM
Hi Rudy,
The reason why we do not recommend using two different version of RadEditor on the page is that the RadEditor namespace which is used in javascript is the same. So if you load two different editors (different versions) on the page, the second editor will overwrite the javascript resources of the first. Also you can find the same behavior when it comes to CSS.

I can not tell you exactly what functionality of the control which is loaded first will be broken, however you should expect some glitches in the behavior of the editor.

Regards,
Stanimir
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Rudy Yonkov
Top achievements
Rank 1
answered on 18 Jan 2010, 07:11 PM
Hi Stanimir,

The behavior you described is very problematic. As I mentioned we are running a huge Moss2007 site utilizing the control heavily and now the ASP.Net version as well within the user controls. We really must have the ability to use both controls on the same page and if these controls do have different implementations then it seems logical that they need to be in different namespaces so that they can co-exist properly. Is there anywhere that needs to be entered as a bug and are there any plans to be fixed? If not, what it would take for you to create a custom version for us of that control so that we don't have the issue? 
Please let me know if I need to get a hold of someone else in charge of that or what is the procedure?
There is a good size team of people here that will buy the licences to use the control, but this would somehow need to be addressed.
Please advise, thanks, 
Rudy

0
Stanimir
Telerik team
answered on 19 Jan 2010, 09:07 AM
Hello Rudy Yonkov,

What I can suggest you is trying the Full featured version of ASP.NET AJAX RadEditor for MOSS(Introduction). It's latest version is 5.6.2. You can download a free trial version, which has all the functionality enabled. If you decide that it meets your needs, you can purchase a license for the Telerik's ASP.NET AJAX Controls.

In order to download the latest trial version of RadEditor for MOSS you should go to the Trials section under your account, click on the Visual Studio Extensions, DLLs, Scripts, Source Code, DNN and MOSS wrappers ... link and download the RadEditor for MOSS: (zip, 13 MB) installation. You can see the attached screenshot for more information.

When you deploy the RadEditor for MOSS wsp solution the Telerik.Web.UI.dll and RadEditorSharePoint.dll will be automatically loaded in the GAC. You will be able to use only one version of the controls.

When it comes to MOSS custom solutions we recommend using MOSSRadEditor control, which is defined in the Telerik.SharePoint namespace. This control has the public constructor, which is removed in the Lite version of RadEditor for MOSS. It is designed especially for MOSS and has the necessary content provider.

In order to use the ASP.NET AJAX version of RadEditor for MOSS you need to make sure that you extend your site with ASP.NET AJAX. You can find the instructions in the following online help articles.
Extending your MOSS site with Microsoft ASP.NET AJAX 1.0 - for .NET 2.0
Extending your MOSS site with Microsoft ASP.NET AJAX 3.5 - for .NET 3.5

Since you are using the lite version of RadEditor for MOSS, you should correctly follow the online instruction when you upgrade the control. Here is the article Upgrade Instructions from version 4.x to version 5.x.


All the best,
Stanimir
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Rudy Yonkov
Top achievements
Rank 1
answered on 19 Jan 2010, 11:39 PM
Stanimir,

Thank you very much for the proposed solution. 
It looks like we will have to get the whole suite of controls, we cannot specifically buy the full Sharepoint version, could you please confirm that?
And also if I understand correctly once we buy the ASP.Net Ajax controls we will see the Sharepoint version of the control included along with all ASP.Net Ajax controls,  then later we should reference the Sharepoint version when developing  user controls that will live inside Moss. However if we do development outside of Sharepoint we could use the standard version of the Editor, which is included in the same package of controls, is this correct ?  

Thanks,
Rudy

0
Stanimir
Telerik team
answered on 20 Jan 2010, 08:46 AM
Hi Rudy Yonkov,

Yes Rudy, everything you wrote is correct.

Sincerely yours,
Stanimir
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Rudy Yonkov
Top achievements
Rank 1
answered on 11 Aug 2010, 11:19 PM
I have version 5.8.0 of the RadEditor for Moss. I have basically extracted the content of the wsp file.
So your idea/suggestion was to use that version for User Control development since it has the public constructor and this version would also need to be installed as sharepoint editor, in which case only one version would exist in Moss.
Could you help me or guide me how to reference it from the my asp.net project.
Have you tried doing that successfully? 
If you have a sample project you can zip it and email it to my email address.

Thanks,
Rudy
0
Stanimir
Telerik team
answered on 13 Aug 2010, 11:08 AM
Hello Rudy,

First you need to upgrade your version of RadEditor for MOSS. Review the following online help article: Upgrade Instructions from version 4.x to version 5.x.

This will automatically load the Telerik.Web.UI and RadEditorSharePoint dlls in the GAC. So when you are developing your user controls you will be able to use RadEditr which is defined in Telerik.Web.UI. However when it comes to SharePoint we always recommend using the MOSSRadEditor, which is defined in Telerik.SharePoint namespace of RadEditorSharePoint.dll. It has specially designed content providers for the editor's dialogs. If you rename RadEditorMOSS.wsp to RadEditorMOSS.cab and extract its content, you will find Telerik.Web.UI.dll and RadEditorSharePoint.dll. You can place them in the bin folder of your custom project and refer them from there.


Sincerely yours,
Stanimir
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Rudy Yonkov
Top achievements
Rank 1
answered on 13 Aug 2010, 06:37 PM
Ok, thank you, by the way I made some progress after I sent my message to you.

I had problems referencing directly the MOSSRadEditor, but I referenced and instatiated the RadEditor inside Telerik.Web.UI which is the base class for the MOSSRadEditor.
I guess using this editor in Asp.Net app to create a Web User Control and later deploy that to Sharepoint would work since Sharepoint has the Telerik.Web.UI dll installed.

If I tried referencing the MOSSRadEditor directly but I was getting errors due to the tight integration with Sharepoint, it looks for Sharepoint configuration and dll files.

[FileNotFoundException: Could not load file or assembly 'Microsoft.SharePoint.Library, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.]
   Telerik.SharePoint.MOSSRadEditor.SetWebSpecificConfiguration(String path) +0
   Telerik.SharePoint.MOSSRadEditor.SetConfigFile() +111
   Telerik.SharePoint.MOSSRadEditor.OnLoad(EventArgs e) +43
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627 

Is there a way for me to trick that Asp.Net project and get the MossRadEditor working or I should simply use the Telerik.Web.UI.RadEditor object as I am doing now?

Do you see any issues with that current approach, keeping in mind that that object is embedded inside a web user control which gets put in a page layout in sharepoint?

What more does the MossRadEditor do compared to its parent object RadEditor?

Thanks,
Rudy
0
Stanimir
Telerik team
answered on 17 Aug 2010, 11:07 AM
Hi Rudy,

There should be no problem for loading the ASP.NET AJAX RadEditor in MOSS, how ever it does not have the specially designed content provider and you will not be able to use the SharePoint's libraries integration in dialogs such as ImageManger, DocumentManager etc.


If I tried referencing the MOSSRadEditor directly but I was getting errors due to the tight integration with Sharepoint, it looks for Sharepoint configuration and dll files. - You can try to find the required dlls and refer them in your project.

Best wishes,
Stanimir
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Rudy Yonkov
Top achievements
Rank 1
answered on 17 Aug 2010, 11:16 PM
Hi Stanimir,

Using ASP.NET AJAX RadEditor in MOSS deos work, however it has the issues you pointed out, plus the fact that it reads its configuration from a different place and we wanted this control and the MossRadEditor to use one configuration. It seems like we are going back to the original issue.

Getting the MOSSRadEditor inside our Asp.Net project where it gets embedded in a web user control and later deployed to sharepoint seems the best solution.
Therefore I followed your suggestion and referenced all the sharepoint libraries, copyed the directory with the editor configuration files. However It seems that the editor can be rendered only within the actual sharepoint environment.  Please see the exception below.
The good news is that even if the ASP.Net project fails to run, the web user control (when later deployed) works fine in sharepoint since the editor feels "at home".

So this means that to develop we need to change our ASP.Net app between using the ASP.NET AJAX RadEditor control (to have it working in development mode) and MOSSRadEditor control (for sharepoint deployment). This makes the development painful and slow as you can imagine.
If you have any better solution please let us know, since this is problematic on this huge MOSS setup and we have a lot of web user controls.

Thanks,
Rudy

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   Microsoft.SharePoint.Utilities.SPUtility.AlternateServerUrlFromHttpRequestUrl(Uri url) +34
   Microsoft.SharePoint.Administration.SPAlternateUrl.get_ContextUri() +174
   Microsoft.SharePoint.WebControls.SPControl.SPWebEnsureSPControl(HttpContext context) +280
   Microsoft.SharePoint.WebControls.SPControl.GetContextWeb(HttpContext context) +31
   Microsoft.SharePoint.SPContext.get_Current() +132
   Telerik.SharePoint.MOSSRadEditor.SetContentPaths() +118
   Telerik.SharePoint.MOSSRadEditor.ControlPreRender() +58
   Telerik.Web.UI.RadWebControl.OnPreRender(EventArgs e) +47
   System.Web.UI.Control.PreRenderRecursiveInternal() +80
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842


0
Stanimir
Telerik team
answered on 19 Aug 2010, 11:51 AM
Hello Rudy,

So this means that to develop we need to change our ASP.Net app between using the ASP.NET AJAX RadEditor control (to have it working in development mode) and MOSSRadEditor control (for sharepoint deployment). This makes the development painful and slow as you can imagine. - I understand the inconvenience of such development. However I will note you again If you want to develop user controls for SharePoint, MOSSRadEditor is the best choice.

If you have any better solution please let us know, since this is problematic on this huge MOSS setup and we have a lot of web user controls. - I have the following suggestion, however it is just an idea. If you want your control to work outside SharePoint you can create separate user control, which loads either RadEditor or MOSSRadEditor depending on if the environment is SharePoint.



Greetings,
Stanimir
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Rudy Yonkov
Top achievements
Rank 1
answered on 19 Aug 2010, 07:27 PM
I understand the inconvenience of such development. However I will note you again If you want to develop user controls for SharePointMOSSRadEditor is the best choice. 

That is exactly what the problem is, we want to use the MOSSRadEditor, but it cannot really be used within an ASP.Net application, the app compiles, but it won't run, due to the described issues. This app is used to develop web user controls that are later placed in MOSS.

I have the following suggestion, however it is just an idea. If you want your control to work outside SharePoint you can create separate user control, which loads either RadEditor or MOSSRadEditor depending on if the environment is SharePoint.

I have a suggestion as well. How about you expose a property called let's say "MOSSConnected" that would be defaulted to True, but it could be changed to False. If true you can call the sharepoint specific methods in the OnPreRender event as it happens now, if it is false just don't do it. This way people would be able to use and run that control in development (setting the property to false) and in production by changing the property to true or just not specifying the property (since it is defaulted to true). 
If you could implement that how long it would take before we see it in a release ? 


0
Stanimir
Telerik team
answered on 20 Aug 2010, 08:09 AM
Hi Rudy,

We will keep your suggestion about the "MOSSConnected" property in mind. In mean time you can try implementing separate custom user control, which loads the correct editor depending on the environment.

If you open an official support ticket and you have the correct license information I can provide you with the source code of RadEditor for MOSS. You will be able to create a custom version of the control, which will fit your scenario.


Kind regards,
Stanimir
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
WebParts for SharePoint
Asked by
Rudy Yonkov
Top achievements
Rank 1
Answers by
Stanimir
Telerik team
Rudy Yonkov
Top achievements
Rank 1
Share this question
or