Solved

File path on hosting server doesnt work

Posted on 2013-01-16
2
232 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
jquery datatables, asp.net MVC 9 60
Technology Resume 7 67
Older JQuery functionality is not in the newer JQuery 1.4.4 versions, 6 46
How to repeat the data 4 30
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

740 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