Exception Thrown When Uploading Xslt File For Xslt Transformed Email
Hi All,
I've implemented the xslt email workflow for contour whereby a user can upload an xslt file to be used for the email body as shown to us by Tim
unfortunately 4 times out of 5 I'm getting an exception trying to upload a new xslt file
our exception reporter is sending us the YSOD.
System.IO.IOException: The process cannot access the file 'C:\ClientData\xxxxx\wwwroot\umbraco\plugins\umbracoContour\files\XsltEmail\EmailContent.xslt'
because it is being used by another process.
System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.IO.IOException: The process cannot access the file 'C:\ClientData\xxxxx\wwwroot\umbraco\plugins\umbracoContour\files\XsltEmail\EmailContent.xslt' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
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)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode)
at System.Web.HttpPostedFile.SaveAs(String filename)
at Umbraco.Forms.Core.FieldSetting.File.get_Value() in c:\Users\Tim Geyssens\Documents\Visual Studio 2008\Umbraco\Contour\Umbraco.Forms.Core\Common\FieldSettingType\File.cs:line 18
at Umbraco.Forms.UI.Dialogs.editWorkflowDialog.Button1_Click(Object sender, EventArgs e) in c:\Users\Tim Geyssens\Documents\Visual Studio 2008\Umbraco\Contour\Umbraco.Forms.UI\Dialogs\editWorkflowDialog.aspx.cs:line 137
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.umbraco_plugins_umbracocontour_editworkflowdialog_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\54123cca\71216b9e\App_Web_editworkflowdialog.aspx.d5b248c3.lnqx-v7n.0.cs:line 0
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
I have no idea why the server would be using the xslt file short of someone actually sending an email at exactly the same time.. but I've found it hard to repro here but the client is repro-ing it very often..
Exception Thrown When Uploading Xslt File For Xslt Transformed Email
Hi All,
I've implemented the xslt email workflow for contour whereby a user can upload an xslt file to be used for the email body as shown to us by Tim
unfortunately 4 times out of 5 I'm getting an exception trying to upload a new xslt file
our exception reporter is sending us the YSOD.
System.IO.IOException: The process cannot access the file 'C:\ClientData\xxxxx\wwwroot\umbraco\plugins\umbracoContour\files\XsltEmail\EmailContent.xslt' because it is being used by another process.
System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.IO.IOException: The process cannot access the file 'C:\ClientData\xxxxx\wwwroot\umbraco\plugins\umbracoContour\files\XsltEmail\EmailContent.xslt' because it is being used by another process. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) 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) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode) at System.Web.HttpPostedFile.SaveAs(String filename) at Umbraco.Forms.Core.FieldSetting.File.get_Value() in c:\Users\Tim Geyssens\Documents\Visual Studio 2008\Umbraco\Contour\Umbraco.Forms.Core\Common\FieldSettingType\File.cs:line 18 at Umbraco.Forms.UI.Dialogs.editWorkflowDialog.Button1_Click(Object sender, EventArgs e) in c:\Users\Tim Geyssens\Documents\Visual Studio 2008\Umbraco\Contour\Umbraco.Forms.UI\Dialogs\editWorkflowDialog.aspx.cs:line 137 at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.umbraco_plugins_umbracocontour_editworkflowdialog_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\54123cca\71216b9e\App_Web_editworkflowdialog.aspx.d5b248c3.lnqx-v7n.0.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
I have no idea why the server would be using the xslt file short of someone actually sending an email at exactly the same time.. but I've found it hard to repro here but the client is repro-ing it very often..
any assistance would be greatly appreciated.
Thanks,
Tom
Comment author was deleted
Hi Tom,
Try giving the file another name and then uploading it
Does that work?
Hi Tim.. will try and let you know
is working on a reply...