Link to home
Start Free TrialLog in
Avatar of Albert Widjaja
Albert WidjajaFlag for Australia

asked on

ASP.NET on IIS website not sending PDF file anymore ? [IzillaFramework Cognition]

People,

I'm running ASP.NET page on IIS 8.5 (Windows Server 2012 R2) with IzillaFramework / Cognition CMS. Since this is a legacy system, there is no documentation on it and no one is able to assist me in the company, hence I'm posting it here.

Here it is chronologically:

At 12:14 PM, the first customer

When my customer visit the company public website ASP.NET web page to change the account details, after filling their details, the web page will send the PDF summary of the item that the user wanted to change (Before and After) CC: to my accounts department.

But somehow, after last week, the web form is no longer sending the PDF that is entered by the customer, but the email was sent but blank without attachment.

As at 12:14 PM Customer only get blank email with company header and no attachment, while the Accounts department gets the same email but contains the data from previous customer (N-1).

At 12:55 PM, second customer visit the same page to update their details, same thing happens.
Customer only get blank email with company header, the Accounts department gets the customer details as at 12:14 PM (The first customer data).

The second customer data is held somewhere / cached.


Here it is the error message that I can see in the error.log:

Friday, 3 March 2017 1:53:35 PM
SurveyBuilder.Utils.attachPDF
System.IO.IOException: The process cannot access the file'D:\MyNewWWW\temp\SendRemittance(formultipleaccounts)_636241460156965755.html' 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, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding)
   at surveybuilder.utils.buildPdfAttachment(String _content, String _formName, Uri& _uri) in C:\Inetpub\wwwroot\surveyBuilder\IzillaFramework\SurveyBuilder\components\utils.vb:line 256

Open in new window


and

Monday, 20 March 2017 12:14:35 PM
SurveyBuilder.Utils.attachPDF
WebSupergoo.ABCpdf6.Internal.PDFException: HTML render is blank.
   at WebSupergoo.ABCpdf6.Doc.AddUrl(String url, Boolean paged, Int32 width, Boolean disableCache)
   at WebSupergoo.ABCpdf6.Doc.AddImageUrl(String url, Boolean paged, Int32 width, Boolean disableCache)
   at WebSupergoo.ABCpdf6.Doc.AddImageUrl(String url)
   at surveybuilder.utils.buildPdfAttachment(String _content, String _formName, Uri& _uri) in C:\Inetpub\wwwroot\surveyBuilder\IzillaFramework\SurveyBuilder\components\utils.vb:line 260
---------------------------------------------------------------------
---------------------------------------------------------------------
Monday, 20 March 2017 12:14:35 PM
SurveyBuilder.Utils.attachPDF
Location of file: https://www.mycompany.com /temp/ChangeofAddressForm_636256088736538680.html
---------------------------------------------------------------------

Open in new window


There is NO antivirus running and I have already reboot the webserver multiple times, still not fixing this issue.

Any help would be greatly appreciated.

Thanks,
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Albert Widjaja

ASKER

Ryan,

The HTML file was successfully created on the Temp directory.

But somehow a mysterious process was locking the file when converting it as PDF ?
just wondering how that HTML file was generated? do you close the HTML file writer (or similar object) before it's being called again by your PDF generator?
Where to find that info ?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the response.
I ended up decommissioned the page since the framework has been too old and no one in the company knows it anymore.