Solved

File path on hosting server doesnt work

Posted on 2013-01-16
2
225 Views
Last Modified: 2013-02-10
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
Comment
Question by:Camillia
2 Comments
 
LVL 8

Accepted Solution

by:
deepu chandran earned 500 total points
ID: 38785956
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
 
LVL 7

Author Comment

by:Camillia
ID: 38787816
#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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now