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

IE problem. (Error message: Acces is denied)

9 Answers 160 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Hee
Top achievements
Rank 1
Hee asked on 21 May 2012, 12:49 AM
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();
}

9 Answers, 1 is accepted

Sort by
0
Hee
Top achievements
Rank 1
answered on 21 May 2012, 07:45 AM
In addition, it occurred when I selected file from file selector dialog.
0
Dimitar Terziev
Telerik team
answered on 24 May 2012, 11:32 AM
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.
0
Hee
Top achievements
Rank 1
answered on 25 May 2012, 12:49 AM
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>
0
Dimitar Terziev
Telerik team
answered on 25 May 2012, 08:41 AM
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.
0
Hee
Top achievements
Rank 1
answered on 25 May 2012, 09:17 AM
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>
0
Hee
Top achievements
Rank 1
answered on 25 May 2012, 04:57 PM
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.
0
Dimitar Terziev
Telerik team
answered on 29 May 2012, 11:46 AM
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.
0
Hee
Top achievements
Rank 1
answered on 30 May 2012, 02:18 AM
How about Fire Fox?
Why doesn't it fire Ajax request event?
0
Dimitar Terziev
Telerik team
answered on 01 Jun 2012, 12:25 PM
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.
Tags
AsyncUpload
Asked by
Hee
Top achievements
Rank 1
Answers by
Hee
Top achievements
Rank 1
Dimitar Terziev
Telerik team
Share this question
or