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

Home Posts Topics Members FAQ

Server.MapPath not available in Session_End

Hello All,

I recognized that Server.MapPath doesnt work in
Session_End. Is there any other way to get the path? I
dont think so, but I am hoping for other ways.
Nov 19 '05 #1
2 1630
Use can use HttpRuntime.AppDomainAppPath to get your application directory
then use System.IO.Path.Combine to do the rest.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hello All,

I recognized that Server.MapPath doesnt work in Session_End. Is
there any other way to get the path? I dont think so, but I am hoping
for other ways.


Nov 19 '05 #2
THanks buddy!

-----Original Message-----
Use can use HttpRuntime.AppDomainAppPath to get your application directorythen use System.IO.Path.Combine to do the rest.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hello All,

I recognized that Server.MapPath doesnt work in Session_End. Is there any other way to get the path? I dont think so, but I am hoping for other ways.


.

Nov 19 '05 #3

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

Similar topics

13
by: John Rebbeck | last post by:
I've got the directory f:\Company\Product set as web shared so it's got a virtual directory in the default web site on my test server's IIS. If I try to use Server.MapPath in that site it returns a...
4
by: Laphan | last post by:
Hi All Sorry to be irate, but the whole concept of Server.MapPaths really has me in a tiswas!! In order to confirm once and for all, could you please advise me on the following: 1) There...
3
by: Ben Fidge | last post by:
I use the session_end in global.asax to perform clean-up of a temporary shopping cart table. Shoppping Cart items are stored with a session id in the table, and when a session ends a small rountine...
4
by: Andy Fish | last post by:
Hello, I've found that if I try to do a Server.MapPath() in the Session_End event, it fails with an exception. is this right? any simple way to work round it? is there any documentation...
4
by: Colin | last post by:
In the code behind server.mappath works fine, yet in a class I get 'Server operation is not available in this context'. System.Web.HttpApplication is inherited in the class, why is this so? ...
3
by: Ricardo Vazquez | last post by:
Hi! I have a new problem with this SCENARIO I already described in a previous post: - PBX (a private telephone exchange or switch) - A Telephony Server Application running on computer "A" (it...
7
by: teo | last post by:
I need to use the 'Server.MapPath' function in the 'Session_End' event of the Global.asax file (to reach a folder and the clean some temporary files up), but it doesn't work: Sub...
3
by: rn5a | last post by:
Server.MapPath returns the physical file path that corresponds to the specified virtual path whereas Request.MapPath maps the specified virtual path to a physical path. Assuming that a file named...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
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: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.