Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
3
Reply
File Upload Path in ASP.NET hosted Application
Mark Tabor
May 29 2016 6:56 AM
297
Reply
I have a web application in which i am saving files into the directory placed onto the root folder of my application , it works fine locally but when i hosting the application into the hosting environment it is not saving my file , locally i have save a filePath into the web.config like that
<add key="FilePath" value="~/Uploads/" />
and i was accessing it using that statement
Dim FilePath As String = ConfigurationManager.AppSettings("FilePath").ToString
How to achieve that on hosting server i have already tried
HttpContext.Current.Server.MapPath("~/Uploads/")
as well as
Server.MapPath("~/Uploads/") but it shows the local path address of my directory hierarchy .
Thanks in advance
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
3
)
Next Recommended Forum
how to generate report client wise in c#
How to fix error "CS0103: The name 'url' does not exist in "