Solved

Error 400 - Ampersand (&) on URL parameter value in iis 7.5

Posted on 2014-02-17
6
1,149 Views
Last Modified: 2014-03-15
Could not find the right solution during my web search so I am going to ask this question.

I have a url like this

http://blahsub.blahdomain.com/blahsite/blahservice.svc/blahhandler?param=12345&msg=value%26more+value

My problem is that when there is a request and the "msg" has a value with an ampersand(%26) it turns the rest of the url into part of another parameter like so:

 msg=value&more+value

and returning  error 400 as a bad request.

I have the URL Rewrite module installed.

How can I allow ampersands in parameter values?

There are plenty of articles online but the ones that I have looked at has not given me the solution that I need.  

I need to use the URL Rewrite in IIS to do this.

add a rule?

thanks for your help.
0
Comment
Question by:jonjojr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 29

Expert Comment

by:becraig
ID: 39866333
You might want to switch on verification compatibility:
http://adorr.net/2010/01/configure-iis-to-accept-url-with-special-characters.html
0
 

Author Comment

by:jonjojr
ID: 39866347
is there another solution if the server does not have Service Pack 1 on .Net 1.1?
0
 
LVL 29

Accepted Solution

by:
becraig earned 500 total points
ID: 39866350
If you look at the first solution it allows restricted chars:
through setting,
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP\Parameters
AllowRestrictedChars

To the best of my knowledge there is no SP restriction on this approach.

Just curious though, why would you not have the later .net frameworks and applicable SPs  ?

There is backward compatibility and most .net FWs can exist together.
0
Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

 

Author Comment

by:jonjojr
ID: 39866391
I was not expecting an answer so quickly, let me try this on the servers tomorrow morning and give feedback.
0
 
LVL 29

Expert Comment

by:becraig
ID: 39896404
If you have any issues with the suggested approach, let me know so we can take another look.
0
 

Author Closing Comment

by:jonjojr
ID: 39931865
Your solution worked. It is an old legacy system that it just works. So we don't touch it. Thank you for the answer.
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developer tools in browsers have been around for a while, yet they are still heavily underused by developers. Developers still fix html or CSS then refresh page to see effect, or they put alert or debugger in JavaScript and then try again and again …
Introduction A frequently used term in Object-Oriented design is "SOLID" which is a mnemonic acronym that covers five principles of OO design.  These principles do not stand alone; there is interplay among them.  And they are not laws, merely princ…
This video teaches users how to migrate an existing Wordpress website to a new domain.
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question