ho letto su internet che cdo non funziona su iis7!
ho provato a spostare il mio sito da xp a vista, e in effetti mi dà un errore:
error '80040211'
nessuno a provato?
ho letto su internet che cdo non funziona su iis7!
ho provato a spostare il mio sito da xp a vista, e in effetti mi dà un errore:
error '80040211'
nessuno a provato?
Non credo dipenda da ie7, io lo sto usando e funziona perfettamente. Sicuro che sia presente CDOSYS.dll nel computer?
![]()
ho scritto IIS7, non ie7
![]()
up
nessuno usa cdo su iis 7 di vista?
Nel fare il fine tuning del nuovo server, ho notato che le vecchie pagine ASP rimaste ancora vive, dedicate per lo più a task di amministrazione e di cui non ho voglia in questa fase della mia vita di fare la migrazione (cioè, di riscriverle da zero), avevano dei problemi nell'invio di e-mail usando CDO (CDONTS o CDOSys, non fa differenza). Update: in realtà il problema c'è anche con ASP.NET e MailMessage (entrambi), se non si utilizza un server SMTP esplicito, perchè in questo caso viene banalmente fatta l'interop su CDOSys.
Il problema è che, ovviamente, utilizziamo un account custom per IWAM e IUSR, per cui il processo che fa l'hosting del component non è in grado di accedere al metabase, perchè la configurazione di default non lo prevede. Per ovviare al problema, è necessario aggiungere i permessi, in sola lettura, al metabase con tanto di VBS associato.
Così non è necessario toccare gli script, come negli altri workaround suggeriti.
ti riporto un testo in inglese per risolvere il problema
You can create an account, grant that account access to the IIS metabase, and then configure the virtual directory where the application is running to run as the account. The advantage of this workaround is that the application code and the SMTP configuration are not changed.
To create a new account for the application to run under and configure the virtual directory, follow these steps:
1. Save the .vbs files to a directory on your server.
2. Use Active Directory Users and Computers to create a computer account (for example, CdoExAccount), and then add this account to the Users group.
This account does not require a mailbox.
3. In IIS, locate the virtual directory that contains your application, right-click the virtual directory, and then click Properties.
4. Click the Directory Security tab, and then under Anonymous access and authentication control, click Edit.
5. In the Authentication Methods dialog box, make sure that the Anonymous access check box is selected, and then under Accounts used for anonymous access, click Edit.
6. In the Anonymous User Account dialog box, follow these steps:
a. In the Username box, type the name of the account that you created in step 2.
Note On a domain controller, use DomainName\AccountName, or do not specify either the computer name or domain name. You only have to provide AccountName. If you created a computer-level account, type the account name in the following format: ComputerName\AccountName
b. On a domain controller use <DomainName>\<AccountName> or do not specify either computername or domain name (just give the <AccountName>)
c. Click to clear the Allow IIS to control the password check box.
d. In the Password box, type the password for the account.
e. Click OK, and then retype the password in the resulting dialog box.
7. Click OK to close all the dialog boxes.
8. At a command prompt, change the directory to the directory that contains the .vbs files in step 1.
9. Use Adadd.vbs to grant access to the IIS metabase to the account that you noted in step 2. To do so, run the following command at the command prompt:
cscript adadd.vbs ComputerName\AccountName
Note On a domain controller, use DomainName\AccountName, or do not specify either the computer name or domain name. You only have to provide AccountName after adadd.vbs. To add IWAM_computername on a domain controller, run one of the following commands at the command prompt:
cscript adadd.vbs DomainName\IWAM_ComputerName
-or-
cscript adadd.vbs IWAM_ComputerName
You must also sometimes grant IIS metabase access to the IWAM_ComputerName account by using Adadd.vbs. To do so, run the following command at the command prompt:
cscript adadd.vbs ComputerName\IWAM_ComputerName
10. Stop and then restart the IIS Admin service and any dependent services.
11. Run Adlist.vbs to make sure that the account was added to the IIS metabase access list. To do so, run the following command at the command prompt:
cscript adlist.vbs
12. On computers that are running Exchange 2000, grant user write access to the Program Files\exchsrvr\mailroot\vsi#\pickup directory path. On computers that are not running Exchange 2000, grant user write access to the Inetpub\mailroot\pickup directory path.
13. Wait for Active Directory to replicate to the IIS metabase.
14. Run the application.
The application now works as expected.
lamerhouse@hotmail.com