Background
Our’s is a web application that connects to a web service hosted in a different server to process the contents required to fill a template document by using content control (xml template).
The web service code processes The tags in the template document loads it and fills each tag’s placeholder with value and generates the document.
The application is a VB.Net web application in .Net 4
Issue
The current project involves migration of the application from Windows 2003 Server IIS 6 to Windows 2008 server IIS 7.5. After the migration, when we generate the document, we get Access_Denied error intermittently/randomly. Meaning at times the document gets generated without any issue and at times it throws. The details of the error is given below –
Error
Source:Microsoft.VisualBasic|| Type: System.UnauthorizedAccessException|| Message: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
Stack trace
at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack) at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object Instance,
Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack) at XXX.XXX.XXX.XXX.MHTFile.anComWrapper.GetAttribute(IHTMLUnknownElement theHTMLElement, String theTagName) in XXXXX\anComWrapper.vb:line
7 at XXX.XXX.XXX.XXX.anATHGeneralReflectiveHandlerOther.GetTagAttribute(String theTag, enuRetrieveTagAttribute RetrieveOption)
We have ensured that the privileges to the following folders are the same in both the 2003 and 2008 server
- %Temp%
- ASP.Net temp files
- application related folders for the web service