Click here to Skip to main content
15,896,727 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,


Server Error in '/' Application.
The 'href' property had a malformed URL: Cannot use a leading .. to exit above the top directory..
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: The 'href' property had a malformed URL: Cannot use a leading .. to exit above the top directory..

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[HttpException (0x80004005): The 'href' property had a malformed URL: Cannot use a leading .. to exit above the top directory..]
System.Web.UI.HtmlControls.HtmlControl.PreProcessRelativeReferenceAttribute(HtmlTextWriter writer, String attribName) +201
System.Web.UI.HtmlControls.HtmlAnchor.RenderAttributes(HtmlTextWriter writer) +93
System.Web.UI.HtmlControls.HtmlControl.RenderBeginTag(HtmlTextWriter writer) +42
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +19
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +208
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +173
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +31
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +53
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +208
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
System.Web.UI.Control.Render(HtmlTextWriter writer) +10
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +208
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
System.Web.UI.Page.Render(HtmlTextWriter writer) +29
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3060


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

My Sample Coding:

XML
<li><a id="mytasks" runat="server" href="../ProgressClaims/QuickLinks.aspx?Redirect =0">
                                    MY TASKS </a></li>
                                <li><a id="myalerts" runat="server" href="#">MY ALERTS </a></li>
                                <li><a id="mynotification" runat="server" href="~/ProgressClaims/HomePage.aspx">MY
                                    NOTIFICATIONS </a></li>


Thanks,
Tamimun
Posted
Updated 26-Mar-14 2:47am
v2
Comments
Raul Iloc 26-Mar-14 9:06am    
Why you duplicate your question?
I already gave you a solution on your first post!
CHill60 26-Mar-14 9:37am    
Just realised this was a repost - what is wrong with the answers you received to the original post?

The error message is quite clear - you can't use
href="../ProgressClaims/QuickLinks.aspx?Redirect =0"
- the ".." means "go up one folder from the current folder". The current folder when you run this must be the top folder.

Try working out the full path of where you want to be and use "~" to represent the top folder. E.G.
href="~/ProgressClaims/QuickLinks.aspx?Redirect =0"
 
Share this answer
 
Comments
Tamimun 27-Mar-14 0:51am    
Thanks for ur reply..

but not solved "The 'href' property had a malformed URL: Cannot use a leading .. to exit above the top directory.." this error is come...

<li><a id="mytasks" runat="server" href="~/ProgressClaims/QuickLinks.aspx?Redirect =0">
MY TASKS </li>
<li><a id="mynotification" runat="server" href="../ProgressClaims/QuickLinks.aspx?Redirect =0">MY
NOTIFICATIONS </li>

Thanks,
Tamimun
CHill60 27-Mar-14 11:16am    
You've only changed one of the .. to ~ ... you need to change the one for "My notifications" too!
Thanks for reply all...


Thanks
Ansari.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900