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

[Solved] Permission denied

3 Answers 117 Views
Editor
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Chris
Top achievements
Rank 1
Chris asked on 14 Sep 2010, 07:08 PM

Hello,

I am getting a "Permission denied" error when trying to edit and save text in an Editor control.  The control is rendered in a PartialView, then the markup is populated into a table element via AJAX.  Here are the steps I took to repro the issue:

 

  1. Click Edit button to call controller action to populate table with Editor controls
  2. Controller action renders PartialView, then populates table
  3. Change text color to red
  4. Click Save button to call controller action to save data to repository
  5. Controller action saves data to repository
  6. Repeat steps 1-5, but change text color to black.  Error is thrown at Step 4 (save step)

VS2010 indicates the javascript runtime error when calling a method on the body element, "body.firstChild".  The data populated into the control is encoded XHTML from our repository.  Here is a code snippet of the Editor control in the PartialView:

 

<

 

 

td>

 

    <% Html.Telerik().Editor()

        .Name(

 

"Value1")

 

        .Value(() =>

        {

        %>

            <%

 

= Model.Value1%>

 

        <%

        })

        .Render();

    %>

 

 

</td>

 

 

Thanks.

3 Answers, 1 is accepted

Sort by
0
Alex Gyoshev
Telerik team
answered on 15 Sep 2010, 09:27 AM
Hi Chris,

I assume that you are using IE; what is the specific content that you are editing, and where is the text cursor when the error is thrown? We could not reproduce it with the online demos.

Best wishes,
Alex Gyoshev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Chris
Top achievements
Rank 1
answered on 15 Sep 2010, 05:54 PM
Yes I am using IE.  The content I am editing is simply a bulleted list.  The data is originally from InfoPath, but doesn't matter since it is still XHTML compliant.  The text cursor is within the Editor control when the error is thrown.

After some tinkering, I found that the error is thrown due to when I instantiate my AJAX form.  In the error case, I was instantiated the form in the parent view, then rendering the Editor control and other markup in a partial view.  If I instead instantiate the form in the partial along with everything else, the error is not thrown when AJAX populates the divs.

I'm guessing it has something to do with how ASP.NET MVC, ASP.NET AJAX and partial rendering works in relation to cross-domain security, since the Editor control uses an iframe for the browser editing piece.

What are your thoughts?
0
Alex Gyoshev
Telerik team
answered on 16 Sep 2010, 09:26 AM
Hello Chris,

This problem seems rather tangled. I am assuming that by form instantiation you mean the opening/closing of the <form> tag - so we made a sample project that does that, but alas, we couldn't observe the issue. Please apply any necessary changes to it in order to break it, or send a stripped-down version of your project so that we can investigate the problem.

All the best,
Alex Gyoshev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Editor
Asked by
Chris
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Chris
Top achievements
Rank 1
Share this question
or