Answered before but msxml4.dll error '80070005' Access is denied.

I know that the above has been answered before but I cannot get any of the workarounds / fixes to work and have been trawwling the forums etc for hours to no avail.

Here's the calling code.


<!-- #include file="ASPBase64.asp" -->

' this function sends an email message.
' it calls an .net page, which is physically sending the message
' its passing all parameters as an xml document

Function SendEmail(EmailTo, EmailFrom, FromName, isHtml, Subject, Body, Cert)

dim XmlDoc
dim xmlhttp
dim url

      XmlDoc = "<?xml version=""1.0""?>"
      XmlDoc = "<EmailMessage>"
      XmlDoc = XmlDoc & "<ToEmail>"   & server.URLEncode(EmailTo)   & "</ToEmail>"
      XmlDoc = XmlDoc & "<FromEmail>" & server.URLEncode(EmailFrom) & "</FromEmail>"
      XmlDoc = XmlDoc & "<FromName>"  & server.URLEncode(FromName)  & "</FromName>"
      XmlDoc = XmlDoc & "<Subject>"   & server.URLEncode(Subject)   & "</Subject>"
      XmlDoc = XmlDoc & "<Body>"      & server.URLEncode(Body)      & "</Body>"
      XmlDoc = XmlDoc & "<isHtml>"      & server.URLEncode(isHtml)        & "</isHtml>"
      XmlDoc = XmlDoc & "<Cert>"            & server.URLEncode(Cert)        & "</Cert>"
      XmlDoc = XmlDoc & "</EmailMessage>"

      set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP.4.0")

      url = ""                 


         xmlhttp.Open "POST",url, False

         xmlhttp.send XmlDoc
         ResponsePage = xmlhttp.responseText
      ResponsePage = Trim(ResponsePage)
      Set xmlhttp = Nothing

response.write ResponsePage

      'SendEmail = ResponsePage
End Function

Function GetCert(db, email)
      ' if user has more than 1 certificate for 1 email adress ( which is not really possible )
      ' then thanks to this query we always get the newest cert
      set rs = db.execute("SELECT TOP 1 [Cert] FROM Certs WHERE LTrim(RTrim([Email])) = '" & trim(email) & "' ORDER BY [ID] Desc")
      If Not rs.EOF Then GetCert = Binary2Base64(rs("Cert").value)
End Function



Firstly, the above out of the box ( I didn't write it, just trying to get it working on a new host) was configured without the MSXML2.ServerXMLHTTP.4.0 and was just MSXML2.ServerXMLHTTP which gave the following error.

The "SendUsing" configuration value is invalid.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: The "SendUsing" configuration value is invalid.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:

[COMException (0x80040220): The "SendUsing" configuration value is invalid.
   CDO.MessageClass.Send() +0
   AppName.CEncryptedEmail.SendEmail() +345
   AppName.ASPXSendEmail.Page_Load(Object sender, EventArgs e) +400
   System.Web.UI.Control.OnLoad(EventArgs e) +67
   System.Web.UI.Control.LoadRecursive() +35
   System.Web.UI.Page.ProcessRequestMain() +731

Now with the unnatractiveness of that error, XMLHTTP.4.0 gives a more attractive

msxml4.dll error '80070005' Access is denied.

For the likes of me though I have tried virtually everything listed in relation to that error to make it dissapear including the MMC group snap in policy editor to enable posting of non encrypted documents, registry hacks, full access to the web folders to the Everyone user, and I am at a loss.

Can anyone make any suggestions to make this work?

Thanks in advance,



Who is Participating?
Carl TawnConnect With a Mentor Systems and Integration DeveloperCommented:
You need access to the original project in order to change anything. The ASPX pages that are published are just proxies that hook into the assemblies (dlls) that are generated by the build process.
andrewmilnerAuthor Commented:
The OS is Windows 2003 server.
Carl TawnSystems and Integration DeveloperCommented:
It sounds like the problem is with the ASPX page rather than your code. You should stick with ServerXMLHTTP as it is intended for use on servers whereas XMLHTTP isn't.

The original error (i.e. the exception) is being thrown by the .Net runtime, which suggests a problem with the ASPX page.
andrewmilnerAuthor Commented:
Okay, I now get the same message with msxml4.dll (The "SendUsing" configuration value is invalid.) which leads me to beleive that I need to change this send using variable in the .net page.

The only thing is, I cant figure out how to get to the code as the following code is in the page that the above calls.

Codebehind="ASPXSendEmail.aspx.vb" Inherits="AppName5_0.ASPXSendEmail

There aren't however any files in the compilation that are named ASPXSendEmail.aspx.vb.

How do I therefore get at the .net code?

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.