Problem with MSWord Cleaning

Oct 8, 2010 at 2:06 PM


I haven't been able to found any documantation about MSWord Cleaning, and it doesn't work for me. I've Visual Studio 2010, under .NET 3.5

When I click cleaning button it shows the 'paste window' successfully, but after I paste my document (a 26 page doc) the window just closes and nothing is pasted into editor. But when I try pasting the same document in your Editor Demo, it works perfectly.

Is there something I'm missing to make it work?

Thanks a lot!

Oct 8, 2010 at 2:18 PM

Hello James, if nothing happens it means an error has occurred serverside due to something ( most likely because requestvalidation failed). So ensure that you ahve requestValidation enabled either at the page level, the web.config level or both. It's a little tricky in .net 4.0 ( even though you say your specifically targetting 3.5 ). 

Try and see if  you missed something in the sample web.config you will find available in the examples project available in the download section or follow this thread :

If not, then you may look at the response you got back from the server for the cleanup operation in either firebug ( a firefox extention) or fiddler ( a plugin for IE) ; these tools will allow you to see ajax request/response traffic and let me the error message you got.


Oct 8, 2010 at 2:44 PM


You won't believe what happened :D I had to set requestValidation to 'false' and now it works :) But since it's not a good idea leaving that config for whole application, I disabled it at page level.

This is my first line now:

<%@ Page Title="" ValidateRequest="false" Language="C#" MasterPageFile="~/MasterPages/Main.Master" AutoEventWireup="true" CodeBehind="MapaSitio.aspx.cs" Inherits="PonteAlCorriente.MapaSitio" %>

Thanks a lot! You pointed me to the right direction :) 

Oct 8, 2010 at 2:52 PM

Super. Thank you for reporting back.

Have a good day,