473,386 Members | 2,129 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Problems with Server.Mappath after Error handled in Global.asax (not the missing ~-problem!)

Hi

I have a problem related to global.asax and the Server.Mappath-Method.

I collect all unhandled errors in the Application_Error in
Global.asax.
According to the type of error I redirect/transfer the user to the
correct error page.

DataException --~/DBError.aspx
HttpException --~/XyxError.aspx

This works fine for the redirect or transfer. But INSIDE the loaded
error page my ~/Xyz.gif or ~/Xyz.aspx are mapped wrong (including the
subfolder), if the originally error happend in a subfolder of the main
app.

http://www.myurl.com/PageThatRaisedTheError.aspx --everything is ok
http://www.myurl.com/SubFolder/PageT...dTheError.aspx -->
Error.aspx is loaded, but every link inside Error.aspx starting with
~/ is resolved as http://www.myurl.com/SubFolder/ instead of http://
www.myurl.com/

It looks like that my base directory change to the subfolder, so that
Mappath interprets the subdirectoy as application base.

On my development machine (development server, latest Patches for VS
2005 installed) everything works fine, but on my hosting machine (IIS)
the problem appears.

Has someone any idea or solution? My search on the forums didn't
helped me ... maybe you?

Thanks
Michael

Feb 3 '07 #1
0 1254

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

Similar topics

7
by: A P | last post by:
I receive an error like this: Server.MapPath() error 'ASP 0172 : 80004005' Invalid Path /conn.asp, line 2 The Path parameter for the MapPath method must be a virtual path. A physical path...
1
by: Neil | last post by:
Hello - In every project I try to compile and run, I'm getting a parser error on global.asax (pasted below). I have rebuilt and recompiled, and this happens on every project on my machine, no...
0
by: YaKs | last post by:
Hi, I am trying to handle th HttpException raised when you upload a file too big. I changed the property maxRequestLength and I set it to 10000, but I what to notice the user that the file is...
2
by: tshad | last post by:
I have my error handling set up in Global.asax: Sub Application_Error(Sender As Object, E as EventArgs) In this procedure I call a function in a dll that will write out to a history file. ...
8
by: Doug | last post by:
Visual Studio 2005, SQL Server 2000, ASP.NET/VB.NET Not allowed to use the ASPNET machine account in SQL Server (very strict environment). Need to use Windows authentication, so we use...
5
by: Eric Layman | last post by:
Hi everyone, Currently Im using Global.asax.vb to capture any errors and to send them via email to me. But I didn't get any emails when I purposely crash the web application. May I know what...
0
by: JB | last post by:
Lots of problems ive managed to work through, but this one is causing me much grief. Description: An error occurred during the parsing of a resource required to service this request. Please...
4
by: Joe | last post by:
Hello all! I added a Global.asax to my application. I'm using the Application_BeginRequest event. Everything works fine in my development enviorment but when I publish the web site the...
1
by: kyrillos | last post by:
hello, i get the common error message when using the Server.MapPath() error. which is Server.MapPath() error 'ASP 0173 : 80004005' Invalid Path Character An invalid character was specified in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.