Click here to Skip to main content
16,010,392 members
Home / Discussions / C#
   

C#

 
AnswerRe: How can i declare a global variable which can be used in the multiple projects Pin
Hessam Jalali7-Aug-07 21:11
Hessam Jalali7-Aug-07 21:11 
AnswerRe: How can i declare a global variable which can be used in the multiple projects Pin
Urs Enzler7-Aug-07 22:24
Urs Enzler7-Aug-07 22:24 
QuestionGetting the Name of the Method Which Invoked the Current Method Pin
vvijaykrishna7-Aug-07 20:10
vvijaykrishna7-Aug-07 20:10 
AnswerRe: Getting the Name of the Method Which Invoked the Current Method Pin
originSH7-Aug-07 22:53
originSH7-Aug-07 22:53 
QuestionC# Colorizer for HTML Code Pin
Michael Sync7-Aug-07 20:02
Michael Sync7-Aug-07 20:02 
AnswerRe: C# Colorizer for HTML Code Pin
Paul Conrad12-Aug-07 6:42
professionalPaul Conrad12-Aug-07 6:42 
GeneralRe: C# Colorizer for HTML Code Pin
Michael Sync12-Aug-07 15:02
Michael Sync12-Aug-07 15:02 
QuestionConnecting Exchange 2003 Server Pin
Pratik Vasant Shah7-Aug-07 19:57
Pratik Vasant Shah7-Aug-07 19:57 
Hi all,

I am a novice to the Exchange Server 2003. I am trying to create a meeting request using CDO, MAPI and ADODB using C#. My exchange server is 192.168.78.57. I have created two Active Directory Users viz. abc@testingserver.com and xyz@testingserver.com.

If I try to log into the Exchange Server using abc@testing server.com, I get an error stating that "You do not have permission to log on. [Microsoft Exchange Server Information Store - [MAPI_E_FAILONEPROVIDER(8004011D)]]" when the statement "mapiSession.Logon(....)" is executed.

To overcome this error, I used administrator@testingserver.com. After using this id for login purpose, I was able to get rid of the above error, but at the time of sending the appointment using "appointmentItem.Send(false, false, 0);" I am getting an another error "[Collaboration Data Objects - [MAPI_E_NO_SUPPORT(80040102)]]"

Please find herewith my code below

Is that I am missing something in this code??


Please Help me somebody as this is a bit urgent.

Kind Regards

Pratik



public void CreateNewMeetingRequest()
{
try
{
string exchangeServer = "192.168.78.57";
string currentUserMailBoxName = "abc@testingserver.com";
object profileInfo = (object)exchangeServer + "\n" + currentUserMailBoxName;


_Session mapiSession = new SessionClass();
object emptyObject = Missing.Value;
mapiSession.Logon(emptyObject, emptyObject, false, false, emptyObject, emptyObject, profileInfo);

MAPI.Folder folder = (MAPI.Folder) mapiSession.GetDefaultFolder(CdoDefaultFolderTypes.CdoDefaultFolderCalendar);
MAPI.Messages folderMessages = (Messages)folder.Messages;

MAPI.AppointmentItem appointmentItem = (MAPI.AppointmentItem) folderMessages.Add(emptyObject, emptyObject, emptyObject, emptyObject);
Recipients appointmentRecipient = (Recipients)appointmentItem.Recipients;
appointmentRecipient.AddMultiple("xyz@testingserver.com", CdoRecipientType.CdoTo);
appointmentRecipient.Resolve(false);

appointmentItem.ConversationIndex = mapiSession.CreateConversationIndex(Missing.Value);
appointmentItem.ConversationTopic = String.Empty;
appointmentItem.EndTime = DateTime.Today.AddHours(5.0);
appointmentItem.Location = "XYZ";
appointmentItem.Subject = "Subject - Test Appointment";
appointmentItem.Text = "Text - Test Appointment";
appointmentItem.StartTime = DateTime.Today;
appointmentItem.Sender = (MAPI.AddressEntry)mapiSession.CurrentUser;
appointmentItem.Send(false, false, 0);

mapiSession.Logoff();

folder = null;
folderMessages = null;
appointmentItem = null;
appointmentRecipient = null;
mapiSession = null;
}
catch (Exception exception)
{
Console.Write(exception.Message);
}
}

Thanking you in Advance

Regards
Pratik Shah

QuestionC# Socket issue Pin
dotman17-Aug-07 19:04
dotman17-Aug-07 19:04 
AnswerRe: C# Socket issue Pin
Hessam Jalali7-Aug-07 20:12
Hessam Jalali7-Aug-07 20:12 
GeneralRe: C# Socket issue Pin
dotman17-Aug-07 22:31
dotman17-Aug-07 22:31 
GeneralRe: C# Socket issue Pin
originSH7-Aug-07 22:55
originSH7-Aug-07 22:55 
GeneralRe: C# Socket issue Pin
dotman17-Aug-07 23:04
dotman17-Aug-07 23:04 
QuestionPlay Many mpg simultaneously Pin
alayle7-Aug-07 18:13
alayle7-Aug-07 18:13 
AnswerRe: Play Many mpg simultaneously Pin
Christian Graus7-Aug-07 18:14
protectorChristian Graus7-Aug-07 18:14 
QuestionPreview Files Pin
_Arthur7-Aug-07 18:12
_Arthur7-Aug-07 18:12 
AnswerRe: Preview Files Pin
Christian Graus7-Aug-07 18:15
protectorChristian Graus7-Aug-07 18:15 
GeneralRe: Preview Files Pin
_Arthur7-Aug-07 19:12
_Arthur7-Aug-07 19:12 
GeneralRe: Preview Files Pin
ekynox7-Aug-07 19:18
ekynox7-Aug-07 19:18 
QuestionTimer in C# Pin
mimimimilaw7-Aug-07 18:03
mimimimilaw7-Aug-07 18:03 
AnswerRe: Timer in C# Pin
Christian Graus7-Aug-07 18:13
protectorChristian Graus7-Aug-07 18:13 
AnswerRe: Timer in C# Pin
Developer6117-Aug-07 22:17
Developer6117-Aug-07 22:17 
GeneralRe: Timer in C# Pin
Luc Pattyn7-Aug-07 23:36
sitebuilderLuc Pattyn7-Aug-07 23:36 
Questionstart a form maximized? [modified] Pin
sudany_zool7-Aug-07 17:50
sudany_zool7-Aug-07 17:50 
AnswerRe: start a form maximized? Pin
Christian Graus7-Aug-07 18:16
protectorChristian Graus7-Aug-07 18:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.