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

Access denied to Telerik.Web.UI.WebResource.axd

9 Answers 1037 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Nikolaj Kaplan
Top achievements
Rank 1
Nikolaj Kaplan asked on 13 Aug 2009, 04:28 PM
Hi!

We have a site using a lot of rad controls. The site runs as a Sharepoint application page on a MOSS server.
When we access the site we can see that the following URL is requested and gets a 403 Forbidden:
http://domainname/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=uiRadScriptManager_HiddenField&compress=0&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a8ac4a3ed-a467-4f19-a8ed-9270f6e4c6d6%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2009.2.701.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a7e598a31-3beb-49a1-914c-5f530240f0ea%3a16e4e7cd%3af7645509%3a24ee1bba%3a1e771326%3aaa288e2d%3ae524c98b

When I try to load the above URL in a browser I get the following message:

<html>
    <head>
        <title>This type of page is not served.</title>
    </head>

    <body bgcolor="white">

            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>

            <h2> <i>This type of page is not served.</i> </h2></span>

            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

            <b> Description: </b>The type of page you have requested is not served because it has been explicitly forbidden. &nbsp;The extension '.axd' may be incorrect. &nbsp;&nbsp;Please review the URL below and make sure that it is spelled correctly.
            <br><br>

            <b> Requested URL: </b>/Telerik.Web.UI.WebResource.axd<br><br>

            <hr width=100% size=1 color=silver>

            <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053

            </font>

    </body>
</html>
<!--
[UnauthorizedAccessException]: Access to the path 'D:\Inetpub\virtualservers\fasttest\bin\Telerik.Web.UI.DLL' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.GetLastWriteTimeUtc(String path)
   at Telerik.Web.UI.CombinedScriptWriter.ScriptAssemblyInfo.get_ModifiedTime()
   at Telerik.Web.UI.CombinedScriptWriter.GetLastAssemblyModificationTime()
   at Telerik.Web.UI.CombinedScriptWriter.WriteCombinedScriptFile()
   at Telerik.Web.UI.WebResource.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
--><!--


We tried to give Everyone read access to the bin folder containing the telerik dll. This did not solve the problem.
We tried to give Everyone read access to the root of the web application. This solved the problem. (But not the best solution).

When the site is accessed by a user who is a member of the administrator group of the web server the problem disappears as well.

The rest of the site looks fine. The other dll's executes fine. The page looks fine. You notice the error as soon as the telerik controls needs their javascript.

Any ideas?

/Nikolaj

9 Answers, 1 is accepted

Sort by
0
Paul
Telerik team
answered on 20 Aug 2009, 08:27 AM
Hello Nikolaj Kaplan,

Please refer to this help article for details on the matter.

Greetings,
Paul
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Sean
Top achievements
Rank 1
answered on 11 Oct 2018, 05:52 PM

Hello,

I followed the link provided and i also followed post below:

https://www.telerik.com/forums/javascript-permission-denied-error-in-telerik-web-ui-webresource-axd-file 

I cannot seem to resolve the Permission Denied problem.

SCRIPT70: Permission denied

Telerik.Web.UI.WebResource.axd(11747,39)

happen usually while im working with radeditor (it have been customized). One of the solutions that is preventing that from happening is putting try catch around "Telerik.Web.UI.LayoutBuilderEngine.prototype.set_selectedCell"

Cannot seem to solve this problem. Appreciate any help.

 

Thank you,

Sean

0
Marin Bratanov
Telerik team
answered on 11 Oct 2018, 09:34 PM
Hi Sean,

If you are getting a network error on the request itself, the following section of the docs should help: https://docs.telerik.com/devtools/aspnet-ajax/general-information/troubleshooting/web-resources-troubleshooting#unauthorized-access-401-error.

If you are getting a JS error, how should we reproduce it in order to investigate? If this happens only in IE, it is likely that the Compatibility Mode is causing a problem: https://www.telerik.com/support/kb/aspnet-ajax/details/problem-in-ie-works-fine-in-other-browsers. Also, does upgrading to the latest version help? Another approach to this is to see what the error itself states. Since the editor is based on an <iframe> for editing, some browser settings or CSP policies may break that and cause errors so you can try setting ContentAreaMode to Div to see if avoiding the iframe will help. Last, but not least, does removing the customizations you have on top of the control help?

If you are gettign an error in the Telerik.Web.UI.LayoutBuilderEngine.prototype.set_selectedCell, I'd suggest that you download our source code and debug that error. I just took a peek at this method and it does not do anything complex or requiring permissions, so an error is not expected in it at all, much less a permission error.

That's quite a lot of information and questions and if you are still unable to resolve this, I recommend that you open a support ticket and send us a simple an MCVE (https://stackoverflow.com/help/mcve) we can debug.


Regards,
Marin Bratanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Sean
Top achievements
Rank 1
answered on 12 Oct 2018, 04:23 PM

Hello,

I tried authorization all users bit in web config that didn't resolve it. IE compatibility mode is turned off and i tested in with latest telerik upgrade and i am still having a problem. 

in JS if i do window.onerror = function(msg, url, lineNo, colNo,error){
     if (msg === "Permission denied"){

           radalert("Permission denied error happened");

    }

that radalert pops up. 

"How should we reproduce it"? i am not entirely sure. For me i have file structure type tree on left in which i click and i open it in RadEditor which have grid/table defined in it and i get permission denied error. Application doesn't throw any exception or breaks at any point it just freezes. I will try to get demo up and replicate it and submit. If any information/behavior i am describing provides some help or might suggest some other solution, i'll appreciate it.

 

Thank you,

Sean

0
Marin Bratanov
Telerik team
answered on 14 Oct 2018, 06:07 PM
Hello Sean,

This seems like a different issue that the original one in the thread, as the original one pertained to network configuration, while this seems to be a JS error, so there doesn't seem to be a networking issue. The error actually seems similar to the following bug: https://feedback.telerik.com/Project/108/Feedback/Details/227626-radeditor-within-updatepanel-td-tag-context-menu-throws-permission-denied. Could you take a look at the test case in the page and confirm for me whether this is your case as well? If this is your case, perhaps you can avoid placing the editor in an update panel, instead you could use its client API (set_html(newContentString)) to set the new content. If it needs to come from the server, perhaps a web service can be used to fetch it.


Regards,
Marin Bratanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Sean
Top achievements
Rank 1
answered on 24 Oct 2018, 08:30 PM

Hello Marin,

I did some more research and stuff. It does seem like it is more closely related to link you sent but there is problem how i get to it. 

In my case i get either WebResource.axd (11758,39) or (11747,39)

however in link you sent i always get WebResource.axd(4145,39) and it does not have to be in update panel and in that case i get (8367,39).

In my case there is a main div then left div and right div. left div and RadXmlHttpPanel with panel and place holder within which is for radtreeview. Right div have panel and radpanelbar within which have radeditor. Multiple TreeViews are added dynamically and depending on the node being edited (there is context menu on each node which is dynamically added also) either radeditor is added or  something else to radpanelbar. When i remove or add a node to treeview everything seems fine until i open node (new or existing) in editor to edit by clicking context menu option in treeview then i get permission denied. If i do not change treeview and just edit stuff in editor of each node nothing happens. Moreover, i can still click and right in treeview but options selected from context menu of tree view nodes do not do anything. 

I created a test project with treeview and editor (not dynamic) but it updates data of editor on selection of treeview node and i do not get that problem until i put table then i get similar error as the link and that is still when i right click in cell.

Any idea what might be happening?Are there known problems with dynamically creating tree view, context menu and nodes? I am assuming something in that chain is causing JS to crash causing it to look like "Permission denied" because JS already crashed however i am not sure. 

Moreover, can you please direct me to an example where i can use web service to fetch data from server and use set_html(string). I tried onButtonClick on server side, gathered info and used ScriptManager.RegisterStartupScript or RegisterClientScriptBlock but it cannot find the rad editor control by saying $find("<%= RadEditor.ClientID %>");

I appreciate your help and time.

 

Thank you,

Sean

0
Marin Bratanov
Telerik team
answered on 25 Oct 2018, 12:29 PM
Hi Sean,

The line and symbol number are not always indicative of the issue origin because they can change depending on the page configuration, used controls and even from one request to the next. This is why the repro steps, stack trace and exact error message are important. Being able to reproduce and investigate it is the only way I can offer a concrete answer and avoid guessing, and this is why I suggested that you open a ticket and send us a sample in which we can do that. In the meantime, you can follow this article to see where exactly the errors originate: https://www.telerik.com/support/kb/aspnet-ajax/details/unhandled-exception-in-telerik.web.ui.webresource.

On known issues and using RadXmlHttpPanel - I advise that you review the following articles, because adding any IScriptControl implementation (such as our controls) in a RadxmlHttpPanel response is a hack that an cause a variety of issues, including duplicating scripts which can, in turn, cause unpredictable behavior. Links:

You must not add controls during a callback because it does not let the page go through its entire lifecycle, it does not update the ViewState and control tree and so subsequent postbacks will cause problems. If you want to load control upon conditions, you must use partial page rendering (update panels, for example) and not callbacks. Also, RadTreeView offers load on demand where you add nodes dynamically and this does not require extra code: https://demos.telerik.com/aspnet-ajax/treeview/examples/programming/loadondemandmodes/defaultcs.aspx.

On getting content in the editor through a service - this must happen entirely on the client. If you will be doing a postbackl, you might just as well set the server-side Content property of the editor since you have the HTML string on the server. This is not specific to the editor, you simply need to call the service (e.g., with jQuery), and in the success callback to use the set_html() method of the editor.
Nevertheless, on registering scripts - make sure to use the Sys.Application.Load event (see here and here).


Regards,
Marin Bratanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Sean
Top achievements
Rank 1
answered on 26 Oct 2018, 07:18 PM

Hello Marin, 

Thank you for bearing with me. Thanks to your help i was able to pinpoint problem using "EnableCdn="true" CdnSettings-TelerikCdn="Enabled" ". Seems like problem is exactly as defined at link you gave me without it being in "UpdatePanel" : https://feedback.telerik.com/Project/108/Feedback/Details/227626-radeditor-within-updatepanel-td-tag-context-menu-throws-permission-denied 

I am attaching errors as seen and my test files' content is as follow:

.aspx file

<%@ Page Language="C#" AutoEventWireup="false" CodeBehind="RadEditorTesting.aspx.cs" Inherits="TestingProject.TestingFolder.RadEditorTesting" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<!DOCTYPE html>
 
    <head runat="server">
        <title>RAD EDITOR TEST</title>
        <style type="text/css">
            .HorizontalAlign{
                width:40%;
                display: inline-block;
            }
         
        </style>
    </head>
    <body>
         <form id="RadEditorTestForm" runat="server">
         
            <telerik:RadScriptBlock ID="TestingPageScripBlock" runat="server">
                <script type="text/javascript">
 
                    function onClientContextMenuShowing(sender, args) {
                     
                    }
                 
                    function setText(textToSet) {
                        var editor = $find("<%= SomeAttachedRadEditor.ClientID %>");
                        editor.set_html(editor.get_html() + textToSet);
                    }
 
                    window.onerror = function (msg, url, lineNo, columnNo, error) {
                        radalert(msg, 300, 300, "Title", null, null);
 
                        return false;
                    }
                </script>
            </telerik:RadScriptBlock>
 
            <telerik:RadScriptManager ID="RadEditorTestScriptManager" runat="server" EnableCdn="true"
                CdnSettings-TelerikCdn="Enabled">
                <Groups>
                    <telerik:ScriptReferenceGroup>
                        <Scripts>
                            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
                        </Scripts>
                    </telerik:ScriptReferenceGroup>
                </Groups>
            </telerik:RadScriptManager>
 
            <asp:Panel ID="RadEditorTestMainPanel" runat="server">
                <div>
                    <div class="HorizontalAlign">
                        <telerik:RadTreeView ID="treeView" runat="server"
                            OnContextMenuItemClick="treeView_ContextMenuItemClick"
                            OnClientContextMenuShowing="onClientContextMenuShowing"
                            OnNodeEdit="treeView_NodeEdit">
                            <ContextMenus>
                                <telerik:RadTreeViewContextMenu ID="ContextMenu" runat="server" >
                                    <Items>
                                        <telerik:RadMenuItem Text="LOOK" />
                                        <telerik:RadMenuItem IsSeparator="true" />
                                        <telerik:RadMenuItem Text="look after separator" />
                                    </Items>
                                </telerik:RadTreeViewContextMenu>
                                <telerik:RadTreeViewContextMenu ID="ChildContextMenu" runat="server">
                                    <Items>
                                        <telerik:RadMenuItem Text="Put Stuff In Editor"
                                            Value="putStuffInEditor" />
                                        <telerik:RadMenuItem Text="Add Node In This Tree"
                                            Value="addNodeInThisTree" />
                                        <telerik:RadMenuItem Text="Add Node In This Sub-Tree"
                                            Value="addNodeInThisSubTree" />
                                    </Items>
                                </telerik:RadTreeViewContextMenu>
                            </ContextMenus>
                            <Nodes>
                                <telerik:RadTreeNode Text="TreeNodeItem0" Expanded="true" ContextMenuID="ContextMenu">
                                    <Nodes>
                                        <telerik:RadTreeNode Text="SubNode0" ContextMenuID="ChildContextMenu" />
                                        <telerik:RadTreeNode Text="SubNode1" ContextMenuID="ChildContextMenu"/>
                                    </Nodes>
                                </telerik:RadTreeNode>
                                <telerik:RadTreeNode Text="Node1">
                                    <Nodes>
                                        <telerik:RadTreeNode Text="SubNode0" ContextMenuID="ChildContextMenu"/>
                                        <telerik:RadTreeNode Text="SubNode1" ContextMenuID="ChildContextMenu"/>
                                    </Nodes>
                                </telerik:RadTreeNode>
                            </Nodes>
                        </telerik:RadTreeView>
                    </div>
                    <div class="HorizontalAlign">
                        <telerik:RadEditor ID="SomeAttachedRadEditor" runat="server" CssClass="HorizontalAlign" >
 
                        </telerik:RadEditor>
                    </div>
                </div>
             
 
                <asp:Panel ID="ButtonPanel" runat="server" HorizontalAlign="Center" Height="20%">
                    <telerik:RadButton ID="InsertTextinRadEditor" runat="server" Text="Insert Text in Rad Editor"
                        OnClick="InsertTextinRadEditor_Click"/>
                </asp:Panel>
             
            </asp:Panel>
 
            <telerik:RadWindowManager ID="RadEditorTestWinManager" runat="server">
 
            </telerik:RadWindowManager>
 
            <telerik:RadAjaxLoadingPanel ID="RadEditorTestLoadingPanel" runat="server" />
         
            <telerik:RadAjaxManager ID="RadEditorTestAjaxManager" runat="server"
                OnAjaxRequest="RadEditorTestAjaxManager_AjaxRequest">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="InsertTextinRadEditor">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadEditorTestMainPanel"
                            LoadingPanelID="RadEditorTestLoadingPanel" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
 
                <telerik:AjaxSetting AjaxControlID="ChildContextMenu">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadEditorTestMainPanel"
                            LoadingPanelID="RadEditorTestLoadingPanel" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
 
            </AjaxSettings>
        </telerik:RadAjaxManager>
        </form>
    </body>
</html>

.aspx.cs file

using System;
using Telerik.Web.UI;
 
namespace TestingProject.TestingFolder
{
    public partial class RadEditorTesting : System.Web.UI.Page
    {
        protected override void OnLoad(EventArgs e)
        {
 
        }
 
        protected void RadEditorTestAjaxManager_AjaxRequest(object sender, AjaxRequestEventArgs e)
        {
 
        }
 
        protected void InsertTextinRadEditor_Click(object sender, EventArgs e)
        {
            string addedText = " updated";
            //ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "AddContent",
            //  "setText('" + addedText + "');", true);
            SomeAttachedRadEditor.Content += addedText;
        }
 
        protected void treeView_ContextMenuItemClick(object sender, RadTreeViewContextMenuEventArgs e)
        {
            RadTreeNode clickedNode = e.Node;
 
            switch (e.MenuItem.Value)
            {
                case "putStuffInEditor":
                    SomeAttachedRadEditor.Content += " put stuff in editor";
                    break;
                case "addNodeInThisTree":
                    int numberOfCurrentNodes = clickedNode.TreeView.Nodes.Count;
                    string text = "Newly Added Node " + numberOfCurrentNodes;
                    string value = "NewlyAddedNode" + numberOfCurrentNodes;
                    RadTreeNode newNodeToAdd = new RadTreeNode(text, value);
                    newNodeToAdd.ContextMenuID = "ContextMenu";
                    clickedNode.TreeView.Nodes.Add(newNodeToAdd);
                    string textToSet = " new node added";
                    //ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "AddContent",
                    //  "setText('" + textToSet + "');", true);
                    SomeAttachedRadEditor.Content += textToSet;
                    break;
                case "addNodeInThisSubTree":
 
                    int numberOfNodes = clickedNode.Nodes.Count;
                    string name = "Newly Added Node " + numberOfNodes;
                    string key = "NewlyAddedNode" + numberOfNodes;
                    RadTreeNode nodeToAdd = new RadTreeNode(name, key);
                    nodeToAdd.ContextMenuID = "ChildContextMenu";
                    //clickedNode.Nodes.Add(nodeToAdd);
                    clickedNode.Owner.Nodes.Add(nodeToAdd);
                    string addedText = " new node added";
                    //ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "AddContent",
                    //  "setText('" + addedText + "');", true);
                    SomeAttachedRadEditor.Content += addedText;
                    break;
                default:
                    break;
            }
        }
 
        protected void treeView_NodeEdit(object sender, RadTreeNodeEditEventArgs e)
        {
 
        }
    }
}

 

even though i have html on server side setting "content" is throwing the error despite of it not being in update panel.

Thank you,

Sean

0
Marin Bratanov
Telerik team
answered on 29 Oct 2018, 06:19 PM
Hello Sean,

RadAjaxManager uses UpdatePanel controls behind the scenes. This is the only way to have partial rendering with the MS AJAX framework.

So, in this setup you end up with an UpdatePanel around RadEditorTestMainPanel and so the editor is inside an update panel.

With this in mind, you are, indeed, hitting the same issue. 

I have increased its priority in our backlog and the bug report page I linked above will reflect its status changes so you can click the Follow button to get email notifications.


Regards,
Marin Bratanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
General Discussions
Asked by
Nikolaj Kaplan
Top achievements
Rank 1
Answers by
Paul
Telerik team
Sean
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or