Re: create folder in public folders using Exchange SDK and C#



Hello,

this seems like a bug to me... the first snipped should also work.

I will look into this during the weekend.

Best regards,
Henning Krause

"Parv" <Parveen.Beniwal.Daffodil@xxxxxxxxx> wrote in message news:1151667898.367260.272290@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
hi

Answering my own question ...

my code shd be like this

Connection exchConnection = new Connection("Daffoserver",
ConnectionProtocol.Http,
new Credential("parveen.beniwal", "unique",
AuthenticationType.Ntlm));
Folder folder = new Folder("public/Amit23",
exchConnection);
folder.Delete();

not like

Connection exchConnection = new Connection("Daffoserver",
ConnectionProtocol.Http,
new Credential("parveen.beniwal", "unique",
AuthenticationType.Ntlm));
Folder folder = new
Folder("http://daffoserver/public/Amit23";, exchConnection);
folder.Delete();

Regards,
Parveen Beniwal
Parv wrote:
Hi

I am trying to Delete a folder from the exchange store by using the
following code but while doing so i am facing

'InfiniTec.Threading.AsyncOperationFailedException' occurred in
InfiniTec.Threading.dll

What i am doing wrong here ?
i would be grateful.

using System;
using System.Collections.Generic;
using System.Text;
using InfiniTec.Exchange;
using System.Reflection;
using InfiniTec.Threading;

class DeleteFolderInfinitec
{
static void Main(string[] srgs)
{
try
{

Connection exchConnection = new
Connection("Daffoserver", ConnectionProtocol.Http,
new Credential("parveen.beniwal", "unique",
AuthenticationType.Ntlm));
Folder folder = new
Folder("http://daffoserver/public/testfolder";, exchConnection);
folder.Delete();
}
catch (Exception ex){
Console.WriteLine(ex.StackTrace);
}
}
}


Regards
Parveen Beniwal


Henning Krause wrote:
> Hello,
>
> you can find plenty of resource in the Exchange SDK on this topic.
>
> To delete a folder/item, issue a DELETE command on the resource.
>
> To traverse the folder hierachy, you can do a hierachical search. See > the
> SEARCH description in the SDK.
>
> You may also want to take a look at my InfiniTec.Exchange assembly > which
> covers all these operations (and it's free):
> http://www.infinitec.de/software/nettoolbox/infinitec.exchange.aspx
>
> Best regards,
> Henning Krause
>
> "Parv" <Parveen.Beniwal.Daffodil@xxxxxxxxx> wrote in message
> news:1151587683.114803.164370@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> > hi henning
> >
> > Thanx for quick reply. if there is any way to delete and traverse
> > the folder hirarchy.
> > waiting for response.
> >
> > Regards,
> > Parveen Beniwal
> >
> > Henning Krause wrote:
> >> Hello,
> >>
> >> you can do this easily with the HttpWebRequest from .NET using > >> WebDAV.
> >>
> >> Just issue a MKCOL on the url > >> http://server/public/name_of_new_folder.
> >>
> >> See > >> http://msdn.microsoft.com/library/en-us/e2k3/e2k3/_webdav_mkcol.asp
> >> for
> >> more information.
> >>
> >> Best regards,
> >> Henning Krause
> >>
> >> "Parv" <Parveen.Beniwal.Daffodil@xxxxxxxxx> wrote in message
> >> news:1151562806.519626.218170@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> >> > I want to create a folder at the public folders of any exchange
> >> > server using Exchange SDK in C#. How can i get the public folders > >> > from
> >> > SDK and create a new folder there ?
> >> > I would be very grateful.
> >> >
> >> > Thanks,
> >> > Parveen Beniwal
> >> >
> >


.



Relevant Pages


Quantcast