Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have a problem executing some ASP.Net pages in a certain setup...

 

I have a virtual directory setup on my local computer inside the wwwroot directory called EMSAssist. When I create a deployment project, the project gets placed on a test destination webserver called "www.nicemtech.com/emsassist". When I try to go back to the main menu from the following link (inside the website): "http://www.nicemtech.com/emsassist/Scheduling/Admin/MemberAdmin.aspx", it works fine without a problem...

 

A domain name has been registered (http://www.emsassist.com) where the website will now be deployed. When I try now to go back to the main menu from the website (from the following link: "http://www.emsassist.com/Scheduling/Admin/MemberAdmin.aspx", I get the following System.Web.Httpexception error:

"Cannot use a leading .. to exit above the top directory".

 

I know this error has been caused by the following code in the aspx page that caused the error:

<code>

<%@ Register TagPrefix="YTCIWebUserControls" TagName="SchedulingAdminLogout" Src="../../UserControls/NCVACEMT/SchedulingAdminLogout.ascx" %>

</code>

 

It seems when executing from the test web server, it's fine (5 levels down from the root - http://www.nicemtech.com/emsassist/Scheduling/Admin/MemberAdmin.aspx).

 

However, when executing from the actual domain name, it crashes (4 levels down from the root - http://www.emsassist.com/Scheduling/Admin/MemberAdmin.aspx).

 

I'm explicitly stating to grab my usercontrol from the following pathname (../../UserControls/NCVACEMT/SchedulingAdminLogout.ascx), which, doesn't exist in the domain name site because of the extra "../" in my path, but is fine with my testwebsite...

 

Is there any way for me to somehow seemlessly have the two different sites working without changing the pathname of the test site and production site to two different paths?

Thanks,

 

Bill Yeager (MCP, BCIP)

Microsoft Certified Professional

Brainbench Certified Internet Professional, .Net Programmer, Computer Programmer

YeagerTech Consulting, Inc.

  • Moderators
Posted
It will not allow you to go back from the root of the wwwroot, you need to fix your hierachy so it doesn't happen. (I didn't take the time to read the specifics of your post, but that's the brunt of it)
Visit...Bassic Software
Posted
It will not allow you to go back from the root of the wwwroot' date=' you need to fix your hierachy so it doesn't happen. (I didn't take the time to read the specifics of your post, but that's the brunt of it)[/quote']

 

I added a "~" onto the beginning of my pathname which worked fine.

Thanks,

 

Bill Yeager (MCP, BCIP)

Microsoft Certified Professional

Brainbench Certified Internet Professional, .Net Programmer, Computer Programmer

YeagerTech Consulting, Inc.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...