Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. encoding

encoding

Scheduled Pinned Locked Moved ASP.NET
csharphtmlasp-netdatabasesysadmin
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    samerh
    wrote on last edited by
    #1

    Hi In asp.net website when writting inside textboxes html tags or single cote an error is generated " potentially dangerous Request.Form value was detected from the client ". I used to put in page directive of master page validaterequest=false and everything is ok. I have met someone who told me that this is not secure and can cause sql injection (but iam using stored procedures) or script injection. I have also read about enabling "Debug=true" directive at the top of the file that generated the error I also know that we can encode our text values and save them in sql as encoded using Server.HtmlEncode(txtName.Text)); but do i have in this case to write Server.HtmlEncode and decode when reading for every textbox i have and does it have any influence on loading time, does it take time???? plz advice and thanks

    G 1 Reply Last reply
    0
    • S samerh

      Hi In asp.net website when writting inside textboxes html tags or single cote an error is generated " potentially dangerous Request.Form value was detected from the client ". I used to put in page directive of master page validaterequest=false and everything is ok. I have met someone who told me that this is not secure and can cause sql injection (but iam using stored procedures) or script injection. I have also read about enabling "Debug=true" directive at the top of the file that generated the error I also know that we can encode our text values and save them in sql as encoded using Server.HtmlEncode(txtName.Text)); but do i have in this case to write Server.HtmlEncode and decode when reading for every textbox i have and does it have any influence on loading time, does it take time???? plz advice and thanks

      G Offline
      G Offline
      G K Singh
      wrote on last edited by
      #2

      first thing using validaterequest=false is not secure is right. It may cause of script injection but sql injection can be used. Server.HtmlEncode will protect you for script injection. about the loading time you can check your self as: add: enabled="true" mostRecent="true" requestLimit="50" /> In your web.config file and... Then open trace.axd file by write in end of your url like: http://www.codeproject.com/script/Forums/Edit.aspx/trace.axd

      Gaurav Kumar Singh Consultant (Asp.net)

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups