Editor Image/Document/etc manager

4 posts, 0 answers
  1. Andrei
    Andrei avatar
    4 posts
    Member since:
    Jan 2012

    Posted 19 Mar 2012 Link to this post

    Hello telerik,

    I use his code on IIS 7

    <telerik:RadEditor ToolsFile="~/Admin/FEHTools.xml" Height="355px" Width="433px"
                                                                                                                                ContentFilters="RemoveScripts" CssClass="EditorCss" EnableResize="false" ID="radEditorWpContent"
                                                                                                                                runat="server">
                                                                                                                                <imagemanager viewpaths="~/editor/Images/" uploadpaths="~/editor/Images/"
                                                                                                                                    deletepaths="~/editor/Images/" maxuploadfilesize="100000000" searchpatterns="*.*"
                                                                                                                                    enableimageeditor="true" />
                                                                                                                                <flashmanager viewpaths="~/editor/flash/" uploadpaths="~/editor/flash/"
                                                                                                                                    deletepaths="~/editor/flash/" maxuploadfilesize="100000000" />
                                                                                                                                <mediamanager viewpaths="~/editor/media/" uploadpaths="~/editor/media/"
                                                                                                                                    deletepaths="~/editor/media/" maxuploadfilesize="100000000" searchpatterns="*.*" />
                                                                                                                                <documentmanager viewpaths="~/editor/documents/" uploadpaths="~/editor/documents/"
                                                                                                                                    deletepaths="~/editor/documents/" maxuploadfilesize="100000000" searchpatterns="*.*" />
                                                                                                                                <cssfiles>
                                                                                                                                    <telerik:EditorCssFile Value="~/CSS/RadEditor2.css" />
                                                                                                                                </cssfiles>
                                                                                                                            </telerik:RadEditor>

    in a aspx file under a folder with this webconfig

    <system.web>
      <authorization>
        <allow roles="admin"></allow>
        <deny users="?"/>
      </authorization>
    </system.web>
    <system.webServer>
      <security>
        <requestFiltering>
          <requestLimits maxUrl="8192" maxQueryString="4096" />
        </requestFiltering>
      </security>
    </system.webServer>

    Problem is: when i click on any of image/document/... manager to upload an image, then
    it redirects the iframe containing the manager to the login page.
    Before that it IIS complained that the request url is too big, which you can see i have increased.

    WHY does it redirect?


  2. Rumen
    Admin
    Rumen avatar
    14351 posts

    Posted 21 Mar 2012 Link to this post

    Hello,

    Put the following in your web.config file:

    <location path="Telerik.Web.UI.DialogHandler.aspx">
      <system.web>
       <authorization>
        <allow roles="*"/>
      </authorization>
    </system.web>
    </location>
    <location path="Telerik.Web.UI.SpellCheckHandler.axd">
      <system.web>
        <authorization>
          <allow roles="*"/>
        </authorization>
      </system.web>
    </location>

    You can also reduce the size of the RadEditor's dialog urls using the following code:

    <script type="text/javascript">
    function setUrlLength(editor)
    {
        editor.get_dialogOpener()._dialogUrlLengthLimit = 500;
    }
    </script>
    <telerik:RadEditor ID="RadEditor1" runat="Server" OnClientLoad="setUrlLength" />


    Kind regards,
    Rumen
    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.
  3. Andrei
    Andrei avatar
    4 posts
    Member since:
    Jan 2012

    Posted 29 Mar 2012 Link to this post

    Hello guys,

    I didn't help.

    I solved the request limit problem as mentioned. But the imagemanager is still
    redirected to login page specified by

       <authentication mode="Forms" >
          <forms loginUrl="Access.aspx" defaultUrl="~\Admin\SideEdit.aspx"></forms>
        </authentication>

    Thanks for help!
  4. Rumen
    Admin
    Rumen avatar
    14351 posts

    Posted 02 Apr 2012 Link to this post

    Hello,

    Try the following
    1. set the RadEditor's DialogHandlerUrl property to "~/Telerik.Web.UI.DialogHandler.axd"
    2. open the web.config file and replace Telerik.Web.UI.DialogHandler.aspx with Telerik.Web.UI.DialogHandler.axd
    3. Also put in the web.config
    <location path="Telerik.Web.UI.DialogHandler.axd">
      <system.web>
       <authorization>
        <allow roles="*"/>
      </authorization>
    </system.web>
    </location>

    BTW do you experience the problem with the SpellChecker?

    Greetings,
    Rumen
    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