Initial Editing of pages & look and feel

Oct 28, 2009 at 12:56 PM

Hi all,

I am getting stuck changing the theme and adding HTML to a homepage. Seems everytime I add a simple peice of HTML I get the error:

A potentially dangerous Request.Form value was detected from the client (mainContent_ctl02_txtHtml_ftbEditor="<P>Welcome to Mixa I...").

 

Description: Request Validation has detected a potentially dangerous client input value, and processing of the request has been aborted. This value may indicate an attempt to compromise the security of your application, such as a cross-site scripting attack. To allow pages to override application request validation settings, set requestValidationMode="2.0" in the configuration section. After setting this value, you can then disable request validation by setting validateRequest="false" in the Page directive or in the configuration section. However, it is strongly recommended that your application explicitly check all inputs in this case. For more information, see http://go.microsoft.com/fwlink/?LinkId=153133.

I have added <pages validateRequest="false" />

as described in the above page but still get the error. If I remove the HTML and place in just plain text I get ano error and the page shows no problem. Also I cant seem to change the way the menus appear. Where do I change this.

In short can someone point me to a good newbie tutorial to edit , add pages to and change MPWS.

Thanks

Oct 28, 2009 at 2:03 PM
Edited Oct 28, 2009 at 2:13 PM

Damixa --

Exactly what is the "simple peice of HTML" you are trying to add?

In general, the HTML editor control works as follows.

  1. Login as an admin.
  2. Go to a page.
  3. In the section-controls drop-down, choose "Html" and then click on the button "Add Section".
  4. A new-section appears.
  5. In the new-section, click the button "Edit Mode".
  6. The HTML-Editor will appear, and for the 1st time it will appear in WYSIWYG-Mode.
  7. In WYSIWYG-Mode, one can enter text as one would in any other WYSIWYG editor such MS Word or MS Write.
  8. If one wants to enter actual HTML code, then one needs to swtich the HTML editor to use "Source-Mode", by clicking the toggle-button "Source".
  9. The toggle-button "Source" is a toggle, which switches the HTML-Editor to and from "Source Mode".
  10. (Do NOT enter HTML code when the HTML-Editor is in WYSIWYG-Mode.)

HTH.

Thank you.

-- Mark Kamoski

Oct 28, 2009 at 6:24 PM

Yep...I had already tried all that many times. Still get the error.

The simple HTML is ANY HTML you like , I mean <p> or <br> whatever. Still returns the error. Its OK when I copy and paste from notepad and get just unformatted text, but as soon as I format it (and therefore enter HTML code) the error returns.

Oct 28, 2009 at 7:22 PM

Damixa --

Are you pasting the HTML code into the Source-Mode-View of the control or into the Wysiwyg-Mode-View of the control?

Oct 28, 2009 at 7:39 PM

Hi Mkamoski,

IM not pasting HTML in anywhere.

I am pasting text from Notepad into the source Mode View , this results in the text appearing in the WYSIWYG as one line of unformatted text and when I do that I do not get the error.

If I then go into the HTML editor and ass a <p> (or anything) OR if I enter a carriage return in the WYSIWYG editor (which gives the same<p> then I get the error.

 

The point is if there is HTML code in the page if produces and error, if I remove the code and leave the unformatted text then there is no error produced.

Oct 28, 2009 at 7:52 PM

Damixa --

That is strange.

I cannot reproduce your error at all.

I am doing the following...

  1. I go to a page.
  2. I add an HTML control.
  3. I open the page.
  4. I switch to "Edit Mode".
  5. I switch to "Source Mode".
  6. I am pasting text from Notepad into the source Mode View and the text that I am pasting into Source-Mode is "the quick brown fox" without the bounding double-quotes.
  7. If I then go into the HTML editor and I switch to Source-Mode and add a <p> and then I close the p tag properly with </p> and then I click "Save" and then I switch to "View Mode".
  8. I get no error.

I suggest that you try your test again

HTH.

Thank you.

-- Mark Kamoski

Oct 28, 2009 at 7:58 PM

I know its really baffled me. It seems as though the HTML is being seen as some sort of client input. (as per the error)

Believe me I have tried the above and spent at least a few hours today trying all scenarios.

I will try your example above to the letter...watch this space 

And thanks!

Oct 28, 2009 at 8:09 PM

No good,

Just done it again , added just a <p> and the following was returned:

A potentially dangerous Request.Form value was detected from the client (mainContent_ctl02_txtHtml_ftbEditor="...a Images. <p>

Removed the <p> and all was fine

Oct 28, 2009 at 8:11 PM

Are you running in a Frame?

Are you running Shared Hosting or on your local machine?

What else, if anything, do you have on your page?

Which theme are you using?

 

Oct 28, 2009 at 8:24 PM
mkamoski wrote:

Are you running in a Frame?

Are you running Shared Hosting or on your local machine?

What else, if anything, do you have on your page?

Which theme are you using?

 

 No no frames

Localhost

Nothing, even deleted it and added it to another blank page , so the problem is site specific.

No theme yet just white plain.

Oct 28, 2009 at 8:45 PM

Damixa --

Regarding this...

>>>No theme yet

...how is that possible?

When one goes into >Administration, >CmsSetup, I think one has to choose a theme.

Anyway, you should choose one of the stock themes that ship with Mwpsk, such as ElasticOrange, which would be a "stable" theme.

After setting that, test when you have a stable theme applied.

The themes are rather sophisticated, as themes go, so maybe there is something in the theme itself that causes issues.

Or, maybe it is the fact that you do not have a theme applied.

(FYI, for my testing, I am using my ElasticBlackAndWhite, which I have uploaded in the Patches section,. where ElasticBlackAndWhite is a slightly modified version of the ElasticOrange theme.)

HTH.

Thank you.

-- Mark Kamoski

 

Oct 28, 2009 at 9:35 PM

Right heres what Ive just done...

deleted the whole web

reinstalled a clean MPWSk

opened it in the default theme (blue one)

added a HTML page to home

placed in Testtest in wysiwyg, saved it.....no problem

entered a carriage return between testest (so in effect I entered a <p>)

Clicked save and it gave the error!!??

Ah welll....back to Dreamweaver!

Oct 29, 2009 at 3:34 AM
That is really weird.

When I do the same thing here, I do not get the error.

Oh well.

It is a mystery, I suppose.

>
Jul 5, 2010 at 7:29 AM
Edited Jul 5, 2010 at 7:34 AM

For any one else having this issue it may be related to the version of .Net that is installed on the machine you are experiencing errors compared to the version that was configured in VS.

For example, If your production(hosted) application is running on IIS6 with .Net 3.5 SP1 and your application is set to use IIS7 with .Net 4.0 (Extended or Client) in VS then you will get control rendering issues.

You need to add or change to the System.Web section in your web.config dependant on the machine's configuration you wish to run the application on. (where its deployed to)
The following is an example, use the latest framework installed!

 

<pages controlRenderingCompatibilityVersion="2.0" clientIDMode="AutoID"/>

 

Also note for best practice that if you can not update from IIS6 .Net 2.0 on your hosted server then you need to set up your development environment to suite this as you will never get these issues sorted using a later framework or IIS during development!

If you were to install VS 2010 today you will most likely have been configured during setup to use IIS7 or later with .Net 4.0 Extended. If you deploy to a server with IIS6 & .Net 3.0 (there are many combinations and service packs) it is not going to do you any justice, Check your VS settings and your hosted server. Match everything up and the problems will go away.

Also remember that just because it says .Net 4 for example does not mean an actual version of 4.0.0.0, You must check the full version as the server could have for example .Net 4.0.311.1178 and your development environment .Net 4.0.89.7773 this is not a match!

Mar 18, 2011 at 1:20 PM

i have the same prob

i use VS2010 iis7

when i use VS 2008 its not hapend just with the .net 4

can someone an idea how to fix it

thank u

ronen

Mar 18, 2011 at 10:39 PM

Check the properties for your project, What is the target framework version? and the follow through the previous post to yours.

you shouldn't have to much trouble.

If your target framework is .NET 4 then try switching back to 3.5 and then immediately back to .NET 4 and see how that works out.