This question is locked. New answers and comments are not allowed.
Hello, I installed r.a.d Editor for Sharepoint and it works fine on the sharepoint pages when I try to insert as a web part in a web part zone. When I try to use the same web part (RadEditor.dll) in another custom web part to generate the r.a.d. Editor programatically, I am getting security execption when it comes to create the object of RadEditor. Here is the sample snipped of code.
Additional related information: I haved installed the r.a.d Editor for sharepoint into GAC, and local bin folder (c:\inetpub\wwwroot\bin to and added this radEditor.dll and radSpell.dll to the web part project as references so that I can call these objects in the web part code)
Thanks,
Harish V.
t = New Table
r = New TableRow
c = New TableCell
radEdit = New Telerik.WebControls.RadEditor
radEdit.ConfigFile = "~/wpresources/RadWebParts/RadControls/Editor/ConfigFile.xml"
radEdit.ID = "testeditor1"
c.Controls.Add(radEdit)
r.Cells.Add(c)
t.Rows.Add(r)
Controls.Add(t)
Error that I am getting is:
| The type initializer for "Telerik.RadEditorUtils.RadControl" threw an exception. RadEditor at Telerik.RadEditorUtils.RadControl.get_Version() at Telerik.RadEditorUtils.RadControl.get_ScriptsUrl() at Telerik.RadEditorUtils.RadControl.CheckIfScriptsFolderExists() at Telerik.RadEditorUtils.RadControl.CheckWorkingConditions(WorkingConditionFlags workingConditionFlags, String& errorMessage) at Telerik.RadEditorUtils.RadControl.CheckWorkingConditions(String& errorMessage) at Telerik.WebControls.RadEditor.Render(HtmlTextWriter output) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at CSRStudySessionWebParts.EditPost.RenderWebPart(HtmlTextWriter output) in D:\CSRAED\CSRStudySessionWebParts\EditPost.vb:line 269 |
Additional related information: I haved installed the r.a.d Editor for sharepoint into GAC, and local bin folder (c:\inetpub\wwwroot\bin to and added this radEditor.dll and radSpell.dll to the web part project as references so that I can call these objects in the web part code)
Thanks,
Harish V.