Appointment.CancelAppointment error

I'm trying to send out a cacelation for an appointment and I'm getting the following error message:

Value cannot be null.\r\nParameter name: String

Here's the code that I am using. I don't see what I'm doing wrong. I copied the code from one of the forums about request/update/cancel appointment.

Appointment appointment = new Appointment(mtgLocation, "RBS Values Meeting Invitation", "", dtS, dtE, msg.From.ToString(), attendees);

string uniqueId = datareader["CalUniqueID"].ToString();

appointment.UniqueId = uniqueId;

msg.AddAlternateView(appointment.CancelAppointment(2));

Hi Jalal,

Thanks for considering Aspose.

We are looking into this issue and will get back to you soon.

I have sent the dll that contains the fix for the CancelAppointment() method. Please check and let us know if it works for you.

Hello,

Please check the fix for this issue:

[http://www.aspose.com/community/files/51/file-format-components/aspose.network/default.aspx ](http://www.aspose.com/community/files/51/file-format-components/aspose.network/default.aspx)

Thanks

I did not get the dll in the email because it was blocked, but I got the one in the version 4.6 file from the downloads linke. Is that the dll for the fix. It does not work for me. Now I'm getting an 'Object reference not set to an instance of an object' error.' The new meeting and update meeting were working for me with the 4.5 dll and now even they have stopped working with the 4.6 version.

I am sorry, but I could not reproduce the problem using 4.6 version. The same code was giving the error with 4.5.

Could you please tell us which version of .NET you are using and share the code for sending, updating and canceling the appointment. You may send it via the forum "Contact" --> "Send saqib.razzaq an email".

Here is my code for sending, updating and canceling the appointment.

For sending the appointment:

Appointment app = new Appointment("Location", "Meeting with Doctor", "simple description", DateTime.Now, DateTime.Now,

new MailAddress("sender@domain.com"),

new MailAddressCollection("recipient@domain.com"));

app.Description = "

test
";

MailMessage msg = new MailMessage("sender@domain.com", "recipient@domain.com", "appointment request", "appointment request");

string strMsgFile = @"E:\Data\Aspose\temp\appointment.msg";

msg.Save(strMsgFile, MessageFormat.Msg);

msg.AddAlternateView(app.RequestApointment(0));

strAppUniqueID = app.UniqueId;

SmtpClient client = new SmtpClient("mail.domain.com", "sender@domain.com", "password");

client.Send(msg);

MessageBox.Show("Appointment request sent");

// For Updating the appointment

MailMessage msg = new MailMessage("sender@domain.com", "recipient@domain.com", "appointment request", "appointment request");

Appointment app = new Appointment("Location", "Meeting with Doctor", "monthly checkup", DateTime.Now.AddDays(5), DateTime.Now.AddDays(5),

new MailAddress("sender@domain.com"),

new MailAddressCollection("recipient@domain.com"));

app.UniqueId = strAppUniqueID;

msg.AddAlternateView(app.UpdateAppointment(1));

SmtpClient client = new SmtpClient("mail.domain.com", "sender@domain.com", "password");

client.Send(msg);

MessageBox.Show("Appointment update request sent");

// For canceling the appointment

MailMessage msg = new MailMessage("sender@domain.com", "recipient@domain.com", "appointment request", "appointment request");

Appointment app = new Appointment("Location", "Meeting with Doctor", "monthly checkup", DateTime.Now.AddDays(10), DateTime.Now.AddDays(10),

new MailAddress("sender@domain.com"),

new MailAddressCollection("recipient@domain.com"));

app.UniqueId = strAppUniqueID;

msg.AddAlternateView(app.CancelAppointment(2));

SmtpClient client = new SmtpClient("mail.domain.com", "sender@domain.com", "password");

client.Send(msg);

MessageBox.Show("Appointment cancel request sent");

Hi team, i am using java aspose and i want to load “.ics” file from appointment method but it throws exception while loading the file.
here is the code

Appointment appointment = null;
	try
	{
		appointment = Appointment.load("‪C:\\Users\\DELL\\Desktop\\Calendar[32]\\1.ics");
	}
	catch(IOException ep)
	{
		System.out.println("cscs");
	} 

and the Sample ics file is 14.zip (937 Bytes)

while, this file open in outlook.

@pradeepnegi

We were able to reproduce this issue and it has been logged with ID “EMAILJAVA-34464” for further investigation. You will automatically be informed here once we have more information to share.

Moreover, it is requested to kindly mention how the ICS is generated. Is it generated using Aspose.Email or it is created manually.

This is created by third party software.

@pradeepnegi

We have recorded the details and we are working on this issue. At the moment, it looks that the ICS is not generated correctly but we are investigating and will update you as soon as we have more information to share.

But it’s opening in Ms outlook Successfully.

@pradeepnegi

Yes and we are investigating the issue so kindly give us some time to resolve it. We will update you as soon as we have more information to share.

Hi team,
MapiContact contact4 = new MapiContact();
contact4.setNameInfo(new MapiContactNamePropertySet(“Margaret”, “J.”, “Tolle”));

I want to add fourth name property in above method but it doesn’t allow it. What’s the issue.
It shows error No suitable costructor found.

@pradeepnegi

While initializing a new instance of MapiContactNamePropertySet class, you may provide following Parameters:
givenName - The string that represents a given name.
middleName - The string that represents a middle name.
surname - The string that represents a surname.

These three parameters are based on common practices used globally. But if there is a need to set more information, it can be added as a part of givenName.

Moreover, if you still think that there should be a fourth parameter then it is requested to kindly share some examples of such names and we will definitely look into it.

I want to add Business Fax telephone entry in contact but doesn’t show any option in it.

@pradeepnegi

There are various possibilities to add such information for a contact like as given below:

MapiContact contact4 = new MapiContact();
contact4.setNameInfo(new MapiContactNamePropertySet(“Margaret”, “J.”, “Tolle”));
contact4.setTelephones(new MapiContactTelephonePropertySet(primaryTelephoneNumber));
contact4.setElectronicAddresses(new MapiContact(displayName, electonicAddress, companyName));
contact4.setProfessionalInfo(new MapiContact(displayName, electonicAddress, companyName, primaryTelephoneNumber));

Moreover, you may find detailed contact structure and sample code at this link:
https://docs.aspose.com/display/emailjava/Working+with+Outlook+Contacts

thank you for your reply

is this issue resolved or not “EMAILJAVA-34464”.
This .ics file is not loading 14.zip (1006 Bytes)

it throws an exceptions : invalid string format

@pradeepnegi

Thank you for your feedback.

We have recorded the new provided files and will be considered during the resolution of this issue. We are working on this issue and it is not resolved yet. Please be patient and we will update you as soon as we have more information to share.

The issues you have found earlier (filed as EMAILJAVA-34464) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by muhammadahmad