Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

File path on hosting server doesnt work

Posted on 2013-01-16
2
Medium Priority
?
237 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 2000 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

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…
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

636 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