Developer forum

Forum » Development » Server error while saving the paragraph

Server error while saving the paragraph

Dmitrij Jazel
Reply

Hi everyone,

I recently was working on a custom setup here. And eventually solution seamed to work as it should.

Except for a part when you do some changes to the paragraph and than click "Save and close" than I get this error message

(see the attachment)

 

It has something to do with ParagraphModuleCSS in the Paragraph settings.

I tried to set the setting of "include css in the editor" but same error still remained, except for Error header that now says:

 

Serverfeil i programmet /.

En mulig farlig verdi, Request.Form, ble oppdaget fra klienten (ParagraphText="...ge testing<br />").

Beskrivelse: ASP.NET har registrert data i forespørselen som er potensielt farlige, siden de kan inneholde HTML-kode eller -skript. Dataene kan være et forsøk på å forringe programmets sikkerhet, for eksempel et skriptangrep på tvers av området. Hvis denne typen inndata er tillatt i programmet, kan du inkludere kode på en webside for å tillate den eksplisitt. Hvis du vil ha mer informasjon, kan du se http://go.microsoft.com/fwlink/?LinkID=212874.

Unntaksdetaljer: System.Web.HttpRequestValidationException: En mulig farlig verdi, Request.Form, ble oppdaget fra klienten (ParagraphText="...ge testing<br />").

Kildefeil:

Et ubehandlet unntak ble generert i løpet av utførelsen av gjeldende webforespørsel. Informasjon om opprinnelse og plassering for unntaket kan hentes ved hjelp av stakksporingen for unntak nedenfor.

Stakksporing:

[HttpRequestValidationException (0x80004005): En mulig farlig verdi, Request.Form, ble oppdaget fra klienten (ParagraphText="...ge testing<br />").]
   System.Web.HttpRequest.ValidateString(String value, String collectionKey, RequestValidationSource requestCollection) +12602837
   System.Web.HttpRequest.ValidateHttpValueCollection(HttpValueCollection collection, RequestValidationSource requestCollection) +132
   System.Web.HttpRequest.get_Form() +100
   HttpCompression.HttpCompressionModule.UseCompression(HttpApplication& app) +1062
   HttpCompression.HttpCompressionModule.BeginCompression(Object sender, EventArgs e) +125
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +165


 

 

 

 

 

Request.form_server_error.png

Replies

 
David Matheson
Reply

Hi,

The error message is in Norwegian, and I read the error to be the inclusion of HTML, specifically "<br />", in Request.Form

Unntaksdetaljer: System.Web.HttpRequestValidationException: En mulig farlig verdi, Request.Form, ble oppdaget fra klienten (ParagraphText="...ge testing<br />").

David

 
Dmitrij Jazel
Reply

Hej David,

Well yes, sorry about that small inconvenience :-) I left it so it is very close to Danish, but I think in worst case Google translate should handle just fine :-)

And I agree regarding the inclusion, what it says that "A possibly dangerous value" it looks like paragraph text is being passed to a paragraph via form.post and eventually system considers it a harmfull input as HTML & JS actually is.

Any suggestions how to avoid that error, or do something about it?

 

Regards,

Dmitrij

 

 
Nicolai Høeg Pedersen
Reply

Hi Dmitrij

 

You really need to run English OS/.NET - Norwegian exceptions are really difficult...

 

Seeing this error and the other ones you posted, indicates that you installation of Dynamicweb is not 'by the book'. Did you follow the installation guide?

 

This particular error can be fixed in web.config - but it also indicates that you are not using an up-to-date Dynamicweb web.config.

 

BR Nicolai

 
Dmitrij Jazel
Reply

Hej Nicolai,

Hehe. ok, I will try see what I can do regarding Norwegian OS. I agree about error understanding difficulties with non-english OS. :-)

Your suspicions have a a good reason, and the answer is yes - this installation is not by the book. This project must be included with another system - so we have to compromise...

Regarding web.config, we used latest DW app with files folder from DW empty data SQL zip. It might have modified itself (maybe somehow) I can try looking and analyzing it, hopefully I can find something.

 

Regards,

Dmitrij

 

 

 
Dmitrij Jazel
Reply

Hej Nicolai,

Some updates here...

We found that this part here:

  <applicationSettings>
    <Dynamicweb.Admin.MySettings>
      <setting name="Dynamicweb_Admin_dk_dynamicsystems_webservice_IPLookup" serializeAs="String">
        <value>http://webservice.dynamicsystems.dk/ip2location/lookup.asmx</value>
      </setting>
      <setting name="Dynamicweb_Admin_dk_dynamicweb_templates_TemplateTagsService" serializeAs="String">
        <value>http://templates.dynamicweb.dk/Admin/Public/WebServices/TemplateTags/TemplateTags.asmx</value>
      </setting>
      <setting name="Dynamicweb_Admin_dk_dynamicweb_versions_VersionsInformation" serializeAs="String">
        <value>http://license.dynamicweb-cms.com/VersionsInformation.asmx</value>
      </setting>
    </Dynamicweb.Admin.MySettings>
  </applicationSettings>

 

We removed this part, and it fixed the problem with paragraph text. Now we can write plain text and save the paragraph.

But if we try to attach a module to a paragraph, and than "save and close" paragraph, still the same error appears.

Any other suggestions what can cause such behavior?

 

I include web config this time :-)

 

Regards,

Dmitrij

 

 
Nicolai Høeg Pedersen
Reply

That part has nothing to do with the error you are getting. You probably updated your web.config and it solved your problem.

 

This line is in your web.config (and it should be). If not, you get the error you saw.

 

<pages validateRequest="false" controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>

BR Nicolai

 
Dmitrij Jazel
Reply
This post has been marked as an answer

Hej Nicolai,

I actually got it solved ;-)

Found this forum post here: http://forums.asp.net/t/1550353.aspx/1

Go to the post highligted in green.

<configuration>
  <system.web>
   <httpRuntime requestValidationMode="2.0" />
  </system.web>
  <pages validateRequest="false">
  </pages>
</configuration>

And it did the trick! :-)

Only <httpRuntime requestValidationMode="2.0" /> was missing in Dynamic webs web.config and Validate request was false as same as in your previous post.

 

Thanks for help! :-)

 

Regards,

Dmitrij

 

Votes for this answer: 1

 

You must be logged in to post in the forum