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,
LVL 9
Senior IT System EngineerIT ProfessionalAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
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?
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Senior IT System EngineerIT ProfessionalAuthor 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 ?
0
Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
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?
1
Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

Senior IT System EngineerIT ProfessionalAuthor Commented:
Where to find that info ?
0
Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
the 2 exceptions were at utils.vb:line 256 and line: 260 separately.

so you may share or start debug the codes from there.
1
Senior IT System EngineerIT ProfessionalAuthor 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.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.