Click here to Skip to main content
15,914,014 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi After deploy project on iis i upload file is not upload on server.
its return a error:

Could not find a part of the path 'D:\HTTP_DOCS\OFF_INVOICE\TotMasterExcel\TotMaster(mcd2 Category Manager)_17-8-2012-19-55-1.xlsx'.


any one can me. how i can remove this problem.

thanks & regards
ganpat
Posted
Updated 17-Aug-12 10:46am
v2
Comments
AmitGajjar 17-Aug-12 10:53am    
how can you guess without looking into your code ? please post your code for uploading a file on server.

Clearly the error speaks for itself here. Your application is using a hardcoded path to a file on your development system that doesn't exist in the server where you deployed the application.
You get rid of the problem by identifying the path on your server where the file drops are going to occur, and you make that path a variable in your web.config appsettings so that you can configure this value when necessary in your deploy environment.
 
Share this answer
 
Comments
Espen Harlinn 28-Aug-12 9:32am    
Nice reply :-D
fjdiewornncalwe 28-Aug-12 10:01am    
Thanks Espen.
Check whether the path exists and the file exists in that path.

you mentioned when you uploading you get the error..how you are setting this path for upload? Have you hardcoded, Just make sure the path exists whenever you hard codes the path and its advisable to keep those paths as key value in appsettings in web.config
 
Share this answer
 

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

  Print Answers RSS


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