Sachin Kainth
Sachin Kainth

Reputation: 46760

Server.MapPath on a remote server

I have 4 front end servers. Only one of those servers (lets call it server A) has a bunch of images and documents.

Now, I have this line of code that works in a single front end environment

HttpContext.Server.MapPath("/temp");

Now, what I'd like to do is refer to the mapped path of the /temp folder not of the server that the user hits from the load balancer but the mapped path of the /temp folder of server A.

How is this possible?

Upvotes: 1

Views: 1429

Answers (1)

spender
spender

Reputation: 120508

I think you'd be better off storing the resource folder location in config of the website and using System.IO.Path.Combine to map paths.

Upvotes: 2

Related Questions