R
René M. Balslev
Hi there,
I have a stub which extracts contacts from Outlook, using the Jet OLEDB
provider. It looks like this:
public DataSet GetOutlookContacts(string profileName, string mailboxName) {
System.Data.OleDb.OleDbDataAdapter odaOutlook = new
System.Data.OleDb.OleDbDataAdapter("SELECT * FROM Contacts",
"Provider=Microsoft.Jet.OLEDB.4.0;Outlook 9.0;MAPILEVEL=" +
mailboxName + "|;PROFILE=" + profileName +
";TABLETYPE=0;DATABASE=C:\\Windows\\Temp");
DataSet dsOutlook = new DataSet();
odaOutlook.Fill(dsOutlook, "Outlook");
return dsOutlook;
}
Note: The reference to Windows\Temp is needed because the provider
automatically builds a schema.ini-file (dunno y but it does).
Anyways, this all works fine if implimented within a windows app, but now
I'd like this DataSet to be returned by a WebService, and suddenly I receive
an error stating that there is no MAPI client installed.
I figure it's about security settings, but all the scenarios I've tried
either still returns this error, or HTTP 401 - Unauthorized.
I believe the same problem would arise if I tried to get data from an Access
database, so some of you out there might have a solution.
I'm running Windows Server 2003/IIS 6 and Framework 1.1.
Any help is much appriciated.
Sincerely,
/René
I have a stub which extracts contacts from Outlook, using the Jet OLEDB
provider. It looks like this:
public DataSet GetOutlookContacts(string profileName, string mailboxName) {
System.Data.OleDb.OleDbDataAdapter odaOutlook = new
System.Data.OleDb.OleDbDataAdapter("SELECT * FROM Contacts",
"Provider=Microsoft.Jet.OLEDB.4.0;Outlook 9.0;MAPILEVEL=" +
mailboxName + "|;PROFILE=" + profileName +
";TABLETYPE=0;DATABASE=C:\\Windows\\Temp");
DataSet dsOutlook = new DataSet();
odaOutlook.Fill(dsOutlook, "Outlook");
return dsOutlook;
}
Note: The reference to Windows\Temp is needed because the provider
automatically builds a schema.ini-file (dunno y but it does).
Anyways, this all works fine if implimented within a windows app, but now
I'd like this DataSet to be returned by a WebService, and suddenly I receive
an error stating that there is no MAPI client installed.
I figure it's about security settings, but all the scenarios I've tried
either still returns this error, or HTTP 401 - Unauthorized.
I believe the same problem would arise if I tried to get data from an Access
database, so some of you out there might have a solution.
I'm running Windows Server 2003/IIS 6 and Framework 1.1.
Any help is much appriciated.
Sincerely,
/René