Ask the Expert

Error message: Couldn't complete operation because the service provided doesn't support it

My machine is running on Win2000 Professional and I have MS Outlook 97. I am trying to send mails through VB.NET code. For this, I have added a Reference to MS Outlook 8.0 Object library.

    Requires Free Membership to View

After doing, this when I run the patch below, it gives this error message:

"Couldn't complete operation because the service provided doesn't support it"

objOutlook = New Outlook.Application() 
  objNamespace = objOutlook.GetNamespace(Type:="MAPI") 
  objMAPIFolder = 

This is a hard place to try and answer questions like this. From what you've sent, your code should work with the *current* version of Outlook and the most recent object interface (which is version 10, BTW). The issue here is not a .NET issue but instead a plain-old pain in the derriere bits-n-bytes debugging issue. A couple of things to help you narrow down your debugging.

1) Exactly which activity is causing the error to be generated (which line and which operation)?
2) Does the equivalent VB6 code execute properly on your machine?
3) Do you have to stick with a six year old client?

If you can upgrade your client to 2000 or 2002, then I'd recommend that first. If you're stuck supporting the 97 client, then Narrow down exactly which operation is causing you grief. It's possible that the version of the object API does not support one of the operations or types that you specify (though you are doing pretty generic stuff!). I don't have access to an object library from two versions back so I can't help much here.

The other class of problem that you may have is that something is "out of whack". The solution is to re-whack things. Specifically, your O97 installation my be corrupted somehow. You could try reinstalling the outlook client if you still have access to the installation media. Another possibility is that one of the generated files is messed up. You can delete the assemblies generated for Outlook, remove the reference from your project and regenerate them. It's unlikely that this will matter much, however. Pay close attention to make sure that the type library that the generator is cranking on is the expected version.

Sorry that I don't have a better answer here.

This was first published in December 2002

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: