you can try using this
System.Web.HttpContext.Current.Server.MapPath(path);
or use HostingEnvironment.MapPath
System.Web.Hosting.HostingEnvironment.MapPath(path);
More Related Contents:
- Unity Scripts edited in Visual studio don’t provide autocomplete
- Visual Studio displaying errors even if projects build
- How do you quickly find the implementation(s) of an interface’s method? [duplicate]
- How do I put an image in VisualStudio with C#? [closed]
- How to get the + – / * from char
- Can I automatically increment the file build version when using Visual Studio?
- How to get the connection String from a database
- Interop type cannot be embedded
- Does C# 8 support the .NET Framework?
- Detect target framework version at compile time
- Getting “type or namespace name could not be found” but everything seems ok?
- Why is cross thread operation exception not thrown while running exe in bin\Debug
- Parsing Visual Studio Solution files
- WebAPI StreamContent vs PushStreamContent
- Visual Studio – Resx File default ‘internal’ to ‘public’
- How to enable Nullable Reference Types feature of C# 8.0 for the whole project
- Enable SSL in Visual Studio
- No Source available
- Writing to output window of Visual Studio
- How do I generate a constructor from class fields using Visual Studio (and/or ReSharper)?
- How to use a class from one C# project with another C# project
- visual studio 2005 designer moves controls and resizes Form
- Why does TestInitialize get fired for every test in my Visual Studio unit tests?
- How can I make implementation of an interface produce an auto property instead of NotImplementedException?
- Can I commit changes to actual database while debugging C# in Visual Studio?
- Is there a way to suppress warnings in C# similar to Java’s @SuppressWarnings annotation?
- Read a Registry Key
- Xamarin : Android : System.UnauthorizedAccessException: Access to the path is denied
- WCF, Interface return type and KnownTypes
- Custom Color Palette in Visual Studio Color Property Editor