Solved

File path on hosting server doesnt work

Posted on 2013-01-16
2
234 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

726 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