Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / February 2008

Tip: Looking for answers? Try searching our database.

Permission Issues?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Claus Fuss - 31 Jan 2008 04:24 GMT
To make it simple, I'm doing this

Dim Location As String = AppDomain.CurrentDomain.BaseDirectory &  
"reports\baseReport1.xls"
System.IO.File.Copy(AppDomain.CurrentDomain.BaseDirectory &  
"reports\baseReport.xls", Location)
Response.Redirect("~/reports/baseReport1.xls")

Works fine in my computer, no problem, But in the server don't copy the  
file so the Response.Redirect show me a Page Not Found message.

I gave all permissions to All User but still don't copy how can I solve  
this, help  please?
Michael Nemtsev [MVP] - 31 Jan 2008 11:23 GMT
Hello Claus,

are u calling this from asp.net?
U shoud use Server.MapPath for this then http://msdn2.microsoft.com/en-us/library/system.web.httpserverutility.mappath.aspx

---
WBR,
Michael  Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour 

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

CF> To make it simple, I'm doing this
CF>
CF> Dim Location As String = AppDomain.CurrentDomain.BaseDirectory &
CF> "reports\baseReport1.xls"
CF> System.IO.File.Copy(AppDomain.CurrentDomain.BaseDirectory &
CF> "reports\baseReport.xls", Location)
CF> Response.Redirect("~/reports/baseReport1.xls")
CF>
CF> Works fine in my computer, no problem, But in the server don't copy
CF> the  file so the Response.Redirect show me a Page Not Found message.
CF>
CF> I gave all permissions to All User but still don't copy how can I
CF> solve  this, help  please?
CF>
Claus Fuss - 31 Jan 2008 23:56 GMT
I do that and still doesn't copy the file, another Idea please?

En Thu, 31 Jan 2008 06:23:49 -0500, Michael Nemtsev [MVP]  
<nemtsev@msn.com> escribió:

> Hello Claus,
>
[quoted text clipped - 19 lines]
> CF> solve  this, help  please?
> CF>
Claus Fuss - 10 Feb 2008 19:11 GMT
Im using now Server.MapPath and still having the same issue
nothing copies what could it be

En Thu, 31 Jan 2008 06:23:49 -0500, Michael Nemtsev [MVP]  
<nemtsev@msn.com> escribió:

> Server.MapPath

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.