• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 238
  • Last Modified:

File path on hosting server doesnt work

I'm using Radupload control and it works fine. I added one line of code to look for permission and this one line throws an error on the hosting server: the absolute path of the file is required.

It works on the my local machine How can I change it to work on the hosting server?

foreach (UploadedFile file in RadUpload1.UploadedFiles)
                    {
                                               
                        var readPermission = new FileIOPermission(FileIOPermissionAccess.Read, file.FileName);
                        permissionSet.AddPermission(readPermission);
0
Camillia
Asked:
Camillia
1 Solution
 
deepu chandranCommented:
HI,

Try ,
1) HttpContext.Server.MapPath to get the physical path of the file from the virtual path
2) Check whehter any Javascript error on the page due to the HTTP handler

-- Deepu
0
 
CamilliaAuthor Commented:
#1: but the folder is on the local machine and the code is on the hosting server

#2: why would Javacript mess up the file permission or that line of code?
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now