?
Solved

Failed to Map the Path, VB.NET User Control

Posted on 2004-10-05
7
Medium Priority
?
749 Views
Last Modified: 2011-10-03
In the application that I own, there are several times when an email will be automatically generated.  This functionality works everytime except once.  I believe the error in this one instance is due to a user control that is also involved in this particular functionality.  For this particular email generation, a user goes into a particular page, fills out a comment in the user control located on this page, and submits the comment through the user control (generating an email).

How do I deal with path mapping errors, when user controls are involved?




0
Comment
Question by:shorriga
[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
  • 4
  • 3
7 Comments
 
LVL 6

Expert Comment

by:Praesidium
ID: 12231410
What is the error specifically?
0
 
LVL 6

Expert Comment

by:Praesidium
ID: 12231427
Also, using a ~ in your path, if it's not a server path, will tell your usercontrol to start at the root of your app.  For instance, if you redirect to a page that is in /media/default.aspx, then from another folder, you could specify "~/media/default.aspx".  If it is a server path that is not mapping correctly, then you may have other problems.  Can you be more specific?
0
 

Author Comment

by:shorriga
ID: 12237137
Server Error in '/MyApplication' Application.

Failed to map the path '/MyApplication/SubFolder/File.txt'.

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: Failed to map the path

This is the error.  I think it is because I try to call the "File.txt" file from a sub in the user control.  The code I use, works for all other triggered emails except this one that involves the user control.

0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 6

Accepted Solution

by:
Praesidium earned 1500 total points
ID: 12237758
in your code try to call it using "~/SubFolder/File.txt" where MyApplication is the root.  Can we see the code?
0
 

Author Comment

by:shorriga
ID: 12241491
I tried that in my code and it worked for a little while.  Then it started crashign again.  Any ideas?
0
 
LVL 6

Expert Comment

by:Praesidium
ID: 12242673
Can I see the code for the control you are submitting from?
0
 

Author Comment

by:shorriga
ID: 12247678
I moved everything from the user control to the actual page and then ran the program.  The call for the email trigger now works as the mapping does not get screwed up by the user control.

The "~" does help, but it was not the complet solution due to user control complications.  If there was NO user control, it would have COMPLETELY fixed it.
THanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

770 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