Click here to Skip to main content
15,914,943 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,
I have created a file in my C drive and moving to remote folder but if i use break point its working fine and without breakpoint its not working also its working fine before hosting the site.
What may be the problem? Pls help to solve this issue. Thanks in advance.
Posted
Comments
Joezer BH 8-Aug-13 7:40am    
what exception are you getting, specify some more details, and perhaps paste some code
Member 9762654 8-Aug-13 7:48am    
File.Move("C:\\out.html", "C:\\Documents and Settings\\divyar\\My Documents\\Visual Studio 2010\\Projects\\FMSProduction\\FMSProduction\\comparedtrans\\out.html");

not getting any exception i am loading this html in iframe. Its working fine in my localhost in remote its not working but in remote working while debugging
Joezer BH 8-Aug-13 7:50am    
In the example you didn't move to a remote server, it's a different location on the local machine, and it should work just fine (provided that you have permissions)
Member 9762654 8-Aug-13 7:52am    
ya but while moving to remote its not working
Joezer BH 8-Aug-13 7:54am    
What problem are you getting?
see optional solution below

1 solution

If you only have a problem on the remote server you may need impersonation,
see the following thread:
Copy a file to shared network location with C#[^]

Cheers,
Edo
 
Share this answer
 
Comments
Member 9762654 8-Aug-13 8:07am    
if this is the problem, the file should not move while debugging also know?
Joezer BH 8-Aug-13 8:21am    
you showed code for local, is that where it fell or is there other code?
Member 9762654 8-Aug-13 8:23am    
there is other code instead of local path i have to move to the folder which i created in my solution
Joezer BH 8-Aug-13 8:27am    
Not clear enough

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900