About 329,000 results
Open links in new tab
  1. Server.MapPath ("."), Server.MapPath ("~"), Server.MapPath ...

    Dec 15, 2013 · Server.MapPath("/") returns C:\Inetpub\wwwroot Server.MapPath("/shop") returns D:\WebApps\shop If Path starts with either a forward slash (/) or backward slash (\), the …

  2. What is the equivalent of Server.MapPath in ASP.NET Core?

    Mar 21, 2018 · Use IHostingEnvironment.WebRootPath and then use Path.Combine with second argument assigned to target directory. See Server.MapPath Equivalent in ASP.NET Core for …

  3. c# - Cannot use Server.MapPath - Stack Overflow

    Jun 19, 2012 · What I must do to make Server.MapPath work? I have using System.Web; what else? When I type Server there is no quick result option (intelli-sense) for Server. Any help?

  4. Using Server.MapPath in external C# Classes in ASP.NET

    Server.MapPath works great of course for ASPX and their code-behind pages, but that doesn't exist in another class file. I tried HostingEnvironment.MapPath(), but that complains that the …

  5. Microsoft Web API: How do you do a Server.MapPath?

    May 15, 2013 · 0 Since Server.MapPath() does not exist within a Web Api (Soap or REST), you'll need to denote the local- relative to the web server's context- home directory. The easiest way …

  6. How to get absolute path in ASP.Net Core alternative way for …

    May 16, 2017 · 63 How to get absolute path in ASP net core alternative way for Server.MapPath I have tried to use IHostingEnvironment but it doesn't give proper result.

  7. c# - What is the difference between Server.MapPath and ...

    Does Server.MapPath() have any advantages over HostingEnvironment.MapPath()? My original problem was mapping the file path on a server when the HttpContext is not present and I …

  8. Using Server.MapPath () inside a static field in ASP.NET MVC

    For example, Server.MapPath() allows a path of "files/file1.doc". It uses the current context to determine the path of the current page, for example, and then creates the relative path from …

  9. Server.Mappath in C# classlibrary - Stack Overflow

    Jul 29, 2009 · How can i use the server.mappath method in a C# class library class ,which acts as my BusinessLayer for My ASP.NET WEbsite

  10. Server.MapPath in ASP.NET Core Razor page - Stack Overflow

    Oct 3, 2022 · Server.MapPath in ASP.NET Core Razor page Asked 3 years, 3 months ago Modified 3 years, 3 months ago Viewed 2k times