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

Senior IT System Engineer
Senior IT System Engineer used Ask the Experts™
on
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,
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Software Team Lead
Commented:
errors occured between line: 256 to 260 at:
C:\Inetpub\wwwroot\surveyBuilder\IzillaFramework\SurveyBuilder\components\utils.vb

it seems that your program is unable to generate the PDF file as it source (the .html file) was being accessed by another process ?

D:\MyNewWWW\temp\SendRemittance(formultipleaccounts)_636241460156965755.html

Open in new window


do you have permission to access to that file/folder?

Author

Commented:
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 ?
Ryan ChongSoftware Team Lead

Commented:
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?
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

Author

Commented:
Where to find that info ?
Ryan ChongSoftware Team Lead
Commented:
the 2 exceptions were at utils.vb:line 256 and line: 260 separately.

so you may share or start debug the codes from there.

Author

Commented:
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.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial