[InvalidOperationException: Error saving file sample.xlsx]

Feb 26, 2014 at 3:13 PM
Hello there,
i'm getting an error saving file when i publish the web site.
it is running good on compiler but not when it published.
i searched about this error but cant find solution.
what can i do ?

whole error is like this ;




[DirectoryNotFoundException: Could not find a part of the path 'c:\made4me\madeforme26021809.xlsx'.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +216
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath) +2481
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) +229
System.IO.FileStream..ctor(String path, FileMode mode) +106
OfficeOpenXml.ExcelPackage.Save() +610

[InvalidOperationException: Error saving file c:\made4me\madeforme26021809.xlsx]
OfficeOpenXml.ExcelPackage.Save() +2128
Web.OrderList.BtnExcel_Click(Object sender, EventArgs e) +4757
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +154
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3707

regards
Feb 27, 2014 at 3:52 PM
Do you create file from template?
It shows directory not found. means the output directory is not present in your webserver.
Please post some code or just check made4me directory is present and location is correct.