RSS
Welcome to IT Noobs Corner, your online source for basic and advanced computer tricks and tutorials made especially for noobies in computer / IT world.

ASP.NET: A potentially dangerous Request.Form value was detected from the client SOLUTION

0 comments

Tuesday, August 13, 2013

I have a site hosted in GoDaddy, http://www.dragonflameasia.com. From this site, I created a dynamic web site that enables the web admin to upload photos, news item into their website through a backend site.



Now, every time I entered through the textbox with a break or Enter command, an error appears like this:


Now, here's the solution:

First, Check your version of .NET Framework. If your framework falls below 4.0, do the following items:

1.) Include the ValidateRequest="false" into your affected HTML file.

 
2.) Go to Web.Config. Include pages validateRequest="false" under .



3.) Now, on tinymce configuration, adjust the configuration into settings. It enables the textbox to become an XML version for security purposes.



4.) Also include the code HttpUtility.Htmlencode(txtcontent.Value) at the bottom below the
code.

5.) Now, to the code behind of the form. Upon saving the record, remember to parse or format the tinymce textbox by using Server.HtmlEncode function. Example like this:

strContent = Server.HtmlEncode(Me.txtContent.Text)

This will enables the record to be saved using HTML encoding to it's respective database.

6.) Now, to load the saved record, we shall use Server.HTMLDecode function. Example like this:

Me.txtContent.Text = Server.HtmlDecode(IIf(IsDBNull(oReader.GetValue(3)), "", oReader.GetValue(3)))


 









 
  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

Configuring Client-Server for Microsoft SQL Server R2

0 comments

Friday, August 9, 2013


Here are the following steps to enabled server-client interface using Microsoft SQL Server 2008 R2:

1.) Go to start->Microsoft SQL Server 2008 R2->Configuration Tools->SQL Server Configuration Manager.


2.) In SQL Server Configuration Manager, expand SQL Server Network Configuration. Choose Protocols for SQLEXPRESS. On the right side, make sure that the Shared Memory, Named Pipes and TCP/IP are all enabled. If disabled, right click then click enabled. After enabling all protocol name, restart your computer.


3.) Then, go to Microsoft SQL Server 2008 R2 Management Studio. Login your desired username.


4.) Then, right click on the server name and choose properties.



5.) On the left tab, select Security. On the right panel, choose SQL Server and Windows Authentication mode.


6.) Click ok then retart your PC.
7.) Then, go back to Microsoft SQL Server 2008 R2 Management Studio. Login your desired username again. After login, from the left pane, select Security-Logins-sa. Right click sa and select properties.


8.) Enter your sa account password. Also, don't forget to check Map to credential. Press ok.


9.) Again, go to Security-Logins-sa. Right click sa and select properties. From the left panel, select status. On the right panel, click Enabled on the login choices.


10.) Click ok. Then restart your PC. 
11.) Go to SQL Server 2008 R2 Management Studio . Login using SQL Server Authentiation. User name: sa. Password, the password entered.


12.) Server side, complete.
  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS