473,473 Members | 1,607 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Cannot use a Leading .. Error

I am getting the following error:

Exception Details: System.Web.HttpException: Cannot use a leading .. to
exit above the top directory

The function that throws the error is:

Public Function GetCommentLink() As String

If Not CBool(cfg.GetConfig("cfgLockComments")) And Not
CStr(dtr("post_Comments")).ToUpper = "NOC" Then

Return _
& "<a href=" & cfg.PostPermalinkURI(CInt(dtr("post_ID")),
CStr(dtr("post_Title"))) & ">" _
& loc.GetString("Comments") _
& " (" & CInt(dtr("cmt_CmtCnt")) & ")</a>"

Else
Return ""

End If

End Function
___________________

I've Googled this error and the consensus is that it has something to do
with security in the way you reference a directory. Any suggestions on
how to fix this? It is a blog engine that I am trying to install.

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #1
5 1368
Go into the IIS virtual directories properties, and on the "Virtual
Directory" tab, click the "Configuration" button. Then on the "Options" tab,
check off "Enable Parent Paths". BTW, there are security reasons this is
turned off by default.
http://support.microsoft.com/default...b;en-us;332117 IMHO I would
actually create a virtual dir that points to the parent path.

"Will Chamberlain" <wi**************@devdex.com> wrote in message
news:u9****************@TK2MSFTNGP15.phx.gbl...
I am getting the following error:

Exception Details: System.Web.HttpException: Cannot use a leading .. to
exit above the top directory

The function that throws the error is:

Public Function GetCommentLink() As String

If Not CBool(cfg.GetConfig("cfgLockComments")) And Not
CStr(dtr("post_Comments")).ToUpper = "NOC" Then

Return _
& "<a href=" & cfg.PostPermalinkURI(CInt(dtr("post_ID")),
CStr(dtr("post_Title"))) & ">" _
& loc.GetString("Comments") _
& " (" & CInt(dtr("cmt_CmtCnt")) & ")</a>"

Else
Return ""

End If

End Function
___________________

I've Googled this error and the consensus is that it has something to do
with security in the way you reference a directory. Any suggestions on
how to fix this? It is a blog engine that I am trying to install.

*** Sent via Developersdex http://www.developersdex.com ***

Nov 19 '05 #2
Thanks for the prompt response Tim. The only problem is that I am on a
shared host (Brinkster) so I don't have physical access to IIS. Are
there any workarounds for this given my current situation?

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #3
Another interesting aspect of this error:

When I try to visit my site by typing in http://subdomain.mydomain.com I
get the error in question.

If I then type out the full URL that the subdomain references
http://www.mydomain.com/subdomain I do not get the error. After
visiting http://www.mydomain.com/subdomain I can type in
subdomain.mydomain.com, click REFRESH, and the page loads perfectly. I
don't know how to combat this as it seems kind of buggy.

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #4
Not AFAIK, sorry. They will need to change this.

"Will Chamberlain" <wi**************@devdex.com> wrote in message
news:ON*************@TK2MSFTNGP15.phx.gbl...
Thanks for the prompt response Tim. The only problem is that I am on a
shared host (Brinkster) so I don't have physical access to IIS. Are
there any workarounds for this given my current situation?

*** Sent via Developersdex http://www.developersdex.com ***

Nov 19 '05 #5
You could try to replace .. with the proper absolute or application web root
relative path...
--
Patrice

"Will Chamberlain" <wi**************@devdex.com> a écrit dans le message de
news:ez**************@TK2MSFTNGP14.phx.gbl...
Another interesting aspect of this error:

When I try to visit my site by typing in http://subdomain.mydomain.com I
get the error in question.

If I then type out the full URL that the subdomain references
http://www.mydomain.com/subdomain I do not get the error. After
visiting http://www.mydomain.com/subdomain I can type in
subdomain.mydomain.com, click REFRESH, and the page loads perfectly. I
don't know how to combat this as it seems kind of buggy.

*** Sent via Developersdex http://www.developersdex.com ***

Nov 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
1
by: Tom | last post by:
Hi, I have a stored procedure and a method to insert data to it. i = (int)SqlHelper.ExecuteScalar (Web.CommonBase.ConnectionString, CommandType.StoredProcedure, "AddProducts", arParms); I...
3
by: COHENMARVIN | last post by:
I put the following code in my asp.net page: dbPath = MapPath("/FBDB/db1_newport2003.mdb") strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;" strConnect = strConnect & "Data Source=" & dbpath & ";"...
5
by: Nathan Sokalski | last post by:
When running a page I am working on, I recieve the following error: Cannot use a leading .. to exit above the top directory. I suspect this has something to do with the problem I posted in a...
2
by: moondaddy | last post by:
I have a simple sample site I'm building in asp.net 2.0. I created a master page and a default.aspx content page in the project's root directory. Then I created a subfolder called content and...
12
by: GRoll35 | last post by:
I get 4 of those errors. in the same spot. I'll show my parent class, child class, and my driver. All that is suppose to happen is the user enters data and it uses parent/child class to display...
1
by: webonomic | last post by:
A number of topics ask how to solve the "Cannot use a leading .. to exit above the top directory" error. I am having the same problem with an asp.net 2.0 website. The site works fine on...
6
by: Don Lancaster | last post by:
I need to progrmatically do this inside a loop this.fh03.value = fixFloat (Harms, numPoints) ; with the numbers changing per an index. If I try curHvals = "03" ; // (derived from...
4
by: John Nagle | last post by:
One can argue over tab vs. space indentation, but mixing the two is just wrong. Why not have CPython report an error if a file has both leading tabs and leading spaces? I know that was proposed...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.