473,973 Members | 12,581 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

My app fails when calling Outlook.Namespa ce.Folders

I made a program that reads emails from an Outlook mailbox and does some
stuff and the program works fine.
However, my boss now tells me that the program is to be executed from a
remote computer. I now get the following error when calling the program
remotely:

"Could not complete the operation because the service provider does not
support it. at Outlook.NameSpa ceClass.get_Fol ders()
For more information, see Help and Support Center at
http://go.microsoft.co m/fwlink/events.asp."
Below is the piece of code in the program where the error occurs:

' Create Outlook application
Dim loApp As Outlook.Applica tion = New Outlook.Applica tion

' Get Mapi NameSpace
Dim loNS As Outlook.NameSpa ce = loApp.GetNamesp ace("MAPI")

' Error occurs here
Dim loFol As Outlook._Folder s = loNS.Folders
How do I fix this?
Oct 6 '08 #1
2 2068
A couple of things to look at here:
1.
Outlook requires authentication before being called. If you don't
impersonate or create credentials, the process running your application will
be used to present credentials to Outlook. Those credentials must be able to
authenticate against outlook. In your first instance, the logged on user is
being used to authenticate outlook by default so you likely won't see any
issue.

2.
You could also be running into the Outlook object model guard.

3.
The supported technology for interacting with outlook is WebDav.

--
Regards,
Alvin Bruney

Want a free copy of VS 2008 w/ MSDN premium subscription?
Details at http://msmvps.com/blogs/alvin/Default.aspx

Auther Plug
OWC Blackbook now on download at www.lulu.com/owc

"Ryan H" <rh******@smci. comwrote in message
news:#q******** ******@TK2MSFTN GP02.phx.gbl...
I made a program that reads emails from an Outlook mailbox and does some
stuff and the program works fine.
However, my boss now tells me that the program is to be executed from a
remote computer. I now get the following error when calling the program
remotely:

"Could not complete the operation because the service provider does not
support it. at Outlook.NameSpa ceClass.get_Fol ders()
For more information, see Help and Support Center at
http://go.microsoft.co m/fwlink/events.asp."
Below is the piece of code in the program where the error occurs:

' Create Outlook application
Dim loApp As Outlook.Applica tion = New Outlook.Applica tion

' Get Mapi NameSpace
Dim loNS As Outlook.NameSpa ce = loApp.GetNamesp ace("MAPI")

' Error occurs here
Dim loFol As Outlook._Folder s = loNS.Folders
How do I fix this?
Oct 7 '08 #2
"Ryan H" <rh******@smci. comwrote in message
news:%2******** **********@TK2M SFTNGP02.phx.gb l...
>I made a program that reads emails from an Outlook mailbox and does some
stuff and the program works fine.
Programming questions belong in microsoft.publi c.outlook.progr am_vba or
..program_addin s
--
Brian Tillman [MVP-Outlook]

Oct 7 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
6809
by: adolf garlic | last post by:
Im trying to return xml from sql. The xml is made up of different fragments, some using FOR XML ... syntax. The result is a valid xml doc. There is a working stored proc that returns the xml In .net i'm having problems loading this up. I've now tried installing sqlxml managed classes and the following appears to work when stepping through, but the result just disappears.
8
3461
by: Anthony Munter | last post by:
I have a web application with impersonate=”true” in Web.config and on my own logon page I allow the user to either - specify a userid/password for the app to impersonate when calling legacy COM objects - or, just use the interactive user If they choose to use the interactive option, the impersonate="true" means that the process runs under the interactiv user (which I've confirmed works correctly). If they specify a userid/password, I...
1
4901
by: Joey Lee | last post by:
Hi, I am trying to send mail thru outlook. I have found some code on the web and ws trying it out. I was successful in creating a mail in the draft folder of outlook, however hangs for a long time during the sending of the mail. Snippet code as below ------------------------------------------- using Outlook = Microsoft.Office.Interop.Outlook; //using the 11.0 object
1
975
by: Qingdong | last post by:
Building a web set up project fails when there are two user control with same names under two different folders. Did anyone have the same issue before?
3
5097
by: Jerome Cohen | last post by:
AI am trying to call a third-party web service. this service expects an XML fragment that contains the request plus other parameter. adding the web reference created the syntax below(reference.vb). I changed the data type for the structure that contains the XML data from the default "String" to "xml.xmldocument" to enable easy filling of the data. my client code creates an XML document class, fills the data using standard xml dom...
1
1376
by: Glenn Graham | last post by:
My web download program stopped working when IE7 beta 1-3 was installed. Error when calling OpenRequest in CHttpConnection. The Error is Created by ASSERT(hFile != NULL) in mehtod CInternetFile::CInternetFile. My call //pServer = session.GetHttpConnection(strServerName, nPort); pServer = session.GetHttpConnection(strServerName, nPort, pstrUserName, pstrPassword); lpContent = szContent;
6
21332
by: Manuel | last post by:
Hi, Using the PIA "Microsoft Outlook 11 Object Library". I've noticed that the Logon method of the NameSpace Object is simply ignored. My Outlook 2003 is full updated. For example if I write: Dim oApp As New Outlook.Application
6
2244
by: tgnelson85 | last post by:
Hello, I've managed to get my c++ code calling my c code, and i can call a function that prints something to the screen etc. However, i am trying to call the following C function: char* normaliseString(char *pstring) { char *ptr; for(ptr = pstring; *ptr; ptr++) {
2
3636
by: Ryan H | last post by:
I made a program that reads emails from an Outlook mailbox and does some stuff and the program works fine. However, my boss now tells me that the program is to be executed from a remote computer. I now get the following error when calling the program remotely: "Could not complete the operation because the service provider does not support it. at Outlook.NameSpaceClass.get_Folders() For more information, see Help and Support Center at...
0
10347
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
10160
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11809
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
11558
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10901
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
10070
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7600
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6408
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6542
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.