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

[Solved] Access Denied error with RadEditor Ajax

7 Answers 477 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Andrew Bryan
Top achievements
Rank 1
Andrew Bryan asked on 12 May 2008, 03:52 AM

I am getting an "access denied" error when using the RadEditor for Ajax when using the Link Manager and the Table Wizard.  Initially I got this with the Image manager but have since resolved the issue by setting the folder paths.  However, I remain stumped with the other problems.

My XML definition for the editor is (no code script written):

<rad:radeditor runat="server" ID="RadEditor2" Width="550px" Height="390px" Skin="Web20" ToolsFile="~/App_Data/EditorTools.xml" BackColor="White">

<ImageManager ViewPaths="~/Users/TBA/Images" DeletePaths="~/Users/TBA/Images" UploadPaths="~/Users/TBA/Images" />

<DocumentManager  ViewPaths="~/Users/TBA/" />

<content>

<

h1>This is the editor</h1></content>

</rad:radeditor>

My web.config looks like:

<

system.webServer>

<

handlers>

...

<add name="Telerik.Web.UI.SpellCheckHandler.axd_*" path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode,runtimeVersionv2.0"/>

<

add name="Telerik.Web.UI.DialogHandler.aspx_*" path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode,runtimeVersionv2.0"/>

<

add name="Telerik.RadUploadProgressHandler.ashx_*" path="Telerik.RadUploadProgressHandler.ashx" verb="*" type="Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI" preCondition="integratedMode,runtimeVersionv2.0"/>

<

add name="Telerik.Web.UI.WebResource.axd_*" path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" preCondition="integratedMode,runtimeVersionv2.0"/>

</

handlers>
</
system.webServer>

<

system.web>
<

httpHandlers>

...


<
add path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Version=2008.1.415.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false" />

<

add path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Version=2008.1.415.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false" />
</
httpHandlers>
</system.web>

Thanks...

Andrew

7 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 15 May 2008, 02:06 PM
Hi Andrew,

Thank you for the provided information, but unfortunately it is not sufficient for me to determine what the exact reason for the problem is. Could you please send me the complete error details?

Looking forward to hearing from you, George
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Cliff Chavis
Top achievements
Rank 1
answered on 07 Dec 2008, 04:14 AM
Having the same issue and wondering if there was ever a solution found?
0
Chris
Top achievements
Rank 1
answered on 08 Dec 2008, 01:48 AM
I too am having this problem. But only under certain conditions that I can't seem to replicate. In my case, the radEditor is within a usercontrol that is dynamically loaded on a page (which has a master page and the script manager on that). When I add a table in the editor, then right click and select 'Set Cell Properties', I get the javascript error in IE's status bar and no window opens up. It actually doesn't work in the Safari browser either and instead it will show a pop-up window with the message: http://localhost ...Please, select a cell to set its properties!. However, it works perfectly in FireFox (3.x) and Google's Chrome browser.

Hope you get an answer, as it will help me too!

Chris
0
Lini
Telerik team
answered on 08 Dec 2008, 09:20 AM
Hi guys,

I guess that Andrew managed to solve the problem on his own, since he did not send any more details to us. Cliff, if possible give us a screenshot of the error and some information about your configuration - which version of the editor do you have, what platform (2.0 or 3.5), what browser are you using, do all the dialogs throw the same exception?

Chris, do you load the editor with Ajax or a normal postback request? Your issue seems to be different because it happens in the editor itself and not in the dialogs.

Greetings,
Lini
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Cliff Chavis
Top achievements
Rank 1
answered on 08 Dec 2008, 01:16 PM
Below is my web.config (minus connection settings).  Our client won't allow any "installs" on the server so I placed the system.web.extensions.dll file in the local Bin directory and removed the PublicKeyToken to force it to read from the Bin directory.  The version of the system.web.extensions is 1.0.61025.0 and I'm using the Telerik.Web.UI.dll version 2008.02.0723.20.  I'm not sure if it matterrs or not, but I'm also using a radToolbar.xml file to control the toolbars and add a custom button.  I will also post the page hosting the control and the radToolbar.xml file.


web.config
--------------------------------------------------------------------------------------

<

configuration>

 

<

configSections>

 

<

sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral">

 

<

sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral">

 

<

section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral" requirePermission="false" allowDefinition="MachineToApplication"/>

 

<

sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral">

 

<

section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral" requirePermission="false" allowDefinition="Everywhere"/>

 

<

section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral" requirePermission="false" allowDefinition="MachineToApplication"/>

 

<

section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral" requirePermission="false" allowDefinition="MachineToApplication"/>

 

</

sectionGroup>

 

</

sectionGroup>

 

</

sectionGroup>

 

</

configSections>

 

<

appSettings/>

 

<

connectionStrings>

 

</

connectionStrings>

 

<

system.web>

 

<

httpHandlers>

 

<

remove path="*.asmx" verb="*"/>

 

<

add path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral" validate="false"/>

 

<

add path="*_AppService.axd" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral" validate="false"/>

 

<

add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral" validate="false"/>

 

<

add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2008.2.723.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false"/>

 

<

add path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Version=2008.2.723.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false"/>

 

<

add path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Version=2008.2.723.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false"/>

 

</

httpHandlers>

 

<

httpModules>

 

<

add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral"/>

 

</

httpModules>

 

<

httpRuntime executionTimeout="3600" maxRequestLength="102400"/>

 

<!--

 

Set compilation debug="true" to insert debugging

symbols into the compiled page. Because this

affects performance, set this value to true only

during development.

Visual Basic options:

Set strict="true" to disallow all data type conversions

where data loss can occur.

Set explicit="true" to force declaration of all variables.

 

-->

 

<

compilation>

 

<

assemblies>

 

<

add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral" />

 

<

add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

 

<

add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

 

<

add assembly="System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

 

<

add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

 

<

add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

 

<

add assembly="System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

 

<

add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

 

<

add assembly="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

 

<

add assembly="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

 

<

add assembly="System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

 

<

add assembly="System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

 

<

add assembly="System.DirectoryServices.Protocols, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

 

<

add assembly="System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

 

<

add assembly="System.ServiceProcess, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

 

<

add assembly="System.Web.RegularExpressions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

 

</

assemblies>

 

</

compilation>

 

<

pages theme="Main">

 

<

namespaces>

 

<

clear/>

 

<

add namespace="System"/>

 

<

add namespace="System.Collections"/>

 

<

add namespace="System.Collections.Specialized"/>

 

<

add namespace="System.Configuration"/>

 

<

add namespace="System.Text"/>

 

<

add namespace="System.Text.RegularExpressions"/>

 

<

add namespace="System.Web"/>

 

<

add namespace="System.Web.Caching"/>

 

<

add namespace="System.Web.SessionState"/>

 

<

add namespace="System.Web.Security"/>

 

<

add namespace="System.Web.Profile"/>

 

<

add namespace="System.Web.UI"/>

 

<

add namespace="System.Web.UI.WebControls"/>

 

<

add namespace="System.Web.UI.WebControls.WebParts"/>

 

<

add namespace="System.Web.UI.HtmlControls"/>

 

</

namespaces>

 

<

controls>

 

<

add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral"/>

 

</

controls>

 

</

pages>

 

<!--

The <authentication> section enables configuration

of the security authentication mode used by

ASP.NET to identify an incoming user.

 

-->

 

<

authentication mode="Windows"/>

 

<!--

The <customErrors> section enables configuration

of what to do if/when an unhandled error occurs

during the execution of a request. Specifically,

it enables developers to configure html error pages

to be displayed in place of a error stack trace.

 

-->

 

<

customErrors mode="Off" defaultRedirect="GenericErrorPage.htm">

 

<

error statusCode="403" redirect="NoAccess.htm"/>

 

<

error statusCode="404" redirect="FileNotFound.htm"/>

 

</

customErrors>

 

</

system.web>

 

<

system.webServer>

 

<

validation validateIntegratedModeConfiguration="false"/>

 

<

modules>

 

<

add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral"/>

 

</

modules>

 

<

handlers>

 

<

remove name="WebServiceHandlerFactory-Integrated"/>

 

<

add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral"/>

 

<

add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral"/>

 

<

add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral"/>

 

</

handlers>

 

</

system.webServer>

 

</

configuration>


context.aspx page (contains the editor)
---------------------------------------------------------------------------------

 

 

 

 

<%

@ Page Language="VB" AutoEventWireup="false" CodeFile="content.aspx.vb" Inherits="content" %>

 

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

 

 

 

<!

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<

html xmlns="http://www.w3.org/1999/xhtml">

 

<

head runat="server">

 

 

 

 

 

<title>Content</title>

 

 

 

 

 

<link href="C:\development\amcipt\general_planNEW\admin\RadControls\Editor\Skins\WebBlue\Editor.css"

 

 

 

 

 

rel="stylesheet" type="text/css" />

 

 

 

 

 

<link href="C:\development\amcipt\general_planNEW\admin\RadControls\Editor\Skins\WebBlue\Editor.css"

 

 

 

 

 

rel="stylesheet" type="text/css" />

 

</

head>

 

<

body>

 

 

 

 

 

<form id="form1" runat="server">

 

 

 

 

 

<telerik:RadScriptManager ID="RadScriptManager1" runat="server" OutputCompression="AutoDetect">

 

 

 

 

 

</telerik:RadScriptManager>

 

 

 

 

 

<asp:Label ID="lbl_Section" runat="server" Font-Bold="True" Font-Names="Arial" Font-Size="14pt"></asp:Label>

 

 

 

 

 

 

<telerik:RadEditor ID="RadEditor1" runat="server" Height="650px" Width="100%" Skin="WebBlue" ToolsFile="radToolbar.xml">

 

 

 

 

 

<documentmanager uploadpaths="/AFSPC_general_plan/elements/docs/" viewpaths="/AFSPC_general_plan/elements/docs/"

 

 

 

 

 

deletepaths="/AFSPC_general_plan/elements/docs/" maxuploadfilesize="5000000"

 

 

 

 

 

searchpatterns="*.*" />

 

 

 

 

 

 

<imagemanager deletepaths="/AFSPC_general_plan/elements/picture/" maxuploadfilesize="5000000"

 

 

 

 

 

searchpatterns="*.gif,*.xbm,*.xpm,*.png,*.ief,*.jpg,*.jpe,*.jpeg,*.tiff,*.tif,*.rgb,*.g3f,*.xwd,*.pict,*.ppm,*.pgm,*.pbm,*.pnm,*.bmp,*.ras,*.pcd,*.cgm,*.mil,*.cal,*.fif,*.dsf,*.cmx,*.wi,*.dwg,*.dxf,*.svf"

 

 

 

 

 

uploadpaths="/AFSPC_general_plan/elements/picture/" viewpaths="/AFSPC_general_plan/elements/picture/">

 

 

 

 

 

</imagemanager>

 

 

 

 

 

<Content>

 

</

Content>

 

 

 

 

 

</telerik:RadEditor>

 

 

 

 

 

<asp:Button ID="btnSubmit" runat="server" Text="Submit" />

 

 

 

 

 

 

<script type="text/javascript">

 

 

 

 

Telerik.Web.UI.Editor.CommandList[

"customTable"] = function(commandName, editor, args)

 

{

 

var myCallbackFunction = function(sender, args)

 

{

 

//editor.pasteHtml(String.format("[[{0}.{1}]]", args.text, args.href))

 

 

 

 

editor.pasteHtml(String.format(

'[[Report_{0}]]', args.href))

 

}

 

//var val = "<span style='margin:3px;padding:3px;border:1px solid blue;font:normal 11px Tahoma;background-color:#ddddee;'>" + args.value + "</span>";

 

 

 

 

 

//editor.pasteHtml (val);

 

 

 

 

editor.showDialog(

"customTable", {}, myCallbackFunction);

 

};

 

 

</script>

 

 

 

 

 

</form>

 

</

body>

 

</

html>

 

 



Screen Shot
----------------------------------------------------------------------------------
http://dev.busrefined.com/error.jpg



S O L U T I O N     A N D     P R O B L E M
-------------------------------------------------------------------------------
OK... Going through this process I noticed something and figured out my problem.  This was not originally my project and I got the change order.  The original code used a previous version of the editor and other possible pages still use the older editor for now.  That being said we still have the "RadControls" directory used for the older control.  Here's the part I missed until now.

If you notice, the previous developer had hard coded the path on his machine and not a relative path for the RadControls editor CSS files.  Since I don't need any of the CSS files included when using the new control (and would use Themes anyway), I overlooked this (I hate rushed projects!!!!).  I removed the 2 lines that contain the link references and everything seems to work now.  A good note here in my opion is that AJAX can give unreliable results where there are other errors on the page.  I also had the FRAMESET problem (in another post here) that was due to "FRAMEBORDER='yes'" vs. "FRAMEBORDER='1'".  That caused the control to not work properly in the FRAMESET.

Since I JUST found the problem, I haven't tested anything but the LINK button.  I am assuming everything else still works and guessing that my problems are over for this part.  I will post if that turns out to not be the case.

I hope this will help someone else.  If you're having similar problems, look elsewhere on the page for errors.

0
Lini
Telerik team
answered on 08 Dec 2008, 02:47 PM
Hi Cliff,

The only abnormal thing I see are the links to the CSS files in the head of the ASPX page you sent:

    <link href="C:\development\amcipt\general_planNEW\admin\RadControls\Editor\Skins\WebBlue\Editor.css"
        rel="stylesheet" type="text/css" />
    <link href="C:\development\amcipt\general_planNEW\admin\RadControls\Editor\Skins\WebBlue\Editor.css"
        rel="stylesheet" type="text/css" />

It seems these are left over from the previous version of the RadEditor. The current RadEditor has all its skin files (CSS and images) built into the assembly and you do not need a RadControls folder. Furthermore, the links have absolute paths (C:\) which might be the cause for the problem. Remove the links to those CSS files and see if that helps remove the "Access is denied" error.

Greetings,
Lini
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Arshad Mohamed
Top achievements
Rank 1
answered on 27 Nov 2009, 01:32 AM
Hi,
  I got this same error. Steps are, I deployed radeditormoss.wsp (version 5_3_....) on a fresh site and it did some changes to web.config. I tried accessing the RADEditor, and the resroucescript.axd accessed denied error came up.

  Resolution.

       I had a web.config with configurations for Telerik, and I replaced the current web app confifg with the web.config. It all works fine since.

     Hope it will help someone.

Thanks
Arshad
Tags
Editor
Asked by
Andrew Bryan
Top achievements
Rank 1
Answers by
George
Telerik team
Cliff Chavis
Top achievements
Rank 1
Chris
Top achievements
Rank 1
Lini
Telerik team
Arshad Mohamed
Top achievements
Rank 1
Share this question
or