IE problem. (Error message: Acces is denied)

10 posts, 0 answers
  1. Hee
    Hee avatar
    25 posts
    Member since:
    Sep 2011

    Posted 20 May 2012 Link to this post

    I use the AsyncUpload control and it showed me javascript error message as below.
    "Access is denied."
    It only occurred in IE 9.
    Here is my code. Please help me.

    <telerik:RadButton ID="RadButtonFiles" runat="server" AutoPostBack="false" EnableSplitButton="true" Text="Files"
        TabIndex="11" CssClass="RadButton_SimpleCustomAutoWidth" Width="100%" UseSubmitBehavior="false"
        OnClientClicked="RadButtonFiles_OnClientClicked" EnableEmbeddedSkins="false" />
    <telerik:RadContextMenu ID="RadContextMenuFiles" runat="server" EnableEmbeddedSkins="false" EnableRoundedCorners="true">
        <Items>
            <telerik:RadMenuItem Text="Select Files" NavigateUrl="javascript:RadContextMenuFilesSelectFiles_OnClick();" PostBack="false" />
        </Items>
    </telerik:RadContextMenu>
     
    <telerik:RadAsyncUpload ID="RadAsyncUploadSelectFiles" runat="server" EnableEmbeddedSkins="false"
        OnClientFileSelected="RadAsyncUploadSelectFiles_OnClientFileSelected"
        DisablePlugins="true" TemporaryFileExpiration="0">
    </telerik:RadAsyncUpload>


    var $fileInput;
     
    function pageLoad() {
        var fileUpload = $get(g_radUploadSelectFilesClientID);
        if (fileUpload != null) {
            fileUpload.style.visibility = "hidden";
        }
    }
     
    function RadContextMenuFilesSelectFiles_OnClick() {
        $fileInput = $("input:file").eq(0);
        $fileInput.click();
    }
  2. Hee
    Hee avatar
    25 posts
    Member since:
    Sep 2011

    Posted 21 May 2012 Link to this post

    In addition, it occurred when I selected file from file selector dialog.
  3. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1268 posts

    Posted 24 May 2012 Link to this post

    Hi,

    Please clarify the version of the controls that you are using so we could try to replicate the problem locally.

    Greetings,
    Dimitar Terziev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  4. Hee
    Hee avatar
    25 posts
    Member since:
    Sep 2011

    Posted 24 May 2012 Link to this post

    IE version: 9
    Telerik version: 2012.1.403.40

    step 1. "Files" button click
    step 2. "Select Files" context menu click
    step 3. Selected file form file selector dialog
    --> Occurred error.

    Hee

    function RadButtonFiles_OnClientClicked(sender, args) {
        if (args.IsSplitButtonClick() || !sender.get_commandName()) {
            var currentLocation = $telerik.getLocation(sender.get_element());
            var contextMenu = $find("RadContextMenuFiles");
            contextMenu.showAt(currentLocation.x, currentLocation.y + 22);
        }
    }
     
    function RadContextMenuFilesSelectFiles_OnClick() {
        $fileInput = $("input:file").eq(0);
        $fileInput.click();
    }

    <telerik:RadButton ID="RadButtonFiles" runat="server" AutoPostBack="false" EnableSplitButton="true" Text="Files"
            TabIndex="11" CssClass="RadButton_SimpleCustomAutoWidth" Width="100%" UseSubmitBehavior="false"
            OnClientClicked="RadButtonFiles_OnClientClicked" Skin="Simple" />
    <telerik:RadContextMenu ID="RadContextMenuFiles" runat="server" Skin="Simple" EnableRoundedCorners="true" Width="100">
        <Items>
            <telerik:RadMenuItem Text="Select Files"
                NavigateUrl="javascript:RadContextMenuFilesSelectFiles_OnClick();" PostBack="false" />
        </Items>
    </telerik:RadContextMenu>
    <br /><br />
    <telerik:RadAsyncUpload ID="RadAsyncUploadSelectFiles" runat="server" Skin="Simple"
        DisablePlugins="true" TemporaryFileExpiration="0">
    </telerik:RadAsyncUpload>
  5. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1268 posts

    Posted 25 May 2012 Link to this post

    Hi,

    In order to deal with the experienced problem add the following lines in the web config file:
    <location path="Telerik.Web.UI.WebResource.axd">  
        <system.web>      
            <authorization>
                <allow users="*" />      
            </authorization>  
        </system.web>
    </location>

    Regards,
    Dimitar Terziev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  6. Hee
    Hee avatar
    25 posts
    Member since:
    Sep 2011

    Posted 25 May 2012 Link to this post

    Hi Dimitar.
    Thanks for your reply.
    But it's not works. Error is still occurring.

    Here is my web config file.
    <?xml version="1.0"?>
    <configuration>
      <configSections>
        <sectionGroup name="telerik.web.ui">
          <section name="radCompression" type="Telerik.Web.UI.RadCompressionConfigurationSection, Telerik.Web.UI, PublicKeyToken=121fae78165ba3d4" allowDefinition="MachineToApplication" requirePermission="false"/>
        </sectionGroup>
      </configSections>
      <appSettings>
        <add key="Telerik.ScriptManager.TelerikCdn" value="Disabled"/>
        <add key="Telerik.StyleSheetManager.TelerikCdn" value="Disabled"/>
      </appSettings>
      <system.web>
        <compilation debug="true" strict="false" explicit="true" targetFramework="4.0">
      </compilation>
        <pages>
          <controls>
            <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI"/>
          </controls>
        </pages>
        <httpHandlers>
          <add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false"/>
          <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false"/>
          <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false"/>
          <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false"/>
        </httpHandlers>
        <httpModules>
          <add name="RadCompression" type="Telerik.Web.UI.RadCompression"/>
        </httpModules>
        <urlMappings>
          <add url="~/" mappedUrl="~/Default.aspx"/>
        </urlMappings>
        <httpRuntime maxRequestLength="1048576"/>
        <sessionState timeout="20"/>
      </system.web>
      <telerik.web.ui>
        <radCompression enablePostbackCompression="true">
          <!--<excludeHandlers>
            <add handlerPath="default.aspx" matchExact="false"/>
          </excludeHandlers>-->
        </radCompression>
      </telerik.web.ui>
      <system.webServer>
        <defaultDocument>
          <files>
            <clear/>
            <add value="~/Default.aspx"/>
          </files>
        </defaultDocument>
        <validation validateIntegratedModeConfiguration="false"/>
        <modules runAllManagedModulesForAllRequests="true">
          <remove name="RadCompression"/>
          <add name="RadCompression" type="Telerik.Web.UI.RadCompression" preCondition="integratedMode"/>
        </modules>
        <handlers>
          <remove name="ChartImage_axd"/>
          <add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode"/>
          <remove name="Telerik_Web_UI_SpellCheckHandler_axd"/>
          <add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode"/>
          <remove name="Telerik_Web_UI_DialogHandler_aspx"/>
          <add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode"/>
          <remove name="Telerik_Web_UI_WebResource_axd"/>
          <add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode"/>
        </handlers>
        <security>
          <requestFiltering>
            <requestLimits maxAllowedContentLength="104857600"/>
          </requestFiltering>
        </security>
      </system.webServer>
      <location path="Telerik.Web.UI.WebResource.axd">
          <system.web>
        <authorization>
          <allow users="*"></allow>
        </authorization>
          </system.web>
      </location>
    </configuration>
  7. Hee
    Hee avatar
    25 posts
    Member since:
    Sep 2011

    Posted 25 May 2012 Link to this post

    In addition, RadAjaxPanel doesn't work with RadAsyncUpload control in FireFox.
    It doesn't fire AjaxRequest event.

    I created sample website. Please refer to below url. (Download the website zip file from url)

    Please execute it in IE and FireFox.

    Hee.
  8. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1268 posts

    Posted 29 May 2012 Link to this post

    Hello Hee,

    I've tested the sample project and the experienced behavior is caused by a security policy of the IE which does not allow a file to be uploaded when the dialog is opened via JavaScript.

    All the best,
    Dimitar Terziev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  9. Hee
    Hee avatar
    25 posts
    Member since:
    Sep 2011

    Posted 29 May 2012 Link to this post

    How about Fire Fox?
    Why doesn't it fire Ajax request event?
  10. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1268 posts

    Posted 01 Jun 2012 Link to this post

    Hi Hee,

    The Ajax request is properly fired in Firefox, here is video of the behavior on my end.

    Kind regards,
    Dimitar Terziev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top