difference between Server.MapPath and HostingEnvironment.MapPath?

2

(In order to Enlarge images Please Right Click and Open images in New Tab)

In ASP.NET MVC WEBAPI APPLICATION WE ARE GOING TO USE HostingEnvironment.MapPath.

LET’S SEE THE difference between Server.MapPath and HostingEnvironment.MapPath?

Server.MapPath() eventually calls HostingEnvironment.MapPath(), but it creates a VirtualPathobject with specific options:

The VirtualPath object passed to HostingEnvironment.MapPath() is constructed like this:

VirtualPath.Create(path, VirtualPathOptions.
AllowAllPath|VirtualPathOptions.AllowNull);





w2
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s