{"action":"created","issue":{"url":"https://api.github.com/repos/nopSolutions/nopCommerce/issues/2689","repository_url":"https://api.github.com/repos/nopSolutions/nopCommerce","labels_url":"https://api.github.com/repos/nopSolutions/nopCommerce/issues/2689/labels{/name}","comments_url":"https://api.github.com/repos/nopSolutions/nopCommerce/issues/2689/comments","events_url":"https://api.github.com/repos/nopSolutions/nopCommerce/issues/2689/events","html_url":"https://github.com/nopSolutions/nopCommerce/issues/2689","id":268634343,"number":2689,"title":"\"~/files/importexport\" not being created on azure webapp with nop 4.00","user":{"login":"rolandh","id":1109554,"avatar_url":"https://avatars2.githubusercontent.com/u/1109554?v=4","gravatar_id":"","url":"https://api.github.com/users/rolandh","html_url":"https://github.com/rolandh","followers_url":"https://api.github.com/users/rolandh/followers","following_url":"https://api.github.com/users/rolandh/following{/other_user}","gists_url":"https://api.github.com/users/rolandh/gists{/gist_id}","starred_url":"https://api.github.com/users/rolandh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rolandh/subscriptions","organizations_url":"https://api.github.com/users/rolandh/orgs","repos_url":"https://api.github.com/users/rolandh/repos","events_url":"https://api.github.com/users/rolandh/events{/privacy}","received_events_url":"https://api.github.com/users/rolandh/received_events","type":"User","site_admin":false},"labels":[{"id":91137043,"url":"https://api.github.com/repos/nopSolutions/nopCommerce/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":{"login":"skoshelev","id":16875599,"avatar_url":"https://avatars3.githubusercontent.com/u/16875599?v=4","gravatar_id":"","url":"https://api.github.com/users/skoshelev","html_url":"https://github.com/skoshelev","followers_url":"https://api.github.com/users/skoshelev/followers","following_url":"https://api.github.com/users/skoshelev/following{/other_user}","gists_url":"https://api.github.com/users/skoshelev/gists{/gist_id}","starred_url":"https://api.github.com/users/skoshelev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skoshelev/subscriptions","organizations_url":"https://api.github.com/users/skoshelev/orgs","repos_url":"https://api.github.com/users/skoshelev/repos","events_url":"https://api.github.com/users/skoshelev/events{/privacy}","received_events_url":"https://api.github.com/users/skoshelev/received_events","type":"User","site_admin":false},"assignees":[{"login":"skoshelev","id":16875599,"avatar_url":"https://avatars3.githubusercontent.com/u/16875599?v=4","gravatar_id":"","url":"https://api.github.com/users/skoshelev","html_url":"https://github.com/skoshelev","followers_url":"https://api.github.com/users/skoshelev/followers","following_url":"https://api.github.com/users/skoshelev/following{/other_user}","gists_url":"https://api.github.com/users/skoshelev/gists{/gist_id}","starred_url":"https://api.github.com/users/skoshelev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skoshelev/subscriptions","organizations_url":"https://api.github.com/users/skoshelev/orgs","repos_url":"https://api.github.com/users/skoshelev/repos","events_url":"https://api.github.com/users/skoshelev/events{/privacy}","received_events_url":"https://api.github.com/users/skoshelev/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/nopSolutions/nopCommerce/milestones/3","html_url":"https://github.com/nopSolutions/nopCommerce/milestone/3","labels_url":"https://api.github.com/repos/nopSolutions/nopCommerce/milestones/3/labels","id":1906961,"number":3,"title":"Version 4.00","description":"","creator":{"login":"AndreiMaz","id":5019111,"avatar_url":"https://avatars0.githubusercontent.com/u/5019111?v=4","gravatar_id":"","url":"https://api.github.com/users/AndreiMaz","html_url":"https://github.com/AndreiMaz","followers_url":"https://api.github.com/users/AndreiMaz/followers","following_url":"https://api.github.com/users/AndreiMaz/following{/other_user}","gists_url":"https://api.github.com/users/AndreiMaz/gists{/gist_id}","starred_url":"https://api.github.com/users/AndreiMaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndreiMaz/subscriptions","organizations_url":"https://api.github.com/users/AndreiMaz/orgs","repos_url":"https://api.github.com/users/AndreiMaz/repos","events_url":"https://api.github.com/users/AndreiMaz/events{/privacy}","received_events_url":"https://api.github.com/users/AndreiMaz/received_events","type":"User","site_admin":false},"open_issues":12,"closed_issues":214,"state":"open","created_at":"2016-07-27T12:22:31Z","updated_at":"2017-10-26T07:42:21Z","due_on":"2017-10-31T07:00:00Z","closed_at":null},"comments":0,"created_at":"2017-10-26T05:31:50Z","updated_at":"2017-10-26T07:42:21Z","closed_at":"2017-10-26T07:42:21Z","author_association":"NONE","body":"On a fresh install the folder ~/files/importexport/ does not exist and hence the following exception is thrown when attempting to generate the PDF after a sale.\r\n\r\n> System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\\home\\site\\wwwroot\\files\\exportimport\\order_c741d120-5cdb-48d2-882d-d0d40da1213d_4996.pdf'.\r\n>    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)\r\n>    at 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, Boolean checkHost)\r\n>    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)\r\n>    at System.IO.FileStream..ctor(String path, FileMode mode)\r\n>    at Nop.Services.Common.PdfService.PrintOrderToPdf(Order order, Int32 languageId, Int32 vendorId)\r\n>    at Nop.Services.Orders.OrderProcessingService.ProcessOrderPaid(Order order)\r\n>    at Nop.Services.Orders.OrderProcessingService.MarkOrderAsPaid(Order order)\r\n>    at Nop.Plugin.Payments.Pcmtec.Controllers.PcmtecController.SuccessfulPayment(QueryTransactionResponse res)\r\n>    at Nop.Plugin.Payments.Pcmtec.Controllers.PcmtecController.HandleSuccessOrder()\r\n>    at lambda_method(Closure , Object , Object[] )\r\n>    at Microsoft.Extensions.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters)\r\n>    at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeActionMethodAsync>d__12.MoveNext()\r\n> --- End of stack trace from previous location where exception was thrown ---\r\n>    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n>    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n>    at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeNextActionFilterAsync>d__10.MoveNext()\r\n> --- End of stack trace from previous location where exception was thrown ---\r\n>    at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)\r\n>    at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n>    at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeInnerFilterAsync>d__14.MoveNext()\r\n> --- End of stack trace from previous location where exception was thrown ---\r\n>    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n>    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n>    at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeNextExceptionFilterAsync>d__23.MoveNext()\r\n\r\nI added the following code to Configure(IApplicationBuilder app) Startup.cs in my plugin to rectify the issue.\r\n\r\n`Directory.CreateDirectory(CommonHelper.MapPath(\"~/files/exportimport\"));`\r\n\r\nLooking through the code I can't see any calls to CreateDirectory in the whole project so I'm confused how these folders would ever be created."},"comment":{"url":"https://api.github.com/repos/nopSolutions/nopCommerce/issues/comments/339579967","html_url":"https://github.com/nopSolutions/nopCommerce/issues/2689#issuecomment-339579967","issue_url":"https://api.github.com/repos/nopSolutions/nopCommerce/issues/2689","id":339579967,"user":{"login":"skoshelev","id":16875599,"avatar_url":"https://avatars3.githubusercontent.com/u/16875599?v=4","gravatar_id":"","url":"https://api.github.com/users/skoshelev","html_url":"https://github.com/skoshelev","followers_url":"https://api.github.com/users/skoshelev/followers","following_url":"https://api.github.com/users/skoshelev/following{/other_user}","gists_url":"https://api.github.com/users/skoshelev/gists{/gist_id}","starred_url":"https://api.github.com/users/skoshelev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skoshelev/subscriptions","organizations_url":"https://api.github.com/users/skoshelev/orgs","repos_url":"https://api.github.com/users/skoshelev/repos","events_url":"https://api.github.com/users/skoshelev/events{/privacy}","received_events_url":"https://api.github.com/users/skoshelev/received_events","type":"User","site_admin":false},"created_at":"2017-10-26T07:42:21Z","updated_at":"2017-10-26T07:42:21Z","author_association":"CONTRIBUTOR","body":"@rolandh Thank you for your help, I fixed this problem.\r\nClosed #2689"}}
{"actor":{"display_login":"skoshelev"}}