Saotn.org

The “SendUsing” configuration value is invalid.

The “SendUsing” configuration value is invalid.


Sinds kort draaien onze Windows 2003 webservers (IIS 6.0) met AppPools (application pools) onder een eigen IUSR-user identity. Werkt prima! :) Echter, soms kom je tijdens het opzetten en testen van een dergelijke set-up nog wel eens een foutmelding tegen.

Bijvoorbeeld bij het versturen van een e-mail via ASP (CDOSYS):

The "SendUsing" configuration value is invalid.


Enig zoekwerk bracht mij bij de website realityme.net, waarop uitgelegd staat dat deze foutmelding veroorzaakt wordt omdat de IIS_WPG group geen leesrechten heeft op de SMTP-service van IIS.

Oplossing

Stel leesrechten in op de service SMTPSVC/1 (Computer Management -> Services and Applications -> Internet Information Services (IIS) Manager -> Default SMTP Virtual Server -> Properties -> Security -> Add) én op de SmtpSvc node van de Metabase (Metabase Explorer -> SmtpSvc Permissons -> Add). Zoals aangegeven in onderstaande afbeelding:

Werk je liever via de commandline, download dan MetaAcl.vbs van Microsoft, of hier (als tekst, sla op als .vbs). De aanroep via cscript.exe is:

cscript.exe Metaacl.vbs IIS://localhost/SMTPSVC/1 IIS_WPG RUE

The “SendUsing” configuration value is invalid: mogelijkheid #2

verplicht e-mail verzenden via SMTP

Een tweede mogelijke oorzaak van deze foutmelding is dat de webserver geen lokale SMTP-service biedt, en dat er gebruik gemaakt moet worden van een externe SMTP-server. CDOs standaard instelling is om de lokale pick-up directory van IIS SMTPsvc (C:\Inetpub\mailroot\Pickup) te gebruiken, door middel van het property cdoSendUsingPort = 1. In dat kan in dit geval niet.

Het ASP-script moet aangepast worden om van de externe server gebruik te maken, met CDO Configuration.

Voorbeeld ASP script: SMTP-server + TLS + SMTP authenticatie

[...]
 ' http://msdn.microsoft.com/en-us/library/ms526318%28EXCHG.10%29.aspx
 Const cdoSendUsingMethod        = _
 "http://schemas.microsoft.com/cdo/configuration/sendusing"
 Const cdoSendUsingPort          = 2
 Const cdoSMTPServer             = _
 "http://schemas.microsoft.com/cdo/configuration/smtpserver"
 Const cdoSMTPServerPort         = _
 "http://schemas.microsoft.com/cdo/configuration/smtpserverport"
 Const cdoSMTPConnectionTimeout  = _
 "http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"
 Const cdoSMTPAuthenticate       = _
 "http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"
 Const cdoBasic                  = 1
 Const cdoSendUserName           = _
 "http://schemas.microsoft.com/cdo/configuration/sendusername"
 Const cdoSendPassword           = _
 "http://schemas.microsoft.com/cdo/configuration/sendpassword"
 'Use SSL for the connection (False or True)
 Const cdoSendTLS        = _
 "http://schemas.microsoft.com/cdo/configuration/smtpusessl"
 Set myMail = CreateObject("CDO.Message")
 Set myMail.Configuration = CreateObject("CDO.Configuration")
 Set Fields = myMail.Configuration.Fields

 ' SMTP-configuratie
 With Fields
  .Item(cdoSendUsingMethod)       = cdoSendUsingPort
  .Item(cdoSMTPServer)            = "smtp.vevida.com"
  .Item(cdoSMTPServerPort)        = 25
  .Item(cdoSMTPConnectionTimeout) = 10
  .Item(cdoSMTPAuthenticate)      = cdoBasic
  .Item(cdoSendUserName)          = "inlognaam/e-mailadres verzender"
  .Item(cdoSendPassword)          = "wachtwoord verzender"
  .Item(cdoSendTLS)               = true
  .Update
 End With
 [...]

 

 


Sysadmins of the North
About The Author
My name is Jan Reilink. I am not a hacker, coder, developer, programmer or guru. I am merely a system administrator, doing his daily thing at Vevida Services in the Netherlands. With over 10 years of experience, my specialties include Windows Server (2003, 2008 and 2012), Windows 7, IIS (6.0, 7.5 and 8.0), Linux (CentOS, Debian), PHP, websites, optimization and security.

 

There are no comments yet, but you can be the first



Leave a Reply




2 × 6 =

About Sysadmins of the North

Hi and welcome to Sysadmins of the North!

Sysadmins of the North is just another technical blog. Just like so many others out there. Most posts are written in English, some in Dutch. On Saotn.org you can find all kinds of computer, server, web, sysadmin, database and security related stuff.

About me: My name is Jan Reilink. I am not a hacker, coder, developer, programmer or guru. I am merely a system administrator, doing his daily thing at Vevdia Services in the Netherlands. Living in the north of the Netherlands, so hence the name Sysadmins of the North :-)

Drop me a comment somewhere or send an email to say hi, or discuss about security, website or WordPress, performance, Windows or IIS topics.

Search & Find

Advertisement

IT Books & WP Themes

Windows PowerShell Cookbook: The Complete Guide to Scripting Microsoft\'s Command Shell
DNS and BIND - 5th Edition
DNSSEC Mastery: Securing the Domain Name System with BIND
Windows Server 2012 Unleashed
Enfold - Responsive Multi-Purpose WordPress Theme
Striking MultiFlex & Ecommerce Responsive WordPress Theme

 

The Sysadmins of the North network

Just for the fun of it, Sysadmins of the North is hosted on mulitple servers:

  1. one (shared) Windows Server 2012, IIS 8.0 webserver running PHP 5.5
  2. one (shared) MySQL database server, running MariaDB 5.5
  3. one Varnish Cache HTTP reverse proxy with Apache, for offloaded static content
Twitter Feed

What's happening, right now, around Saotn.org?


Bad Authentication data
Copyright © 2007-2014 Saotn.org . Design by OrangeIdea