Solved

A potentially dangerous Request.Path value was detected from the client (?).

Posted on 2011-03-15
5
1,242 Views
Last Modified: 2012-05-11
I have an MVC3 web application and a second Dynamic Data website used for data administration. I want a link from the MVC3 to the Dynamic Data site, and have created the code which will redirect it. At the moment it looks like this,

string url = http://localhost:4189/WebAdmin/%3Fun3Dmyusername%3D353494271.949838

since in development I have hard coded the path "http://localhost:4189/WebAdmin/%" into my web config. The problem is that when I call Response.Redirect(url) I get the YellowScreenOfDeath with the above error (in subject).

Should I use somethign besides Response.Redirect()?

Thanks,
newbieweb
0
Comment
Question by:newbieweb
[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
  • 2
5 Comments
 
LVL 39

Expert Comment

by:Pratima Pharande
ID: 35137540
Put validateRequest="false" in your page directive

where you are redirecting
0
 
LVL 39

Accepted Solution

by:
Pratima Pharande earned 500 total points
ID: 35137579
OR add it in web.config

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

Author Comment

by:newbieweb
ID: 35137614
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
 
<pages> is highlighted...
Line 112:      </providers>
Line 113:    </roleManager>
Line 114:    <pages>
Line 115:      <namespaces>
Line 116:        <add namespace="System.Web.Mvc" />
0
 

Author Comment

by:newbieweb
ID: 35138000
I think I mis-understood. I need to update the target web.config. I am testing that now...
0
 

Author Closing Comment

by:newbieweb
ID: 35138093
That worked!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

726 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