• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2470
  • Last Modified:

Server.CreateObject Failed in SBS 2008 / IIS7

I recently upgraded to Windows 2008 SBS running IIS7. My CDO scripts on my intranet are now failing with this message:

Server object error 'ASP 0177 : 8002801d'
Server.CreateObject Failed

It seems to be happening on the actual line where the CDO.MESSAGE object is created. Anyone have any idea on how to correct this issue?

Thanks,
J
0
brownmetals
Asked:
brownmetals
  • 3
  • 2
  • 2
2 Solutions
 
neeraj523Commented:
Hello

It seems CDO object is not installed at server.. Check system32 directory for the related dlls
0
 
brownmetalsAuthor Commented:
I registered the 64-bit CDOSYS.dll (regsvr32 C:\Windows\SysWOW64\cdosys.dll ) and that now seems to get me past that line, but the error now is different:

CDO.Message.1 error '80070005'

Access is denied.


The line number corresponds to the cdoMail.Send command.

It seems like a permissions issue for the IUSR_SERVERNAME account to send email via Exchange 2007. I've tried creating an email account for the IUSR account, but that didn't seem to do the trick. Any other ideas?

Thanks,
J
0
 
neeraj523Commented:
Hello J

The orginal issue was because of non availability of CDO objects at your server which i mentioned in my post. And the current issue is related to the permissions on the dll which is very much related to the original question. No need to close this question as unresolved and opening a new question.

the current permission issue is because IUSER_MACHINENAME is not having access to the cdosys.dll file. Please add access and it will start working..

neeraj
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
brownmetalsAuthor Commented:
To get CDO to work on SBS 2008, setting permissions for the IUSR account is not really the answer. Though it may seem that's the case, the answer is more complicated.

Background: SBS 2008 Premium, with Exchange 2007, does not use the SMTP service to send email but rather uses the Excahnge Transport service. CDO & IIS have to be allowed to send email via that Transport service. In previous versions (2003, SBS 2003, Exchange 2003), the SMTP service was used and CDO messages could be sent via the SMTP service without having to let Exchange know this was being done.

To send CDO messages via Exchange 2007 & IIS 7 within SBS 2008 Premium, I had to complete these steps as directed by Microsoft Tech Support.

1. MAPI & CDO messaging component needs to be installed.
http://www.microsoft.com/downloads/details.aspx?FamilyID=E17E7F31-079A-43A9-BFF2-0A110307611E&displaylang=en

2. Exchange 2007 needs to have your local server (IP Address or FQDN) setup to allow it to relay via a Receive Connector. You can add a specific receive connector for this or modify an existing one. The important part is that "Externally Secured" must be checked on the Authentication tab to allow CDO to send external messages. Im still working with Microsoft to determine how to allow Exchange 2007 to also send internal emails.
http://msexchangeteam.com/archive/2006/12/28/432013.aspx

3. IIS needs to be pointed to the mail pickup directory of Exchange 2007. By default, it looks to the IIS mail pickup directory which Exchange 2007 does not query. This is best done with IIS 6.0 resource Kit.
http://www.microsoft.com/downloads/details.aspx?FamilyID=56FC92EE-A71A-4C73-B628-ADE629C89499&displaylang=en

Install the IIS Resource Kit > Programs > IIS Resources > Metabase Explorer
Once opened, navigate to LM > SmtpoSvc > 1
Change the 36880 PickupDirectory value to the Exchange 2007 mail pickup directory.
For SBS 2008, that directory, by default,  is: C:\Program Files\Microsoft\Exchange Server\TransportRoles\Pickup

4. Reset IIS
Start > Run > iisreset


With support provided from Microsoft, I was able to send external CDO messages. Im still working with them to be able to send internal messages. Once we figure that out, I will post that here as well.


Thanks,
J
0
 
sawrightnetCommented:
J

Is this a solution if I were using a local smtp service. I am actually trying to use a remote service. Here are the connection parameters I am setting up.

' Setting the SMTP Server
Set Flds = objConfig.Fields <-- error occurs on this statement
Flds.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtp.domain.com
Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
Flds.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = auth@domain.com
Flds.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = password
Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
Flds.update

Set objMessage.Configuration = objConfi

It never even gets to the send

Steve
0
 
brownmetalsAuthor Commented:
Steve,
Unfortunately, I do not know the answer to your question. Since this is a closed question, you're not likely to get the feedback you would if this were a new question. I would suggest opening a new question in the ASP and other related zones so that your question is visible to Experts in those areas. Once you do that, you should be able to get much better feedback.

Good luck!
J
0
 
sawrightnetCommented:
J,

I found the solution and posted what I found. Case Closed.

Steve
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now