Server.MapPath - Parent Paths Disabled - Windows 2003 IIS 6 - WorkAround

L

Lovely Angel

Dear Friends
Hope you doing great.

I have recently shifted to a webhost which is Using Windows 2003 and IIS
6. Now my application was working fine earlier but now I am facing this
problem

Server.MapPath() error 'ASP 0175 : 80004005'
Disallowed Path Characters
/backend/_add_two.asp, line 103
The '..' characters are not allowed in the Path parameter for the
MapPath method.

Now I found out that this error is because of default setting of Enable
Parent Paths is disabled by default in IIS 6.0.
More info can be found at support.microsoft.com/?id=332117.

Now what if my service provider cant change that setting. What is the
work around, how to access the directory movving up down. Any help will
be appreciated.

Love
Lovely
 
S

Steven Burn

I don't see any reason for their not being able to enable it as my host
upgraded to WS2003 w/IIS6 when it was released and I've had no problems with
paths so far. Might want to get onto them about the reasons for it being
disabled ;o)

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
 
C

Carol Carrot

That is exactly not the answer to either of his questions.
Why not just answer the questions or step aside?
 
J

joker

Microsoft seems to think that it should be disabled on IIS 4 & IIS 5 as
well.

Check out the following article over at http://support.microsoft.com

184717 AspEnableParentPaths MetaBase Property Should Be Set To False

From what it says it sounds like they thing it should be disabled.

Since you didn't post the code that creates this error I can't think of
any workarounds.

If you post the code we can help you better.
 
J

Jeff Cochran

Dear Friends
Hope you doing great.

I have recently shifted to a webhost which is Using Windows 2003 and IIS
6. Now my application was working fine earlier but now I am facing this
problem

Server.MapPath() error 'ASP 0175 : 80004005'
Disallowed Path Characters
/backend/_add_two.asp, line 103
The '..' characters are not allowed in the Path parameter for the
MapPath method.

Now I found out that this error is because of default setting of Enable
Parent Paths is disabled by default in IIS 6.0.
More info can be found at support.microsoft.com/?id=332117.

Now what if my service provider cant change that setting. What is the
work around, how to access the directory movving up down. Any help will
be appreciated.

The service provider *can* change it, the problem is whether they will
or not. The solution is not to use parent paths if they're
disallowed. Either put the database file in a folder that doesn't
require parent paths to reach it, use a physical file path instead of
Server.MapPath, or use a different provider. There are no "work
arounds" only changes to match the server's configuration.

Jeff
 
J

Jeff Cochran

That is exactly not the answer to either of his questions.
Why not just answer the questions or step aside?

Now I'm sorry I gave you an answer...

Jeff
 
R

Ray Costanzo [MVP]

Carol, as many have mentioned to you before in your previous responses like
this, there are times that instead of giving an answer to a question, you
give a solution to the underlying problem. That will often go much further
than just a flat-out answer to a question, and I think you'll find most
people appreciate solutions even if not at first.

Ray at work
 
C

Carol Carrot

there are times that instead of giving an answer to a question, you give a
solution to the underlying problem That will often go much >further than
just a flat-out answer to a question

Not this time, though does it?
Why not just try giving the answer, isnstead of doing the other guy's
thinking?

The guy was thoughtful enough to demonstrate that he knew the underliying
issue.
He even said that he doesn't want to hear about the ISP enabling the parent
paths.
 
J

Jeff Cochran

I'm looking, but I can't find that your response has provided an
answer to the OP's underlying question. Or even a suggestion about
possible other avenues. Am I missing something?

Jeff
 
A

Aaron [SQL Server MVP]

Carol has a habit of doing this. Bitching about how other people are not
solving the problem. Yet she can't be bothered to do any better...

--
http://www.aspfaq.com/
(Reverse address to reply.)
 
S

Steven Burn

He even said that he doesn't want to hear about the ISP enabling the
parent

He did......?.... can you point that bit out to me please as I've been
through his post numerous times and can't find any part that mentions his
not wanting to hear about the ISP enabling it for him.....

As for my reply, as has already been pointed out by Jeff Cochran, there is
no "work-around" other than to either re-code whatever the OP is doing to
match the servers config, or ask the ISP to enable parent paths.

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
 
P

Pauline Parrot

You do not need to show him that know better than he does about his
underlying "issues".

If you do that with an ASP application, everyone loses. A company gets what
they didn't ask for, because you are being all helpful and clever.

Just find out what the requriements are, and deliver that.

the question was "what if my service provider cant change that setting. What
is the
work around?"

The answer is not "I don't know why your provider can't change the setting".





Steven Burn said:
He even said that he doesn't want to hear about the ISP enabling the parent
paths.

He did......?.... can you point that bit out to me please as I've been
through his post numerous times and can't find any part that mentions his
not wanting to hear about the ISP enabling it for him.....

As for my reply, as has already been pointed out by Jeff Cochran, there is
no "work-around" other than to either re-code whatever the OP is doing to
match the servers config, or ask the ISP to enable parent paths.

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!


give
a
solution to the underlying problem That will often go much >further than
just a flat-out answer to a question

Not this time, though does it?
Why not just try giving the answer, isnstead of doing the other guy's
thinking?

The guy was thoughtful enough to demonstrate that he knew the underliying
issue.
He even said that he doesn't want to hear about the ISP enabling the parent
paths.
 
R

Ray Costanzo [MVP]

You've heard the "think outside the box" saying before, right? That's what
responses such as Steve's are about. And, well, as far as I'm concerned and
hopefully the majority of the world, that's the right way to think.

Imagine you're in a newgroups whose topic is Fords and you read this post:
"I have one of those Fords that is prone to burst into flames because of the
poorly desinged ignition system, so I'm trying to mount a fire extinguisher
in my console. I can't figure out how to put holes in the console for the
fire extinguisher brackets though."

Which response would you think is more appropriate?

A) Use a drill.

B) Don't mount a fire extinguisher. Take your car to a Ford dealership and
have the ignition replaced. They'll do that for free by order of recall.

Ray at work
 
S

Steven Burn

You do not need to show him that know better than he does about his
underlying "issues".

I never said I knew better than he did.....
The answer is not "I don't know why your provider can't change the
setting".

It is if they've not given sufficient answers as to why they "can't change
the setting".....

Wise man once told me..... "if you don't know something, ask!"

As has already been mentioned, there is no work around, thus, the OP
_should_ really ask his/her ISP _why_ they "can't enable it" or if they
"will enable it"

If you know the answer to his question however, please, feel free to provide
it (instead of simply criticizing the replies that have already been given).

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
 
P

Pauline Parrot

Which of the answers was the right one?
#1 ?
2
3
4
5
?

how many do we have to wad thru before we get the answer to his specific
question?
 
S

Steven Burn

..... and here's me thinking "bad archery" was caused by not enough
practice....... silly me.

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
 
J

joker

Yes basically unless "Lovely Angel" actually posts some code there is
nothing else that can be done. At least that is my understanding.

Also you & Carol Carrot seem to make a habit of complaining when a
person doesn't post enough information for us to help that user, but you
are whining that we didn't give a solution. I say to both of you (Carol
Carrot & Pauline Parrot) need to grow up, this isn't kindergarten after all.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top