473,883 Members | 2,197 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

server.mappath vs. request.mappath

Can anyone tell me the difference between server.mappath and request.mappath ?
Why would I use one vs. the other?
Mar 10 '07 #1
2 4371
tparks69 wrote:
Can anyone tell me the difference between server.mappath and request.mappath ?
Why would I use one vs. the other?
It doesn't matter. Server.MapPath calls Request.MapPath .

--
Göran Andersson
_____
http://www.guffa.com
Mar 11 '07 #2
re:
Can anyone tell me the difference between server.mappath and request.mappath ?
None.

re:
Why would I use one vs. the other?
They perform exactly the same function.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"tparks69" <tp******@discu ssions.microsof t.comwrote in message
news:2C******** *************** ***********@mic rosoft.com...
Can anyone tell me the difference between server.mappath and request.mappath ?
Why would I use one vs. the other?

Mar 11 '07 #3

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

Similar topics

6
10342
by: Christopher Brandsdal | last post by:
Hi! I get an error when I run my code Is there any other way to get te information from my form? Heres the error I get and the code beneath. Line 120 is market with ''''''''''''Line 120''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
2
339
by: Jim M | last post by:
I am using javascript to build XML and pass it to the .Net Server Side VB Script page. So I build the XML string as follows in javascript... xml_string = "<tagname>" + escape(var_to_pass) + "</tagname>" On the server I use httputility.urldecode(hidden_xml_string.value) to decode the XML.
3
1691
by: Jake | last post by:
How can I pass the results of a form field submitted to this statement below? <% Set MyFileObj = Server.CreateObject("Scripting.FileSystemObject") '### This Works '###Set MyTextFile = MyFileObj.OpenTextFile(Server.MapPath("body.txt")) '### This Doesnt work Set MyTextFile = MyFileObj.OpenTextFile(Server.MapPath(" & request.form("MyFileName") & "))
4
3399
by: clintonG | last post by:
I'm using the intrinsic Request object wrong and need some help with this one. I wrote a class file for some XMLTextWriter tasks and in the class file I want to use a conditional to determine if the application is running on the host provider's web server or the web server on my local development machine. Here is my broken code... string fileOut; // Run-time: running on host provider's server if(Request.ServerVariables ==...
3
7276
by: Kian Goh | last post by:
Hi, Can somebody tell me why can't I use string strPath = Server.MapPath(Request.ApplicationPath); in protected void Application_Start(...) It compiles ok but an unhandled exception occurred during the execution. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
0
2831
by: S. Berwanger | last post by:
Hallo, I have a PDA (WinCE 4.2) application which using a XML-Webservice for data exchanging. Both parts are developed with VS2003. When I'm using IIS5.1 the system runs without problems. But if I use an Win2003 Server with IIS6 for my webservice I am receiving the error: Server found request content type to be 'text/html', but expected 'text/xml'
0
1234
by: Mak | last post by:
hi please this code i cant understand what it do if some knows please send to me. mak
7
6254
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 Session_End(ByVal sender As Object, ByVal e As EventArgs) Dim myPath As String = (Server.MapPath("../public/MyFolder/") End Sub
3
15084
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 Hello.aspx resides in C:\Inetpub\wwwroot\MyFolder, the output of both Response.Write(Server.MapPath("Hello.aspx")) & Response.Write(Request.MapPath("Hello.aspx"))
0
9798
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11160
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10766
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10422
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7978
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7136
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6007
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4230
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3241
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.