exchangefreaks.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Showing Error: HTTP/1.1 403 (Forbidden)

 
Post new topic   Reply to topic    exchangefreaks.com Forum Index -> MS Exchange Applications
Author Message
Atul Saxena



Joined: 12 Oct 2007
Posts: 15

PostPosted: Fri Oct 12, 2007 12:48 am    Post subject: Showing Error: HTTP/1.1 403 (Forbidden) Reply with quote

While creating an new appointment, I am getting Error: HTTP/1.1 403
(Forbidden)
error.

My code is:

xmlns:m='urn:schemas:mailheader:' xmlns:cal="urn:schemas:calendar:"
xmlns:mapi="http://schemas.microsoft.com/mapi/"
xmlns:e="http://schemas.microsoft.com/exchange/"
xmlns:dt='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/'
xmlns:mail='urn:schemas:httpmail:'>
urn:content-classes:appointmentIPM.AppointmentAQEAAAAAAEZ1AgAAAAAoCAgAAAAA
Solve Hexadecimal Error by Atul Saxena
Netaji Subhash
PalaceNetaji Subhash
Palace2007-09-27T03:30:00.000Z
2007-09-27T04:00:00.000Z
dt:dt="int">0BUSY
TENTATIVE
dt:dt="boolean">0 dt:dt="boolean">1 dt:dt="int">900ccrindiaadmin@ccrindia.com dt:dt="boolean">1

oXMLHttp = CreateObject("Microsoft.XMLHTTP")
oXMLHttp.open ("PROPPATCH",
"http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar/", False,
Me.UserNameAlias, Me.Password)
' Set up request headers.
oXMLHttp.setRequestHeader("Content-Type", "text/xml")

' Send the query.
oXMLHttp.send(sQuery)

Response is:

xmlns:b="http://schemas.microsoft.com/exchange/"
xmlns:a="DAV:">http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/CalendarHTTP/1.1
403
Forbidden

This error is not coming when I am updating any appointment but at the time
of creation this response is coming. Please tell me the solution of this.

Thanks in advance.

Atul Saxena

Archived from group: microsoft>public>exchange>applications
Back to top
View user's profile Send private message
Henning Krause [MVP - Exc



Joined: 05 Aug 2007
Posts: 142

PostPosted: Fri Oct 12, 2007 11:44 am    Post subject: Re: Showing Error: HTTP/1.1 403 (Forbidden) Reply with quote

Hello,

the DAV:id field is readonly. Just omit it when creating the appointment -
it's value is assigned by Exchange.

Kind regards,
Henning Krause

"Atul Saxena" wrote in message @microsoft.com...
> While creating an new appointment, I am getting Error: HTTP/1.1 403
> (Forbidden)
> error.
>
> My code is:
>
> > xmlns:m='urn:schemas:mailheader:' xmlns:cal="urn:schemas:calendar:"
> xmlns:mapi="http://schemas.microsoft.com/mapi/"
> xmlns:e="http://schemas.microsoft.com/exchange/"
> xmlns:dt='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/'
> xmlns:mail='urn:schemas:httpmail:'>
> urn:content-classes:appointmentIPM.AppointmentAQEAAAAAAEZ1AgAAAAAoCAgAAAAA
> Solve Hexadecimal Error by Atul
> Saxena
> Netaji Subhash
> PalaceNetaji Subhash
> Palace2007-09-27T03:30:00.000Z
> 2007-09-27T04:00:00.000Z
> > dt:dt="int">0BUSY
> TENTATIVE
> > dt:dt="boolean">0 > dt:dt="boolean">1 > dt:dt="int">900ccrindiaadmin@ccrindia.com > dt:dt="boolean">1
>
> oXMLHttp = CreateObject("Microsoft.XMLHTTP")
> oXMLHttp.open ("PROPPATCH",
> "http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar/",
> False,
> Me.UserNameAlias, Me.Password)
> ' Set up request headers.
> oXMLHttp.setRequestHeader("Content-Type",
> "text/xml")
>
> ' Send the query.
> oXMLHttp.send(sQuery)
>
> Response is:
>
> > xmlns:b="http://schemas.microsoft.com/exchange/"
> xmlns:a="DAV:">http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/CalendarHTTP/1.1
> 403
> Forbidden
>
> This error is not coming when I am updating any appointment but at the
> time
> of creation this response is coming. Please tell me the solution of this.
>
> Thanks in advance.
>
> Atul Saxena
>
>
Back to top
View user's profile Send private message
Atul Saxena



Joined: 12 Oct 2007
Posts: 15

PostPosted: Fri Oct 12, 2007 3:43 am    Post subject: Re: Showing Error: HTTP/1.1 403 (Forbidden) Reply with quote

Thanks Henning,

Its working fine now. but tell me is there any unique id of appointment
which I can create. Actully my purpose is to synchronized outlook appointment
with SQL Server and I create those appointment in exchange which is present
in sql server.

thanks & regards,

Atul

"Henning Krause [MVP - Exchange]" wrote:

> Hello,
>
> the DAV:id field is readonly. Just omit it when creating the appointment -
> it's value is assigned by Exchange.
>
> Kind regards,
> Henning Krause
>
> "Atul Saxena" wrote in message
> @microsoft.com...
> > While creating an new appointment, I am getting Error: HTTP/1.1 403
> > (Forbidden)
> > error.
> >
> > My code is:
> >
> > > > xmlns:m='urn:schemas:mailheader:' xmlns:cal="urn:schemas:calendar:"
> > xmlns:mapi="http://schemas.microsoft.com/mapi/"
> > xmlns:e="http://schemas.microsoft.com/exchange/"
> > xmlns:dt='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/'
> > xmlns:mail='urn:schemas:httpmail:'>
> > urn:content-classes:appointmentIPM.AppointmentAQEAAAAAAEZ1AgAAAAAoCAgAAAAA
> > Solve Hexadecimal Error by Atul
> > Saxena
> > Netaji Subhash
> > PalaceNetaji Subhash
> > Palace2007-09-27T03:30:00.000Z
> > 2007-09-27T04:00:00.000Z
> > > > dt:dt="int">0BUSY
> > TENTATIVE
> > > > dt:dt="boolean">0 > > dt:dt="boolean">1 > > dt:dt="int">900ccrindiaadmin@ccrindia.com > > dt:dt="boolean">1
> >
> > oXMLHttp = CreateObject("Microsoft.XMLHTTP")
> > oXMLHttp.open ("PROPPATCH",
> > "http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar/",
> > False,
> > Me.UserNameAlias, Me.Password)
> > ' Set up request headers.
> > oXMLHttp.setRequestHeader("Content-Type",
> > "text/xml")
> >
> > ' Send the query.
> > oXMLHttp.send(sQuery)
> >
> > Response is:
> >
> > > > xmlns:b="http://schemas.microsoft.com/exchange/"
> > xmlns:a="DAV:">http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/CalendarHTTP/1.1
> > 403
> > Forbidden
> >
> > This error is not coming when I am updating any appointment but at the
> > time
> > of creation this response is coming. Please tell me the solution of this.
> >
> > Thanks in advance.
> >
> > Atul Saxena
> >
> >
>
>
Back to top
View user's profile Send private message
Henning Krause [MVP - Exc



Joined: 05 Aug 2007
Posts: 142

PostPosted: Fri Oct 12, 2007 2:54 pm    Post subject: Re: Showing Error: HTTP/1.1 403 (Forbidden) Reply with quote

Hi Atul,

you can set the
http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x23
and
http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x3
to custom value. This is a byte-array, so an any arbitrary base64 will work
here. But it should be unique - I just use a Guid.NewGuid.ToByteArray() for
this.

These properties are used by Outlook to match meeting requests to their
corresponding meetings.

Both fields should contain the same value.

Kind regards,
Henning Krause

"Atul Saxena" wrote in message @microsoft.com...
> Thanks Henning,
>
> Its working fine now. but tell me is there any unique id of appointment
> which I can create. Actully my purpose is to synchronized outlook
> appointment
> with SQL Server and I create those appointment in exchange which is
> present
> in sql server.
>
> thanks & regards,
>
> Atul
>
> "Henning Krause [MVP - Exchange]" wrote:
>
>> Hello,
>>
>> the DAV:id field is readonly. Just omit it when creating the
>> appointment -
>> it's value is assigned by Exchange.
>>
>> Kind regards,
>> Henning Krause
>>
>> "Atul Saxena" wrote in message
>> @microsoft.com...
>> > While creating an new appointment, I am getting Error: HTTP/1.1 403
>> > (Forbidden)
>> > error.
>> >
>> > My code is:
>> >
>> > >> > xmlns:m='urn:schemas:mailheader:' xmlns:cal="urn:schemas:calendar:"
>> > xmlns:mapi="http://schemas.microsoft.com/mapi/"
>> > xmlns:e="http://schemas.microsoft.com/exchange/"
>> > xmlns:dt='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/'
>> > xmlns:mail='urn:schemas:httpmail:'>
>> > urn:content-classes:appointmentIPM.AppointmentAQEAAAAAAEZ1AgAAAAAoCAgAAAAA
>> > Solve Hexadecimal Error by Atul
>> > Saxena
>> > Netaji Subhash
>> > PalaceNetaji
>> > Subhash
>> > Palace2007-09-27T03:30:00.000Z
>> > 2007-09-27T04:00:00.000Z
>> > >> > dt:dt="int">0BUSY
>> > TENTATIVE
>> > >> > dt:dt="boolean">0 >> > dt:dt="boolean">1 >> > dt:dt="int">900ccrindiaadmin@ccrindia.com >> > dt:dt="boolean">1
>> >
>> > oXMLHttp = CreateObject("Microsoft.XMLHTTP")
>> > oXMLHttp.open ("PROPPATCH",
>> > "http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar/",
>> > False,
>> > Me.UserNameAlias, Me.Password)
>> > ' Set up request headers.
>> > oXMLHttp.setRequestHeader("Content-Type",
>> > "text/xml")
>> >
>> > ' Send the query.
>> > oXMLHttp.send(sQuery)
>> >
>> > Response is:
>> >
>> > >> > xmlns:b="http://schemas.microsoft.com/exchange/"
>> > xmlns:a="DAV:">http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/CalendarHTTP/1.1
>> > 403
>> > Forbidden
>> >
>> > This error is not coming when I am updating any appointment but at the
>> > time
>> > of creation this response is coming. Please tell me the solution of
>> > this.
>> >
>> > Thanks in advance.
>> >
>> > Atul Saxena
>> >
>> >
>>
>>
Back to top
View user's profile Send private message
Atul Saxena



Joined: 12 Oct 2007
Posts: 15

PostPosted: Fri Oct 12, 2007 8:23 am    Post subject: Re: Showing Error: HTTP/1.1 403 (Forbidden) Reply with quote

Hi Henning,

Thanks for quick response. As I am creating desired ID by your specified
namespace which code is mentioned below:

xmlns:m='urn:schemas:mailheader:' xmlns:cal="urn:schemas:calendar:"
xmlns:mapi="http://schemas.microsoft.com/mapi/"
xmlns:e="http://schemas.microsoft.com/exchange/"
xmlns:dt='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/'
xmlns:mail='urn:schemas:httpmail:'
xmlns:f="http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/">
urn:content-classes:appointmentIPM.AppointmentAQEAAAAAAEZ1AgAAAAAoCAkAAAAAAAQEAAAAAAEZ1AgAAAAAoCAkAAAAANo
Appointment Netaji
Subhash PalaceNetaji
Subhash
Palace2007-09-27T04:30:00.000Z
2007-09-27T05:00:00.000Z
dt:dt="int">0BUSY
TENTATIVE
dt:dt="boolean">0 dt:dt="boolean">1 dt:dt="int">900ccrindiaadmin@ccrindia.com dt:dt="boolean">1

This code is working fine and response of this is:

xmlns:g="http://schemas.microsoft.com/mapi/" xmlns:d="urn:schemas:httpmail:"
xmlns:f="urn:schemas:mailheader:"
xmlns:b="http://schemas.microsoft.com/exchange/"
xmlns:e="urn:schemas:calendar:"
xmlns:c="http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/"
xmlns:a="DAV:">http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar/No%20Appointment.EMLHTTP/1.1
200
OK

but when I fetching again the ID of the created appointment then it is
differ from assigned.

Please tell me what I am doing wrong as previous ID I had given is
AQEAAAAAAEZ1AgAAAAAoCAkAAAAA but when I fetch ID from exchange then it show
me AQEAAAAAAEZ1AgAAAAAoCAkAAAAA.

Thanks & regards,

Atul Saxena

"Henning Krause [MVP - Exchange]" wrote:

> Hi Atul,
>
> you can set the
> http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x23
> and
> http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x3
> to custom value. This is a byte-array, so an any arbitrary base64 will work
> here. But it should be unique - I just use a Guid.NewGuid.ToByteArray() for
> this.
>
> These properties are used by Outlook to match meeting requests to their
> corresponding meetings.
>
> Both fields should contain the same value.
>
> Kind regards,
> Henning Krause
>
> "Atul Saxena" wrote in message
> @microsoft.com...
> > Thanks Henning,
> >
> > Its working fine now. but tell me is there any unique id of appointment
> > which I can create. Actully my purpose is to synchronized outlook
> > appointment
> > with SQL Server and I create those appointment in exchange which is
> > present
> > in sql server.
> >
> > thanks & regards,
> >
> > Atul
> >
> > "Henning Krause [MVP - Exchange]" wrote:
> >
> >> Hello,
> >>
> >> the DAV:id field is readonly. Just omit it when creating the
> >> appointment -
> >> it's value is assigned by Exchange.
> >>
> >> Kind regards,
> >> Henning Krause
> >>
> >> "Atul Saxena" wrote in message
> >> @microsoft.com...
> >> > While creating an new appointment, I am getting Error: HTTP/1.1 403
> >> > (Forbidden)
> >> > error.
> >> >
> >> > My code is:
> >> >
> >> > > >> > xmlns:m='urn:schemas:mailheader:' xmlns:cal="urn:schemas:calendar:"
> >> > xmlns:mapi="http://schemas.microsoft.com/mapi/"
> >> > xmlns:e="http://schemas.microsoft.com/exchange/"
> >> > xmlns:dt='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/'
> >> > xmlns:mail='urn:schemas:httpmail:'>
> >> > urn:content-classes:appointmentIPM.AppointmentAQEAAAAAAEZ1AgAAAAAoCAgAAAAA
> >> > Solve Hexadecimal Error by Atul
> >> > Saxena
> >> > Netaji Subhash
> >> > PalaceNetaji
> >> > Subhash
> >> > Palace2007-09-27T03:30:00.000Z
> >> > 2007-09-27T04:00:00.000Z
> >> > > >> > dt:dt="int">0BUSY
> >> > TENTATIVE
> >> > > >> > dt:dt="boolean">0 > >> > dt:dt="boolean">1 > >> > dt:dt="int">900ccrindiaadmin@ccrindia.com > >> > dt:dt="boolean">1
> >> >
> >> > oXMLHttp = CreateObject("Microsoft.XMLHTTP")
> >> > oXMLHttp.open ("PROPPATCH",
> >> > "http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar/",
> >> > False,
> >> > Me.UserNameAlias, Me.Password)
> >> > ' Set up request headers.
> >> > oXMLHttp.setRequestHeader("Content-Type",
> >> > "text/xml")
> >> >
> >> > ' Send the query.
> >> > oXMLHttp.send(sQuery)
> >> >
> >> > Response is:
> >> >
> >> > > >> > xmlns:b="http://schemas.microsoft.com/exchange/"
> >> > xmlns:a="DAV:">http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/CalendarHTTP/1.1
> >> > 403
> >> > Forbidden
> >> >
> >> > This error is not coming when I am updating any appointment but at the
> >> > time
> >> > of creation this response is coming. Please tell me the solution of
> >> > this.
> >> >
> >> > Thanks in advance.
> >> >
> >> > Atul Saxena
> >> >
> >> >
> >>
> >>
>
>
Back to top
View user's profile Send private message
Atul Saxena



Joined: 12 Oct 2007
Posts: 15

PostPosted: Fri Oct 12, 2007 8:34 am    Post subject: Re: Showing Error: HTTP/1.1 403 (Forbidden) Reply with quote

Hi Henning,

Thanks for quick response. As I am creating desired ID by your specified
namespace which code is mentioned below:

xmlns:m='urn:schemas:mailheader:' xmlns:cal="urn:schemas:calendar:"
xmlns:mapi="http://schemas.microsoft.com/mapi/"
xmlns:e="http://schemas.microsoft.com/exchange/"
xmlns:dt='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/'
xmlns:mail='urn:schemas:httpmail:'
xmlns:f="http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/">
urn:content-classes:appointmentIPM.AppointmentAQEAAAAAAEZ1AgAAAAAoCAkAAAAAAAQEAAAAAAEZ1AgAAAAAoCAkAAAAANo
Appointment Netaji
Subhash PalaceNetaji
Subhash
Palace2007-09-27T04:30:00.000Z
2007-09-27T05:00:00.000Z
dt:dt="int">0BUSY
TENTATIVE
dt:dt="boolean">0 dt:dt="boolean">1 dt:dt="int">900ccrindiaadmin@ccrindia.com dt:dt="boolean">1

This code is working fine and response of this is:

xmlns:g="http://schemas.microsoft.com/mapi/" xmlns:d="urn:schemas:httpmail:"
xmlns:f="urn:schemas:mailheader:"
xmlns:b="http://schemas.microsoft.com/exchange/"
xmlns:e="urn:schemas:calendar:"
xmlns:c="http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/"
xmlns:a="DAV:">http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar/No%20Appointment.EMLHTTP/1.1
200
OK

but when I fetching again the ID of the created appointment then it is
differ from assigned.

Please tell me what I am doing wrong as previous ID I had given is
AQEAAAAAAEZ1AgAAAAAoCAkAAAAA but when I fetch ID from exchange then it show
me AQEAAAAAAEZ1AgAAAAAoCAkAAAAA.

Thanks & regards,

Atul Saxena

"Henning Krause [MVP - Exchange]" wrote:

> Hi Atul,
>
> you can set the
> http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x23
> and
> http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x3
> to custom value. This is a byte-array, so an any arbitrary base64 will work
> here. But it should be unique - I just use a Guid.NewGuid.ToByteArray() for
> this.
>
> These properties are used by Outlook to match meeting requests to their
> corresponding meetings.
>
> Both fields should contain the same value.
>
> Kind regards,
> Henning Krause
>
> "Atul Saxena" wrote in message
> @microsoft.com...
> > Thanks Henning,
> >
> > Its working fine now. but tell me is there any unique id of appointment
> > which I can create. Actully my purpose is to synchronized outlook
> > appointment
> > with SQL Server and I create those appointment in exchange which is
> > present
> > in sql server.
> >
> > thanks & regards,
> >
> > Atul
> >
> > "Henning Krause [MVP - Exchange]" wrote:
> >
> >> Hello,
> >>
> >> the DAV:id field is readonly. Just omit it when creating the
> >> appointment -
> >> it's value is assigned by Exchange.
> >>
> >> Kind regards,
> >> Henning Krause
> >>
> >> "Atul Saxena" wrote in message
> >> @microsoft.com...
> >> > While creating an new appointment, I am getting Error: HTTP/1.1 403
> >> > (Forbidden)
> >> > error.
> >> >
> >> > My code is:
> >> >
> >> > > >> > xmlns:m='urn:schemas:mailheader:' xmlns:cal="urn:schemas:calendar:"
> >> > xmlns:mapi="http://schemas.microsoft.com/mapi/"
> >> > xmlns:e="http://schemas.microsoft.com/exchange/"
> >> > xmlns:dt='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/'
> >> > xmlns:mail='urn:schemas:httpmail:'>
> >> > urn:content-classes:appointmentIPM.AppointmentAQEAAAAAAEZ1AgAAAAAoCAgAAAAA
> >> > Solve Hexadecimal Error by Atul
> >> > Saxena
> >> > Netaji Subhash
> >> > PalaceNetaji
> >> > Subhash
> >> > Palace2007-09-27T03:30:00.000Z
> >> > 2007-09-27T04:00:00.000Z
> >> > > >> > dt:dt="int">0BUSY
> >> > TENTATIVE
> >> > > >> > dt:dt="boolean">0 > >> > dt:dt="boolean">1 > >> > dt:dt="int">900ccrindiaadmin@ccrindia.com > >> > dt:dt="boolean">1
> >> >
> >> > oXMLHttp = CreateObject("Microsoft.XMLHTTP")
> >> > oXMLHttp.open ("PROPPATCH",
> >> > "http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar/",
> >> > False,
> >> > Me.UserNameAlias, Me.Password)
> >> > ' Set up request headers.
> >> > oXMLHttp.setRequestHeader("Content-Type",
> >> > "text/xml")
> >> >
> >> > ' Send the query.
> >> > oXMLHttp.send(sQuery)
> >> >
> >> > Response is:
> >> >
> >> > > >> > xmlns:b="http://schemas.microsoft.com/exchange/"
> >> > xmlns:a="DAV:">http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/CalendarHTTP/1.1
> >> > 403
> >> > Forbidden
> >> >
> >> > This error is not coming when I am updating any appointment but at the
> >> > time
> >> > of creation this response is coming. Please tell me the solution of
> >> > this.
> >> >
> >> > Thanks in advance.
> >> >
> >> > Atul Saxena
> >> >
> >> >
> >>
> >>
>
>
Back to top
View user's profile Send private message
Henning Krause [MVP - Exc



Joined: 05 Aug 2007
Posts: 142

PostPosted: Fri Oct 12, 2007 5:36 pm    Post subject: Re: Showing Error: HTTP/1.1 403 (Forbidden) Reply with quote

Hello,

the string you are setting is invalid.
AQEAAAAAAEZ1AgAAAAAoCAkAAAAAA

has an invalid length for a Base64 string. Exchange seems to truncate this
to the next valid size.

How are you encoding your request?
Convert.ToBase64String(Guid.NewGuid().ToByteArray())?

Kind regards,
Henning



"Atul Saxena" wrote in message @microsoft.com...
> Hi Henning,
>
> Thanks for quick response. As I am creating desired ID by your specified
> namespace which code is mentioned below:
>
> > xmlns:m='urn:schemas:mailheader:' xmlns:cal="urn:schemas:calendar:"
> xmlns:mapi="http://schemas.microsoft.com/mapi/"
> xmlns:e="http://schemas.microsoft.com/exchange/"
> xmlns:dt='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/'
> xmlns:mail='urn:schemas:httpmail:'
> xmlns:f="http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/">
> urn:content-classes:appointmentIPM.AppointmentAQEAAAAAAEZ1AgAAAAAoCAkAAAAAAAQEAAAAAAEZ1AgAAAAAoCAkAAAAANo
> Appointment Netaji
> Subhash PalaceNetaji
> Subhash
> Palace2007-09-27T04:30:00.000Z
> 2007-09-27T05:00:00.000Z
> > dt:dt="int">0BUSY
> TENTATIVE
> > dt:dt="boolean">0 > dt:dt="boolean">1 > dt:dt="int">900ccrindiaadmin@ccrindia.com > dt:dt="boolean">1
>
> This code is working fine and response of this is:
>
> > xmlns:g="http://schemas.microsoft.com/mapi/"
> xmlns:d="urn:schemas:httpmail:"
> xmlns:f="urn:schemas:mailheader:"
> xmlns:b="http://schemas.microsoft.com/exchange/"
> xmlns:e="urn:schemas:calendar:"
> xmlns:c="http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/"
> xmlns:a="DAV:">http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar/No%20Appointment.EMLHTTP/1.1
> 200
> OK
>
> but when I fetching again the ID of the created appointment then it is
> differ from assigned.
>
> Please tell me what I am doing wrong as previous ID I had given is
> AQEAAAAAAEZ1AgAAAAAoCAkAAAAA but when I fetch ID from exchange then it
> show
> me AQEAAAAAAEZ1AgAAAAAoCAkAAAAA.
>
> Thanks & regards,
>
> Atul Saxena
>
> "Henning Krause [MVP - Exchange]" wrote:
>
>> Hi Atul,
>>
>> you can set the
>> http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x23
>> and
>> http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x3
>> to custom value. This is a byte-array, so an any arbitrary base64 will
>> work
>> here. But it should be unique - I just use a Guid.NewGuid.ToByteArray()
>> for
>> this.
>>
>> These properties are used by Outlook to match meeting requests to their
>> corresponding meetings.
>>
>> Both fields should contain the same value.
>>
>> Kind regards,
>> Henning Krause
>>
>> "Atul Saxena" wrote in message
>> @microsoft.com...
>> > Thanks Henning,
>> >
>> > Its working fine now. but tell me is there any unique id of appointment
>> > which I can create. Actully my purpose is to synchronized outlook
>> > appointment
>> > with SQL Server and I create those appointment in exchange which is
>> > present
>> > in sql server.
>> >
>> > thanks & regards,
>> >
>> > Atul
>> >
>> > "Henning Krause [MVP - Exchange]" wrote:
>> >
>> >> Hello,
>> >>
>> >> the DAV:id field is readonly. Just omit it when creating the
>> >> appointment -
>> >> it's value is assigned by Exchange.
>> >>
>> >> Kind regards,
>> >> Henning Krause
>> >>
>> >> "Atul Saxena" wrote in message
>> >> @microsoft.com...
>> >> > While creating an new appointment, I am getting Error: HTTP/1.1 403
>> >> > (Forbidden)
>> >> > error.
>> >> >
>> >> > My code is:
>> >> >
>> >> > >> >> > xmlns:m='urn:schemas:mailheader:' xmlns:cal="urn:schemas:calendar:"
>> >> > xmlns:mapi="http://schemas.microsoft.com/mapi/"
>> >> > xmlns:e="http://schemas.microsoft.com/exchange/"
>> >> > xmlns:dt='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/'
>> >> > xmlns:mail='urn:schemas:httpmail:'>
>> >> > urn:content-classes:appointmentIPM.AppointmentAQEAAAAAAEZ1AgAAAAAoCAgAAAAA
>> >> > Solve Hexadecimal Error by
>> >> > Atul
>> >> > Saxena
>> >> > Netaji Subhash
>> >> > PalaceNetaji
>> >> > Subhash
>> >> > Palace2007-09-27T03:30:00.000Z
>> >> > 2007-09-27T04:00:00.000Z
>> >> > >> >> > dt:dt="int">0BUSY
>> >> > TENTATIVE
>> >> > >> >> > dt:dt="boolean">0 >> >> > dt:dt="boolean">1 >> >> > dt:dt="int">900ccrindiaadmin@ccrindia.com >> >> > dt:dt="boolean">1
>> >> >
>> >> > oXMLHttp = CreateObject("Microsoft.XMLHTTP")
>> >> > oXMLHttp.open ("PROPPATCH",
>> >> > "http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar/",
>> >> > False,
>> >> > Me.UserNameAlias, Me.Password)
>> >> > ' Set up request headers.
>> >> > oXMLHttp.setRequestHeader("Content-Type",
>> >> > "text/xml")
>> >> >
>> >> > ' Send the query.
>> >> > oXMLHttp.send(sQuery)
>> >> >
>> >> > Response is:
>> >> >
>> >> > >> >> > xmlns:b="http://schemas.microsoft.com/exchange/"
>> >> > xmlns:a="DAV:">http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/CalendarHTTP/1.1
>> >> > 403
>> >> > Forbidden
>> >> >
>> >> > This error is not coming when I am updating any appointment but at
>> >> > the
>> >> > time
>> >> > of creation this response is coming. Please tell me the solution of
>> >> > this.
>> >> >
>> >> > Thanks in advance.
>> >> >
>> >> > Atul Saxena
>> >> >
>> >> >
>> >>
>> >>
>>
>>
Back to top
View user's profile Send private message
Atul Saxena



Joined: 12 Oct 2007
Posts: 15

PostPosted: Mon Oct 15, 2007 1:47 am    Post subject: Re: Showing Error: HTTP/1.1 403 (Forbidden) Reply with quote

Dear Henning,

What I do is first I synchronized outlook appointment of an user to sql
server means all the appointment would be created in sql server in following
format:

ID nvarchar(1000) Checked
Href text Checked
LastModificationDate datetime Checked
Subject text Checked
TextDescription text Checked
Location nvarchar(150) Checked
DtStart datetime Checked
DtEnd datetime Checked
InstanceType nvarchar(150) Checked
BusyStatus nvarchar(50) Checked
MeetingStatus nvarchar(50) Checked
AllDayEvent bit Checked
ResponseRequested bit Checked
ReminderOffset int Checked
MailSender nvarchar(1500) Checked
MailTo nvarchar(1500) Checked
MailType smallint Checked

In above table ID contains the ID of Appointment like
AQEAAAAAAEZ1AgAAAAAoCAkAAAAAA. Now If user delete a particular appointment
then I execute a query in which that deleted appoinment ID is fetched. After
fetching that appointment ID from Sql Server, I want create that appointment
in outlook with SQL Server ID. Now I am facing a problem that when I generate
appointment in outlook with that SQL server ID then it would generate it own
ID. So tell me is there any way of generating appointment on my given ID.

My code of generating appointment is given below

Private Sub psbCreateDataAtOutlook(ByVal strURI As System.String)
Dim oDataset As New DataSet
Dim strTableName As String = "CreateDataAtOutlook"
Dim iCtr As System.Int16
Dim status As Integer
Try
oDataset = fnGetSource(strTableName, strAllIDs, 0)
If oDataset.Tables(strTableName).Rows.Count > 0 Then
If Me.MailType = 2 Then
For iCtr = 0 To oDataset.Tables(strTableName).Rows.Count
- 1
sQuery = "" & _
" xmlns:a='DAV:' xmlns:m='urn:schemas:mailheader:'
xmlns:cal=""urn:schemas:calendar:"" " & _

"xmlns:mapi=""http://schemas.microsoft.com/mapi/"" " & _

"xmlns:e=""http://schemas.microsoft.com/exchange/"" " & _

"xmlns:dt='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/' " & _

"xmlns:mail='urn:schemas:httpmail:' " & _

"xmlns:f=""http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/""> " & _
"" & _
"" & _

"urn:content-classes:appointment" & _

"IPM.Appointment" & _
"" &
IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(0)), "",
oDataset.Tables(strTableName).Rows(iCtr).Item(0)) & "" & _
"" &
IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(0)), "",
oDataset.Tables(strTableName).Rows(iCtr).Item(0)) & "" & _
"" & _
"" & _
"" &
IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(2)), "",
oDataset.Tables(strTableName).Rows(iCtr).Item(2)) & " " & _
"" & _
"" & _

"Netaji Subhash Palace" & _
"" & _
"" & _
"Netaji
Subhash Palace" & _
"" & _
"" & _
"" &
fnChangerDateLocalGMT(oDataset.Tables(strTableName).Rows(iCtr).Item(5)) & "
" & _
"" & _
"" & _
"" &
fnChangerDateLocalGMT(oDataset.Tables(strTableName).Rows(iCtr).Item(6)) & "
" & _
" dt:dt=""int"">0" & _
"" & _
"" & _
"" &
IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(7)), "",
oDataset.Tables(strTableName).Rows(0).Item(7)) & " " & _
"" & _
"" & _
""
& IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(Cool), "",
oDataset.Tables(strTableName).Rows(0).Item(Cool) & " " & _
" dt:dt=""boolean"">0" & _

"1" & _
" dt:dt=""int"">900" & _
"" &
Me.UserNameAlias & "" & _
" dt:dt=""boolean"">1" & _
"" & _
"" & _
""

'oXMLHttp = CreateObject("Microsoft.XMLHTTP")
oXMLHttp.open("PROPPATCH",
oDataset.Tables(strTableName).Rows(iCtr).Item(1), False, Me.UserNameAlias,
Me.Password)
' Set up request headers.
oXMLHttp.setRequestHeader("Content-Type", "text/xml")
'oXMLHttp.setRequestHeader("Brief", "t")
' Send the query.
oXMLHttp.send(sQuery)
status = CheckStatus(oXMLHttp.status)
MsgBox(oXMLHttp.responseText)
Next

ElseIf Me.MailType = 3 Then
For iCtr = 0 To oDataset.Tables(strTableName).Rows.Count
- 1
sQuery = ""
& _
" xmlns:a='DAV:' xmlns:m='urn:schemas:mailheader:' " & _

"xmlns:b='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/' " & _

"xmlns:g='urn:schemas:httpmail:' " & _

"xmlns:i='http://schemas.microsoft.com/mapi/id/" & _

"{00062008-0000-0000-C000-000000000046}/' " & _

"xmlns:h='http://schemas.microsoft.com/mapi/id/" & _

"{00062003-0000-0000-C000-000000000046}/'> " & _
"" & _
"" & _
"" &
IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(0)), "",
oDataset.Tables(strTableName).Rows(iCtr).Item(0)) & " " & _
"" & _
"" & _
"" &
IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(1)), "",
oDataset.Tables(strTableName).Rows(iCtr).Item(1)) & " " & _
"" & _
"" & _
"" &
IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(2)), "",
oDataset.Tables(strTableName).Rows(iCtr).Item(2)) & " " & _
"" & _
"" & _
"" &
IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(3)), "",
oDataset.Tables(strTableName).Rows(iCtr).Item(3)) & " " &
_
"" & _
"" & _
""

' Set up request headers.
oXMLHttp.setRequestHeader("Content-Type", "text/xml")
oXMLHttp.setRequestHeader("Brief", "t")
' Send the query.
oXMLHttp.send(sQuery)
Next
End If

End If

Catch ex As Exception
oDataset.Dispose()
oDataset = Nothing
End Try
End Sub


Private Function fnGetSource(ByVal StrTableName As String, ByVal strAllID
As System.String, ByVal iTransType As System.Int16) As DataSet

Try

MyClass.dProcess = New CCRDataSite.dclProcess
MyClass.dProcess.SetCommandText = "prcGetDataForSynchronization"
MyClass.dProcess.SetCommandType = CommandType.StoredProcedure
MyClass.dProcess.AddParameter("@ID", SqlDbType.NVarChar, strAllID)
MyClass.dProcess.AddParameter("@MailType", SqlDbType.SmallInt,
Me.MailType)
MyClass.dProcess.AddParameter("@TransType", SqlDbType.SmallInt,
iTransType)

Return MyClass.dProcess.ReturnDataSet(StrTableName, False)
Catch ex As Exception
Throw New Exception(ex.Message, ex.InnerException)
Finally
dProcess.Dispose()
dProcess = Nothing
End Try
End Function

Sql procedure "prcGetDataForSynchronization" returns data of appoinment
which is present in SQL server but not in Outlook.

Please tell me how could I tell exchange to accept my Appointment ID as I
tried generating ID from Convert.ToBase64String(Guid.NewGuid().ToByteArray())
but its not working coz in this exchange create also its own ID.

If it is not possible to create appointment from given ID then tell me is
there any way to know ID of that created appointment in response text.

Thanks & regards,

Atul Saxena
"Henning Krause [MVP - Exchange]" wrote:

> Hello,
>
> the string you are setting is invalid.
> AQEAAAAAAEZ1AgAAAAAoCAkAAAAAA
>
> has an invalid length for a Base64 string. Exchange seems to truncate this
> to the next valid size.
>
> How are you encoding your request?
> Convert.ToBase64String(Guid.NewGuid().ToByteArray())?
>
> Kind regards,
> Henning
>
>
>
> "Atul Saxena" wrote in message
> @microsoft.com...
> > Hi Henning,
> >
> > Thanks for quick response. As I am creating desired ID by your specified
> > namespace which code is mentioned below:
> >
> > > > xmlns:m='urn:schemas:mailheader:' xmlns:cal="urn:schemas:calendar:"
> > xmlns:mapi="http://schemas.microsoft.com/mapi/"
> > xmlns:e="http://schemas.microsoft.com/exchange/"
> > xmlns:dt='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/'
> > xmlns:mail='urn:schemas:httpmail:'
> > xmlns:f="http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/">
> > urn:content-classes:appointmentIPM.AppointmentAQEAAAAAAEZ1AgAAAAAoCAkAAAAAAAQEAAAAAAEZ1AgAAAAAoCAkAAAAANo
> > Appointment Netaji
> > Subhash PalaceNetaji
> > Subhash
> > Palace2007-09-27T04:30:00.000Z
> > 2007-09-27T05:00:00.000Z
> > > > dt:dt="int">0BUSY
> > TENTATIVE
> > > > dt:dt="boolean">0 > > dt:dt="boolean">1 > > dt:dt="int">900ccrindiaadmin@ccrindia.com > > dt:dt="boolean">1
> >
> > This code is working fine and response of this is:
> >
> > > > xmlns:g="http://schemas.microsoft.com/mapi/"
> > xmlns:d="urn:schemas:httpmail:"
> > xmlns:f="urn:schemas:mailheader:"
> > xmlns:b="http://schemas.microsoft.com/exchange/"
> > xmlns:e="urn:schemas:calendar:"
> > xmlns:c="http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/"
> > xmlns:a="DAV:">http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar/No%20Appointment.EMLHTTP/1.1
> > 200
> > OK
> >
> > but when I fetching again the ID of the created appointment then it is
> > differ from assigned.
> >
> > Please tell me what I am doing wrong as previous ID I had given is
> > AQEAAAAAAEZ1AgAAAAAoCAkAAAAA but when I fetch ID from exchange then it
> > show
> > me AQEAAAAAAEZ1AgAAAAAoCAkAAAAA.
> >
> > Thanks & regards,
> >
> > Atul Saxena
> >
> > "Henning Krause [MVP - Exchange]" wrote:
> >
> >> Hi Atul,
> >>
> >> you can set the
> >> http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x23
> >> and
> >> http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x3
> >> to custom value. This is a byte-array, so an any arbitrary base64 will
> >> work
> >> here. But it should be unique - I just use a Guid.NewGuid.ToByteArray()
> >> for
> >> this.
> >>
> >> These properties are used by Outlook to match meeting requests to their
> >> corresponding meetings.
> >>
> >> Both fields should contain the same value.
> >>
> >> Kind regards,
> >> Henning Krause
> >>
> >> "Atul Saxena" wrote in message
> >> @microsoft.com...
> >> > Thanks Henning,
> >> >
> >> > Its working fine now. but tell me is there any unique id of appointment
> >> > which I can create. Actully my purpose is to synchronized outlook
> >> > appointment
> >> > with SQL Server and I create those appointment in exchange which is
> >> > present
> >> > in sql server.
> >> >
> >> > thanks & regards,
> >> >
> >> > Atul
> >> >
> >> > "Henning Krause [MVP - Exchange]" wrote:
> >> >
> >> >> Hello,
> >> >>
> >> >> the DAV:id field is readonly. Just omit it when creating the
> >> >> appointment -
> >> >> it's value is assigned by Exchange.
> >> >>
> >> >> Kind regards,
> >> >> Henning Krause
> >> >>
> >> >> "Atul Saxena" wrote in message
> >> >> @microsoft.com...
> >> >> > While creating an new appointment, I am getting Error: HTTP/1.1 403
> >> >> > (Forbidden)
> >> >> > error.
> >> >> >
> >> >> > My code is:
> >> >> >
> >> >> > > >> >> > xmlns:m='urn:schemas:mailheader:' xmlns:cal="urn:schemas:calendar:"
> >> >> > xmlns:mapi="http://schemas.microsoft.com/mapi/"
> >> >> > xmlns:e="http://schemas.microsoft.com/exchange/"
> >> >> > xmlns:dt='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/'
> >> >> > xmlns:mail='urn:schemas:httpmail:'>
> >> >> > urn:content-classes:appointmentIPM.AppointmentAQEAAAAAAEZ1AgAAAAAoCAgAAAAA
> >> >> > Solve Hexadecimal Error by
> >> >> > Atul
> >> >> > Saxena
> >> >> > Netaji Subhash
> >> >> > PalaceNetaji
> >> >> > Subhash
> >> >> > Palace2007-09-27T03:30:00.000Z
> >> >> > 2007-09-27T04:00:00.000Z
> >> >> > > >> >> > dt:dt="int">0BUSY
> >> >> > TENTATIVE
> >> >> > > >> >> > dt:dt="boolean">0 > >> >> > dt:dt="boolean">1 > >> >> > dt:dt="int">900ccrindiaadmin@ccrindia.com > >> >> > dt:dt="boolean">1
> >> >> >
> >> >> > oXMLHttp = CreateObject("Microsoft.XMLHTTP")
> >> >> > oXMLHttp.open ("PROPPATCH",
> >> >> > "http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar/",
> >> >> > False,
> >> >> > Me.UserNameAlias, Me.Password)
> >> >> > ' Set up request headers.
> >> >> > oXMLHttp.setRequestHeader("Content-Type",
> >> >> > "text/xml")
> >> >> >
> >> >> > ' Send the query.
> >> >> > oXMLHttp.send(sQuery)
> >> >> >
> >> >> > Response is:
> >> >> >
> >> >> > > >> >> > xmlns:b="http://schemas.microsoft.com/exchange/"
> >> >> > xmlns:a="DAV:">http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/CalendarHTTP/1.1
> >> >> > 403
> >> >> > Forbidden
> >> >> >
> >> >> > This error is not coming when I am updating any appointment but at
> >> >> > the
> >> >> > time
> >> >> > of creation this response is coming. Please tell me the solution of
> >> >> > this.
> >> >> >
> >> >> > Thanks in advance.
> >> >> >
> >> >> > Atul Saxena
> >> >> >
> >> >> >
> >> >>
> >> >>
> >>
> >>
>
>
Back to top
View user's profile Send private message
Henning Krause [MVP - Exc



Joined: 05 Aug 2007
Posts: 142

PostPosted: Mon Oct 15, 2007 9:46 pm    Post subject: Re: Showing Error: HTTP/1.1 403 (Forbidden) Reply with quote

Hello Atul,

If I you set the the property I mentioned to a valid Base64 encoded byte
array, Exchange will retain that value in that property - if you later use
this value to search for that appointment, Exchange will return it.

The properties
http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x23
and
http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x3
will retain their values if you set them to a valid binary value.

All other Exchange id (EntryId, DAV:id, etc) will be set by Outlook and can
not be modified.

I'm still somewhat confused about what you are trying to do. Do you
effectively want to prevent your users to delete an appointment because you
recreate it when they delete it?

Kind regards,
Henning Krause

"Atul Saxena" wrote in message @microsoft.com...
> Dear Henning,
>
> What I do is first I synchronized outlook appointment of an user to sql
> server means all the appointment would be created in sql server in
> following
> format:
>
> ID nvarchar(1000) Checked
> Href text Checked
> LastModificationDate datetime Checked
> Subject text Checked
> TextDescription text Checked
> Location nvarchar(150) Checked
> DtStart datetime Checked
> DtEnd datetime Checked
> InstanceType nvarchar(150) Checked
> BusyStatus nvarchar(50) Checked
> MeetingStatus nvarchar(50) Checked
> AllDayEvent bit Checked
> ResponseRequested bit Checked
> ReminderOffset int Checked
> MailSender nvarchar(1500) Checked
> MailTo nvarchar(1500) Checked
> MailType smallint Checked
>
> In above table ID contains the ID of Appointment like
> AQEAAAAAAEZ1AgAAAAAoCAkAAAAAA. Now If user delete a particular appointment
> then I execute a query in which that deleted appoinment ID is fetched.
> After
> fetching that appointment ID from Sql Server, I want create that
> appointment
> in outlook with SQL Server ID. Now I am facing a problem that when I
> generate
> appointment in outlook with that SQL server ID then it would generate it
> own
> ID. So tell me is there any way of generating appointment on my given ID.
>
> My code of generating appointment is given below
>
> Private Sub psbCreateDataAtOutlook(ByVal strURI As System.String)
> Dim oDataset As New DataSet
> Dim strTableName As String = "CreateDataAtOutlook"
> Dim iCtr As System.Int16
> Dim status As Integer
> Try
> oDataset = fnGetSource(strTableName, strAllIDs, 0)
> If oDataset.Tables(strTableName).Rows.Count > 0 Then
> If Me.MailType = 2 Then
> For iCtr = 0 To
> oDataset.Tables(strTableName).Rows.Count
> - 1
> sQuery = "" &
> _
> " > xmlns:a='DAV:' xmlns:m='urn:schemas:mailheader:'
> xmlns:cal=""urn:schemas:calendar:"" " & _
>
> "xmlns:mapi=""http://schemas.microsoft.com/mapi/"" " & _
>
> "xmlns:e=""http://schemas.microsoft.com/exchange/"" " & _
>
> "xmlns:dt='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/' " & _
>
> "xmlns:mail='urn:schemas:httpmail:' " & _
>
> "xmlns:f=""http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/"">
> " & _
> "" & _
> "" & _
>
> "urn:content-classes:appointment" & _
>
> "IPM.Appointment" & _
> "" &
> IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(0)), "",
> oDataset.Tables(strTableName).Rows(iCtr).Item(0)) & "" & _
> "" &
> IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(0)), "",
> oDataset.Tables(strTableName).Rows(iCtr).Item(0)) & "" & _
> "" & _
> "" & _
> "" &
> IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(2)), "",
> oDataset.Tables(strTableName).Rows(iCtr).Item(2)) & " " & _
> "" & _
> "" & _
>
> "Netaji Subhash Palace" & _
> "" & _
> "" & _
> "Netaji
> Subhash Palace" & _
> "" & _
> "" & _
> "" &
> fnChangerDateLocalGMT(oDataset.Tables(strTableName).Rows(iCtr).Item(5)) &
> "
> " & _
> "" & _
> "" & _
> "" &
> fnChangerDateLocalGMT(oDataset.Tables(strTableName).Rows(iCtr).Item(6)) &
> "
> " & _
> " > dt:dt=""int"">0" & _
> "" & _
> "" & _
> "" &
> IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(7)), "",
> oDataset.Tables(strTableName).Rows(0).Item(7)) & " " & _
> "" & _
> "" & _
> ""
> & IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(Cool), "",
> oDataset.Tables(strTableName).Rows(0).Item(Cool) & " " &
> _
> " > dt:dt=""boolean"">0" & _
>
> "1" & _
> " > dt:dt=""int"">900" & _
> "" &
> Me.UserNameAlias & "" & _
> " > dt:dt=""boolean"">1" & _
> "" & _
> "" & _
> ""
>
> 'oXMLHttp = CreateObject("Microsoft.XMLHTTP")
> oXMLHttp.open("PROPPATCH",
> oDataset.Tables(strTableName).Rows(iCtr).Item(1), False, Me.UserNameAlias,
> Me.Password)
> ' Set up request headers.
> oXMLHttp.setRequestHeader("Content-Type",
> "text/xml")
> 'oXMLHttp.setRequestHeader("Brief", "t")
> ' Send the query.
> oXMLHttp.send(sQuery)
> status = CheckStatus(oXMLHttp.status)
> MsgBox(oXMLHttp.responseText)
> Next
>
> ElseIf Me.MailType = 3 Then
> For iCtr = 0 To
> oDataset.Tables(strTableName).Rows.Count
> - 1
> sQuery = ""
> & _
> " > xmlns:a='DAV:' xmlns:m='urn:schemas:mailheader:' " & _
>
> "xmlns:b='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/' " & _
>
> "xmlns:g='urn:schemas:httpmail:' " & _
>
> "xmlns:i='http://schemas.microsoft.com/mapi/id/" & _
>
> "{00062008-0000-0000-C000-000000000046}/' " & _
>
> "xmlns:h='http://schemas.microsoft.com/mapi/id/" & _
>
> "{00062003-0000-0000-C000-000000000046}/'> " & _
> "" & _
> "" & _
> "" &
> IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(0)), "",
> oDataset.Tables(strTableName).Rows(iCtr).Item(0)) & " " & _
> "" & _
> "" & _
> "" &
> IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(1)), "",
> oDataset.Tables(strTableName).Rows(iCtr).Item(1)) & " " & _
> "" & _
> "" & _
> "" &
> IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(2)), "",
> oDataset.Tables(strTableName).Rows(iCtr).Item(2)) & " " & _
> "" & _
> "" & _
> "" &
> IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(3)), "",
> oDataset.Tables(strTableName).Rows(iCtr).Item(3)) & "
> " &
> _
> "" & _
> "" & _
> ""
>
> ' Set up request headers.
> oXMLHttp.setRequestHeader("Content-Type",
> "text/xml")
> oXMLHttp.setRequestHeader("Brief", "t")
> ' Send the query.
> oXMLHttp.send(sQuery)
> Next
> End If
>
> End If
>
> Catch ex As Exception
> oDataset.Dispose()
> oDataset = Nothing
> End Try
> End Sub
>
>
> Private Function fnGetSource(ByVal StrTableName As String, ByVal
> strAllID
> As System.String, ByVal iTransType As System.Int16) As DataSet
>
> Try
>
> MyClass.dProcess = New CCRDataSite.dclProcess
> MyClass.dProcess.SetCommandText =
> "prcGetDataForSynchronization"
> MyClass.dProcess.SetCommandType = CommandType.StoredProcedure
> MyClass.dProcess.AddParameter("@ID", SqlDbType.NVarChar,
> strAllID)
> MyClass.dProcess.AddParameter("@MailType", SqlDbType.SmallInt,
> Me.MailType)
> MyClass.dProcess.AddParameter("@TransType", SqlDbType.SmallInt,
> iTransType)
>
> Return MyClass.dProcess.ReturnDataSet(StrTableName, False)
> Catch ex As Exception
> Throw New Exception(ex.Message, ex.InnerException)
> Finally
> dProcess.Dispose()
> dProcess = Nothing
> End Try
> End Function
>
> Sql procedure "prcGetDataForSynchronization" returns data of appoinment
> which is present in SQL server but not in Outlook.
>
> Please tell me how could I tell exchange to accept my Appointment ID as I
> tried generating ID from
> Convert.ToBase64String(Guid.NewGuid().ToByteArray())
> but its not working coz in this exchange create also its own ID.
>
> If it is not possible to create appointment from given ID then tell me is
> there any way to know ID of that created appointment in response text.
>
> Thanks & regards,
>
> Atul Saxena
> "Henning Krause [MVP - Exchange]" wrote:
>
>> Hello,
>>
>> the string you are setting is invalid.
>> AQEAAAAAAEZ1AgAAAAAoCAkAAAAAA
>>
>> has an invalid length for a Base64 string. Exchange seems to truncate
>> this
>> to the next valid size.
>>
>> How are you encoding your request?
>> Convert.ToBase64String(Guid.NewGuid().ToByteArray())?
>>
>> Kind regards,
>> Henning
>>
>>
>>
>> "Atul Saxena" wrote in message
>> @microsoft.com...
>> > Hi Henning,
>> >
>> > Thanks for quick response. As I am creating desired ID by your
>> > specified
>> > namespace which code is mentioned below:
>> >
>> > >> > xmlns:m='urn:schemas:mailheader:' xmlns:cal="urn:schemas:calendar:"
>> > xmlns:mapi="http://schemas.microsoft.com/mapi/"
>> > xmlns:e="http://schemas.microsoft.com/exchange/"
>> > xmlns:dt='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/'
>> > xmlns:mail='urn:schemas:httpmail:'
>> > xmlns:f="http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/">
>> > urn:content-classes:appointmentIPM.AppointmentAQEAAAAAAEZ1AgAAAAAoCAkAAAAAAAQEAAAAAAEZ1AgAAAAAoCAkAAAAANo
>> > Appointment
>> > Netaji
>> > Subhash
>> > PalaceNetaji
>> > Subhash
>> > Palace2007-09-27T04:30:00.000Z
>> > 2007-09-27T05:00:00.000Z
>> > >> > dt:dt="int">0BUSY
>> > TENTATIVE
>> > >> > dt:dt="boolean">0 >> > dt:dt="boolean">1 >> > dt:dt="int">900ccrindiaadmin@ccrindia.com >> > dt:dt="boolean">1
>> >
>> > This code is working fine and response of this is:
>> >
>> > >> > xmlns:g="http://schemas.microsoft.com/mapi/"
>> > xmlns:d="urn:schemas:httpmail:"
>> > xmlns:f="urn:schemas:mailheader:"
>> > xmlns:b="http://schemas.microsoft.com/exchange/"
>> > xmlns:e="urn:schemas:calendar:"
>> > xmlns:c="http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/"
>> > xmlns:a="DAV:">http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar/No%20Appointment.EMLHTTP/1.1
>> > 200
>> > OK
>> >
>> > but when I fetching again the ID of the created appointment then it is
>> > differ from assigned.
>> >
>> > Please tell me what I am doing wrong as previous ID I had given is
>> > AQEAAAAAAEZ1AgAAAAAoCAkAAAAA but when I fetch ID from exchange then it
>> > show
>> > me AQEAAAAAAEZ1AgAAAAAoCAkAAAAA.
>> >
>> > Thanks & regards,
>> >
>> > Atul Saxena
>> >
>> > "Henning Krause [MVP - Exchange]" wrote:
>> >
>> >> Hi Atul,
>> >>
>> >> you can set the
>> >> http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x23
>> >> and
>> >> http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x3
>> >> to custom value. This is a byte-array, so an any arbitrary base64 will
>> >> work
>> >> here. But it should be unique - I just use a
>> >> Guid.NewGuid.ToByteArray()
>> >> for
>> >> this.
>> >>
>> >> These properties are used by Outlook to match meeting requests to
>> >> their
>> >> corresponding meetings.
>> >>
>> >> Both fields should contain the same value.
>> >>
>> >> Kind regards,
>> >> Henning Krause
>> >>
>> >> "Atul Saxena" wrote in message
>> >> @microsoft.com...
>> >> > Thanks Henning,
>> >> >
>> >> > Its working fine now. but tell me is there any unique id of
>> >> > appointment
>> >> > which I can create. Actully my purpose is to synchronized outlook
>> >> > appointment
>> >> > with SQL Server and I create those appointment in exchange which is
>> >> > present
>> >> > in sql server.
>> >> >
>> >> > thanks & regards,
>> >> >
>> >> > Atul
>> >> >
>> >> > "Henning Krause [MVP - Exchange]" wrote:
>> >> >
>> >> >> Hello,
>> >> >>
>> >> >> the DAV:id field is readonly. Just omit it when creating the
>> >> >> appointment -
>> >> >> it's value is assigned by Exchange.
>> >> >>
>> >> >> Kind regards,
>> >> >> Henning Krause
>> >> >>
>> >> >> "Atul Saxena" wrote in
>> >> >> message
>> >> >> @microsoft.com...
>> >> >> > While creating an new appointment, I am getting Error: HTTP/1.1
>> >> >> > 403
>> >> >> > (Forbidden)
>> >> >> > error.
>> >> >> >
>> >> >> > My code is:
>> >> >> >
>> >> >> > >> >> >> > xmlns:m='urn:schemas:mailheader:'
>> >> >> > xmlns:cal="urn:schemas:calendar:"
>> >> >> > xmlns:mapi="http://schemas.microsoft.com/mapi/"
>> >> >> > xmlns:e="http://schemas.microsoft.com/exchange/"
>> >> >> > xmlns:dt='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/'
>> >> >> > xmlns:mail='urn:schemas:httpmail:'>
>> >> >> > urn:content-classes:appointmentIPM.AppointmentAQEAAAAAAEZ1AgAAAAAoCAgAAAAA
>> >> >> > Solve Hexadecimal Error by
>> >> >> > Atul
>> >> >> > Saxena
>> >> >> > Netaji
>> >> >> > Subhash
>> >> >> > PalaceNetaji
>> >> >> > Subhash
>> >> >> > Palace2007-09-27T03:30:00.000Z
>> >> >> > 2007-09-27T04:00:00.000Z
>> >> >> > >> >> >> > dt:dt="int">0BUSY
>> >> >> > TENTATIVE
>> >> >> > >> >> >> > dt:dt="boolean">0 >> >> >> > dt:dt="boolean">1 >> >> >> > dt:dt="int">900ccrindiaadmin@ccrindia.com >> >> >> > dt:dt="boolean">1
>> >> >> >
>> >> >> > oXMLHttp = CreateObject("Microsoft.XMLHTTP")
>> >> >> > oXMLHttp.open ("PROPPATCH",
>> >> >> > "http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar/",
>> >> >> > False,
>> >> >> > Me.UserNameAlias, Me.Password)
>> >> >> > ' Set up request headers.
>> >> >> > oXMLHttp.setRequestHeader("Content-Type",
>> >> >> > "text/xml")
>> >> >> >
>> >> >> > ' Send the query.
>> >> >> > oXMLHttp.send(sQuery)
>> >> >> >
>> >> >> > Response is:
>> >> >> >
>> >> >> > >> >> >> > xmlns:b="http://schemas.microsoft.com/exchange/"
>> >> >> > xmlns:a="DAV:">http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/CalendarHTTP/1.1
>> >> >> > 403
>> >> >> > Forbidden
>> >> >> >
>> >> >> > This error is not coming when I am updating any appointment but
>> >> >> > at
>> >> >> > the
>> >> >> > time
>> >> >> > of creation this response is coming. Please tell me the solution
>> >> >> > of
>> >> >> > this.
>> >> >> >
>> >> >> > Thanks in advance.
>> >> >> >
>> >> >> > Atul Saxena
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >>
>> >>
>>
>>
Back to top
View user's profile Send private message
Atul Saxena



Joined: 12 Oct 2007
Posts: 15

PostPosted: Tue Oct 16, 2007 12:50 am    Post subject: Re: Showing Error: HTTP/1.1 403 (Forbidden) Reply with quote

Hello Henning,

Actually my purpose is to synchronized the outlook with sql server and vice
versa. tell me whether I am going the right way to synchronization coz what I
am doing is to update, insert and delete the outlook mails, appointment, task
with sql server and vice versa.

The solution u told me is

The properties

http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x23
and

http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x3 .

Do you want to say in above namespace, It would create custom cloumn in
exchange then on the basis of that I syn outlook.

Thanks & regards,

Atul Saxena

"Henning Krause [MVP - Exchange]" wrote:

> Hello Atul,
>
> If I you set the the property I mentioned to a valid Base64 encoded byte
> array, Exchange will retain that value in that property - if you later use
> this value to search for that appointment, Exchange will return it.
>
> The properties
> http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x23
> and
> http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x3
> will retain their values if you set them to a valid binary value.
>
> All other Exchange id (EntryId, DAV:id, etc) will be set by Outlook and can
> not be modified.
>
> I'm still somewhat confused about what you are trying to do. Do you
> effectively want to prevent your users to delete an appointment because you
> recreate it when they delete it?
>
> Kind regards,
> Henning Krause
>
> "Atul Saxena" wrote in message
> @microsoft.com...
> > Dear Henning,
> >
> > What I do is first I synchronized outlook appointment of an user to sql
> > server means all the appointment would be created in sql server in
> > following
> > format:
> >
> > ID nvarchar(1000) Checked
> > Href text Checked
> > LastModificationDate datetime Checked
> > Subject text Checked
> > TextDescription text Checked
> > Location nvarchar(150) Checked
> > DtStart datetime Checked
> > DtEnd datetime Checked
> > InstanceType nvarchar(150) Checked
> > BusyStatus nvarchar(50) Checked
> > MeetingStatus nvarchar(50) Checked
> > AllDayEvent bit Checked
> > ResponseRequested bit Checked
> > ReminderOffset int Checked
> > MailSender nvarchar(1500) Checked
> > MailTo nvarchar(1500) Checked
> > MailType smallint Checked
> >
> > In above table ID contains the ID of Appointment like
> > AQEAAAAAAEZ1AgAAAAAoCAkAAAAAA. Now If user delete a particular appointment
> > then I execute a query in which that deleted appoinment ID is fetched.
> > After
> > fetching that appointment ID from Sql Server, I want create that
> > appointment
> > in outlook with SQL Server ID. Now I am facing a problem that when I
> > generate
> > appointment in outlook with that SQL server ID then it would generate it
> > own
> > ID. So tell me is there any way of generating appointment on my given ID.
> >
> > My code of generating appointment is given below
> >
> > Private Sub psbCreateDataAtOutlook(ByVal strURI As System.String)
> > Dim oDataset As New DataSet
> > Dim strTableName As String = "CreateDataAtOutlook"
> > Dim iCtr As System.Int16
> > Dim status As Integer
> > Try
> > oDataset = fnGetSource(strTableName, strAllIDs, 0)
> > If oDataset.Tables(strTableName).Rows.Count > 0 Then
> > If Me.MailType = 2 Then
> > For iCtr = 0 To
> > oDataset.Tables(strTableName).Rows.Count
> > - 1
> > sQuery = "" &
> > _
> > " > > xmlns:a='DAV:' xmlns:m='urn:schemas:mailheader:'
> > xmlns:cal=""urn:schemas:calendar:"" " & _
> >
> > "xmlns:mapi=""http://schemas.microsoft.com/mapi/"" " & _
> >
> > "xmlns:e=""http://schemas.microsoft.com/exchange/"" " & _
> >
> > "xmlns:dt='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/' " & _
> >
> > "xmlns:mail='urn:schemas:httpmail:' " & _
> >
> > "xmlns:f=""http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/"">
> > " & _
> > "" & _
> > "" & _
> >
> > "urn:content-classes:appointment" & _
> >
> > "IPM.Appointment" & _
> > "" &
> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(0)), "",
> > oDataset.Tables(strTableName).Rows(iCtr).Item(0)) & "" & _
> > "" &
> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(0)), "",
> > oDataset.Tables(strTableName).Rows(iCtr).Item(0)) & "" & _
> > "" & _
> > "" & _
> > "" &
> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(2)), "",
> > oDataset.Tables(strTableName).Rows(iCtr).Item(2)) & " " & _
> > "" & _
> > "" & _
> >
> > "Netaji Subhash Palace" & _
> > "" & _
> > "" & _
> > "Netaji
> > Subhash Palace" & _
> > "" & _
> > "" & _
> > "" &
> > fnChangerDateLocalGMT(oDataset.Tables(strTableName).Rows(iCtr).Item(5)) &
> > "
> > " & _
> > "" & _
> > "" & _
> > "" &
> > fnChangerDateLocalGMT(oDataset.Tables(strTableName).Rows(iCtr).Item(6)) &
> > "
> > " & _
> > " > > dt:dt=""int"">0" & _
> > "" & _
> > "" & _
> > "" &
> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(7)), "",
> > oDataset.Tables(strTableName).Rows(0).Item(7)) & " " & _
> > "" & _
> > "" & _
> > ""
> > & IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(Cool), "",
> > oDataset.Tables(strTableName).Rows(0).Item(Cool) & " " &
> > _
> > " > > dt:dt=""boolean"">0" & _
> >
> > "1" & _
> > " > > dt:dt=""int"">900" & _
> > "" &
> > Me.UserNameAlias & "" & _
> > " > > dt:dt=""boolean"">1" & _
> > "" & _
> > "" & _
> > ""
> >
> > 'oXMLHttp = CreateObject("Microsoft.XMLHTTP")
> > oXMLHttp.open("PROPPATCH",
> > oDataset.Tables(strTableName).Rows(iCtr).Item(1), False, Me.UserNameAlias,
> > Me.Password)
> > ' Set up request headers.
> > oXMLHttp.setRequestHeader("Content-Type",
> > "text/xml")
> > 'oXMLHttp.setRequestHeader("Brief", "t")
> > ' Send the query.
> > oXMLHttp.send(sQuery)
> > status = CheckStatus(oXMLHttp.status)
> > MsgBox(oXMLHttp.responseText)
> > Next
> >
> > ElseIf Me.MailType = 3 Then
> > For iCtr = 0 To
> > oDataset.Tables(strTableName).Rows.Count
> > - 1
> > sQuery = ""
> > & _
> > " > > xmlns:a='DAV:' xmlns:m='urn:schemas:mailheader:' " & _
> >
> > "xmlns:b='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/' " & _
> >
> > "xmlns:g='urn:schemas:httpmail:' " & _
> >
> > "xmlns:i='http://schemas.microsoft.com/mapi/id/" & _
> >
> > "{00062008-0000-0000-C000-000000000046}/' " & _
> >
> > "xmlns:h='http://schemas.microsoft.com/mapi/id/" & _
> >
> > "{00062003-0000-0000-C000-000000000046}/'> " & _
> > "" & _
> > "" & _
> > "" &
> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(0)), "",
> > oDataset.Tables(strTableName).Rows(iCtr).Item(0)) & " " & _
> > "" & _
> > "" & _
> > "" &
> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(1)), "",
> > oDataset.Tables(strTableName).Rows(iCtr).Item(1)) & " " & _
> > "" & _
> > "" & _
> > "" &
> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(2)), "",
> > oDataset.Tables(strTableName).Rows(iCtr).Item(2)) & " " & _
> > "" & _
> > "" & _
> > "" &
> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(3)), "",
> > oDataset.Tables(strTableName).Rows(iCtr).Item(3)) & "
> > " &
> > _
> > "" & _
> > "" & _
> > ""
> >
> > ' Set up request headers.
> > oXMLHttp.setRequestHeader("Content-Type",
> > "text/xml")
> > oXMLHttp.setRequestHeader("Brief", "t")
> > ' Send the query.
> > oXMLHttp.send(sQuery)
> > Next
> > End If
> >
> > End If
> >
> > Catch ex As Exception
> > oDataset.Dispose()
> > oDataset = Nothing
> > End Try
> > End Sub
> >
> >
> > Private Function fnGetSource(ByVal StrTableName As String, ByVal
> > strAllID
> > As System.String, ByVal iTransType As System.Int16) As DataSet
> >
> > Try
> >
> > MyClass.dProcess = New CCRDataSite.dclProcess
> > MyClass.dProcess.SetCommandText =
> > "prcGetDataForSynchronization"
> > MyClass.dProcess.SetCommandType = CommandType.StoredProcedure
> > MyClass.dProcess.AddParameter("@ID", SqlDbType.NVarChar,
> > strAllID)
> > MyClass.dProcess.AddParameter("@MailType", SqlDbType.SmallInt,
> > Me.MailType)
> > MyClass.dProcess.AddParameter("@TransType", SqlDbType.SmallInt,
> > iTransType)
> >
> > Return MyClass.dProcess.ReturnDataSet(StrTableName, False)
> > Catch ex As Exception
> > Throw New Exception(ex.Message, ex.InnerException)
> > Finally
> > dProcess.Dispose()
> > dProcess = Nothing
> > End Try
> > End Function
> >
> > Sql procedure "prcGetDataForSynchronization" returns data of appoinment
> > which is present in SQL server but not in Outlook.
> >
> > Please tell me how could I tell exchange to accept my Appointment ID as I
> > tried generating ID from
> > Convert.ToBase64String(Guid.NewGuid().ToByteArray())
> > but its not working coz in this exchange create also its own ID.
> >
> > If it is not possible to create appointment from given ID then tell me is
> > there any way to know ID of that created appointment in response text.
> >
> > Thanks & regards,
> >
> > Atul Saxena
> > "Henning Krause [MVP - Exchange]" wrote:
> >
> >> Hello,
> >>
> >> the string you are setting is invalid.
> >> AQEAAAAAAEZ1AgAAAAAoCAkAAAAAA
> >>
> >> has an invalid length for a Base64 string. Exchange seems to truncate
> >> this
> >> to the next valid size.
> >>
> >> How are you encoding your request?
> >> Convert.ToBase64String(Guid.NewGuid().ToByteArray())?
> >>
> >> Kind regards,
> >> Henning
> >>
> >>
> >>
> >> "Atul Saxena" wrote in message
> >> @microsoft.com...
> >> > Hi Henning,
> >> >
> >> > Thanks for quick response. As I am creating desired ID by your
> >> > specified
> >> > namespace which code is mentioned below:
> >> >
Back to top
View user's profile Send private message
Henning Krause [MVP - Exc



Joined: 05 Aug 2007
Posts: 142

PostPosted: Tue Oct 16, 2007 11:18 am    Post subject: Re: Showing Error: HTTP/1.1 403 (Forbidden) Reply with quote

Hello Atul,

the solution I told you is fine for appointments.

But for other types, simply store the
http://schemas.microsoft.com/exchange/permanenturl in your database.

This is far easier because you can later access the item directly with that
url - no need to search for it.

This doesn't work for appointments because Outlook recreates them under
certain circumstances, thus the entryid of the item is changed - and with it
the permanent url (See http://support.microsoft.com/kb/899919).

Kind regards,
Henning

"Atul Saxena" wrote in message @microsoft.com...
> Hello Henning,
>
> Actually my purpose is to synchronized the outlook with sql server and
> vice
> versa. tell me whether I am going the right way to synchronization coz
> what I
> am doing is to update, insert and delete the outlook mails, appointment,
> task
> with sql server and vice versa.
>
> The solution u told me is
>
> The properties
>
> http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x23
> and
>
> http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x3 .
>
> Do you want to say in above namespace, It would create custom cloumn in
> exchange then on the basis of that I syn outlook.
>
> Thanks & regards,
>
> Atul Saxena
>
> "Henning Krause [MVP - Exchange]" wrote:
>
>> Hello Atul,
>>
>> If I you set the the property I mentioned to a valid Base64 encoded byte
>> array, Exchange will retain that value in that property - if you later
>> use
>> this value to search for that appointment, Exchange will return it.
>>
>> The properties
>> http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x23
>> and
>> http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x3
>> will retain their values if you set them to a valid binary value.
>>
>> All other Exchange id (EntryId, DAV:id, etc) will be set by Outlook and
>> can
>> not be modified.
>>
>> I'm still somewhat confused about what you are trying to do. Do you
>> effectively want to prevent your users to delete an appointment because
>> you
>> recreate it when they delete it?
>>
>> Kind regards,
>> Henning Krause
>>
>> "Atul Saxena" wrote in message
>> @microsoft.com...
>> > Dear Henning,
>> >
>> > What I do is first I synchronized outlook appointment of an user to sql
>> > server means all the appointment would be created in sql server in
>> > following
>> > format:
>> >
>> > ID nvarchar(1000) Checked
>> > Href text Checked
>> > LastModificationDate datetime Checked
>> > Subject text Checked
>> > TextDescription text Checked
>> > Location nvarchar(150) Checked
>> > DtStart datetime Checked
>> > DtEnd datetime Checked
>> > InstanceType nvarchar(150) Checked
>> > BusyStatus nvarchar(50) Checked
>> > MeetingStatus nvarchar(50) Checked
>> > AllDayEvent bit Checked
>> > ResponseRequested bit Checked
>> > ReminderOffset int Checked
>> > MailSender nvarchar(1500) Checked
>> > MailTo nvarchar(1500) Checked
>> > MailType smallint Checked
>> >
>> > In above table ID contains the ID of Appointment like
>> > AQEAAAAAAEZ1AgAAAAAoCAkAAAAAA. Now If user delete a particular
>> > appointment
>> > then I execute a query in which that deleted appoinment ID is fetched.
>> > After
>> > fetching that appointment ID from Sql Server, I want create that
>> > appointment
>> > in outlook with SQL Server ID. Now I am facing a problem that when I
>> > generate
>> > appointment in outlook with that SQL server ID then it would generate
>> > it
>> > own
>> > ID. So tell me is there any way of generating appointment on my given
>> > ID.
>> >
>> > My code of generating appointment is given below
>> >
>> > Private Sub psbCreateDataAtOutlook(ByVal strURI As System.String)
>> > Dim oDataset As New DataSet
>> > Dim strTableName As String = "CreateDataAtOutlook"
>> > Dim iCtr As System.Int16
>> > Dim status As Integer
>> > Try
>> > oDataset = fnGetSource(strTableName, strAllIDs, 0)
>> > If oDataset.Tables(strTableName).Rows.Count > 0 Then
>> > If Me.MailType = 2 Then
>> > For iCtr = 0 To
>> > oDataset.Tables(strTableName).Rows.Count
>> > - 1
>> > sQuery = " >> > encoding='utf-8'?>" &
>> > _
>> > " >> > xmlns:a='DAV:' xmlns:m='urn:schemas:mailheader:'
>> > xmlns:cal=""urn:schemas:calendar:"" " & _
>> >
>> > "xmlns:mapi=""http://schemas.microsoft.com/mapi/"" " & _
>> >
>> > "xmlns:e=""http://schemas.microsoft.com/exchange/"" " & _
>> >
>> > "xmlns:dt='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/' " & _
>> >
>> > "xmlns:mail='urn:schemas:httpmail:' " & _
>> >
>> > "xmlns:f=""http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/"">
>> > " & _
>> > "" & _
>> > "" & _
>> >
>> > "urn:content-classes:appointment" & _
>> >
>> > "IPM.Appointment" & _
>> > "" &
>> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(0)), "",
>> > oDataset.Tables(strTableName).Rows(iCtr).Item(0)) & "" & _
>> > "" &
>> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(0)), "",
>> > oDataset.Tables(strTableName).Rows(iCtr).Item(0)) & "" & _
>> > "" & _
>> > "" & _
>> > "" &
>> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(2)), "",
>> > oDataset.Tables(strTableName).Rows(iCtr).Item(2)) & " "
>> > & _
>> > "" & _
>> > "" & _
>> >
>> > "Netaji Subhash Palace" &
>> > _
>> > "" & _
>> > "" & _
>> >
>> > "Netaji
>> > Subhash Palace" & _
>> > "" & _
>> > "" & _
>> > "" &
>> > fnChangerDateLocalGMT(oDataset.Tables(strTableName).Rows(iCtr).Item(5))
>> > &
>> > "
>> > " & _
>> > "" & _
>> > "" & _
>> > "" &
>> > fnChangerDateLocalGMT(oDataset.Tables(strTableName).Rows(iCtr).Item(6))
>> > &
>> > "
>> > " & _
>> > " >> > dt:dt=""int"">0" & _
>> > "" & _
>> > "" & _
>> > ""
>> > &
>> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(7)), "",
>> > oDataset.Tables(strTableName).Rows(0).Item(7)) & " " &
>> > _
>> > "" & _
>> > "" & _
>> >
>> > ""
>> > & IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(Cool), "",
>> > oDataset.Tables(strTableName).Rows(0).Item(Cool) & "
>> > " &
>> > _
>> > " >> > dt:dt=""boolean"">0" & _
>> >
>> > "1" &
>> > _
>> >
>> > " >> > dt:dt=""int"">900" & _
>> > "" &
>> > Me.UserNameAlias & "" & _
>> > " >> > dt:dt=""boolean"">1" & _
>> > "" & _
>> > "" & _
>> > ""
>> >
>> > 'oXMLHttp = CreateObject("Microsoft.XMLHTTP")
>> > oXMLHttp.open("PROPPATCH",
>> > oDataset.Tables(strTableName).Rows(iCtr).Item(1), False,
>> > Me.UserNameAlias,
>> > Me.Password)
>> > ' Set up request headers.
>> > oXMLHttp.setRequestHeader("Content-Type",
>> > "text/xml")
>> > 'oXMLHttp.setRequestHeader("Brief", "t")
>> > ' Send the query.
>> > oXMLHttp.send(sQuery)
>> > status = CheckStatus(oXMLHttp.status)
>> > MsgBox(oXMLHttp.responseText)
>> > Next
>> >
>> > ElseIf Me.MailType = 3 Then
>> > For iCtr = 0 To
>> > oDataset.Tables(strTableName).Rows.Count
>> > - 1
>> > sQuery = " >> > 'utf-8'?>"
>> > & _
>> > " >> > xmlns:a='DAV:' xmlns:m='urn:schemas:mailheader:' " & _
>> >
>> > "xmlns:b='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/' " & _
>> >
>> > "xmlns:g='urn:schemas:httpmail:' " & _
>> >
>> > "xmlns:i='http://schemas.microsoft.com/mapi/id/" & _
>> >
>> > "{00062008-0000-0000-C000-000000000046}/' " & _
>> >
>> > "xmlns:h='http://schemas.microsoft.com/mapi/id/" & _
>> >
>> > "{00062003-0000-0000-C000-000000000046}/'> " & _
>> > "" & _
>> > "" & _
>> > "" &
>> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(0)), "",
>> > oDataset.Tables(strTableName).Rows(iCtr).Item(0)) & " " & _
>> > "" & _
>> > "" & _
>> > "" &
>> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(1)), "",
>> > oDataset.Tables(strTableName).Rows(iCtr).Item(1)) & " " & _
>> > "" & _
>> > "" & _
>> > "" &
>> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(2)), "",
>> > oDataset.Tables(strTableName).Rows(iCtr).Item(2)) & " " & _
>> > "" & _
>> > "" & _
>> >
>> > "" &
>> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(3)), "",
>> > oDataset.Tables(strTableName).Rows(iCtr).Item(3)) & "
>> > " &
>> > _
>> > "" & _
>> > "" & _
>> >
>> > ""
>> >
>> > ' Set up request headers.
>> > oXMLHttp.setRequestHeader("Content-Type",
>> > "text/xml")
>> > oXMLHttp.setRequestHeader("Brief", "t")
>> > ' Send the query.
>> > oXMLHttp.send(sQuery)
>> > Next
>> > End If
>> >
>> > End If
>> >
>> > Catch ex As Exception
>> > oDataset.Dispose()
>> > oDataset = Nothing
>> > End Try
>> > End Sub
>> >
>> >
>> > Private Function fnGetSource(ByVal StrTableName As String, ByVal
>> > strAllID
>> > As System.String, ByVal iTransType As System.Int16) As DataSet
>> >
>> > Try
>> >
>> > MyClass.dProcess = New CCRDataSite.dclProcess
>> > MyClass.dProcess.SetCommandText =
>> > "prcGetDataForSynchronization"
>> > MyClass.dProcess.SetCommandType =
>> > CommandType.StoredProcedure
>> > MyClass.dProcess.AddParameter("@ID", SqlDbType.NVarChar,
>> > strAllID)
>> > MyClass.dProcess.AddParameter("@MailType",
>> > SqlDbType.SmallInt,
>> > Me.MailType)
>> > MyClass.dProcess.AddParameter("@TransType",
>> > SqlDbType.SmallInt,
>> > iTransType)
>> >
>> > Return MyClass.dProcess.ReturnDataSet(StrTableName, False)
>> > Catch ex As Exception
>> > Throw New Exception(ex.Message, ex.InnerException)
>> > Finally
>> > dProcess.Dispose()
>> > dProcess = Nothing
>> > End Try
>> > End Function
>> >
>> > Sql procedure "prcGetDataForSynchronization" returns data of appoinment
>> > which is present in SQL server but not in Outlook.
>> >
>> > Please tell me how could I tell exchange to accept my Appointment ID as
>> > I
>> > tried generating ID from
>> > Convert.ToBase64String(Guid.NewGuid().ToByteArray())
>> > but its not working coz in this exchange create also its own ID.
>> >
>> > If it is not possible to create appointment from given ID then tell me
>> > is
>> > there any way to know ID of that created appointment in response text.
>> >
>> > Thanks & regards,
>> >
>> > Atul Saxena
>> > "Henning Krause [MVP - Exchange]" wrote:
>> >
>> >> Hello,
>> >>
>> >> the string you are setting is invalid.
>> >> AQEAAAAAAEZ1AgAAAAAoCAkAAAAAA
>> >>
>> >> has an invalid length for a Base64 string. Exchange seems to truncate
>> >> this
>> >> to the next valid size.
>> >>
>> >> How are you encoding your request?
>> >> Convert.ToBase64String(Guid.NewGuid().ToByteArray())?
>> >>
>> >> Kind regards,
>> >> Henning
>> >>
>> >>
>> >>
>> >> "Atul Saxena" wrote in message
>> >> @microsoft.com...
>> >> > Hi Henning,
>> >> >
>> >> > Thanks for quick response. As I am creating desired ID by your
>> >> > specified
>> >> > namespace which code is mentioned below:
>> >> >
Back to top
View user's profile Send private message
Atul Saxena



Joined: 12 Oct 2007
Posts: 15

PostPosted: Tue Oct 16, 2007 2:58 am    Post subject: Re: Showing Error: HTTP/1.1 403 (Forbidden) Reply with quote

Dear Henning,

I create the custom column
xmlns:f=http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x23
and create new my own ID at this column but when i again access from exchange
then it gives error "Bad Request" in response text.

Code for fetching appointment:

sQuery = "" & _
" xmlns:m='urn:schemas:mailheader:' xmlns:cal=""urn:schemas:calendar:"" " & _
"xmlns:dt='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/' "
& _
"xmlns:mail='urn:schemas:httpmail:'> " & _

"xmlns:f=""http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/""> " & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
"" & _
""

' Set up request headers.
oXMLHttp.setRequestHeader("Content-Type", "text/xml")

' Send the query.
oXMLHttp.send(sQuery)

Please tell me what I am doing wrong.

Thanks & regards,

Atul Saxena
"Henning Krause [MVP - Exchange]" wrote:

> Hello Atul,
>
> the solution I told you is fine for appointments.
>
> But for other types, simply store the
> http://schemas.microsoft.com/exchange/permanenturl in your database.
>
> This is far easier because you can later access the item directly with that
> url - no need to search for it.
>
> This doesn't work for appointments because Outlook recreates them under
> certain circumstances, thus the entryid of the item is changed - and with it
> the permanent url (See http://support.microsoft.com/kb/899919).
>
> Kind regards,
> Henning
>
> "Atul Saxena" wrote in message
> @microsoft.com...
> > Hello Henning,
> >
> > Actually my purpose is to synchronized the outlook with sql server and
> > vice
> > versa. tell me whether I am going the right way to synchronization coz
> > what I
> > am doing is to update, insert and delete the outlook mails, appointment,
> > task
> > with sql server and vice versa.
> >
> > The solution u told me is
> >
> > The properties
> >
> > http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x23
> > and
> >
> > http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x3 .
> >
> > Do you want to say in above namespace, It would create custom cloumn in
> > exchange then on the basis of that I syn outlook.
> >
> > Thanks & regards,
> >
> > Atul Saxena
> >
> > "Henning Krause [MVP - Exchange]" wrote:
> >
> >> Hello Atul,
> >>
> >> If I you set the the property I mentioned to a valid Base64 encoded byte
> >> array, Exchange will retain that value in that property - if you later
> >> use
> >> this value to search for that appointment, Exchange will return it.
> >>
> >> The properties
> >> http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x23
> >> and
> >> http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x3
> >> will retain their values if you set them to a valid binary value.
> >>
> >> All other Exchange id (EntryId, DAV:id, etc) will be set by Outlook and
> >> can
> >> not be modified.
> >>
> >> I'm still somewhat confused about what you are trying to do. Do you
> >> effectively want to prevent your users to delete an appointment because
> >> you
> >> recreate it when they delete it?
> >>
> >> Kind regards,
> >> Henning Krause
> >>
> >> "Atul Saxena" wrote in message
> >> @microsoft.com...
> >> > Dear Henning,
> >> >
> >> > What I do is first I synchronized outlook appointment of an user to sql
> >> > server means all the appointment would be created in sql server in
> >> > following
> >> > format:
> >> >
> >> > ID nvarchar(1000) Checked
> >> > Href text Checked
> >> > LastModificationDate datetime Checked
> >> > Subject text Checked
> >> > TextDescription text Checked
> >> > Location nvarchar(150) Checked
> >> > DtStart datetime Checked
> >> > DtEnd datetime Checked
> >> > InstanceType nvarchar(150) Checked
> >> > BusyStatus nvarchar(50) Checked
> >> > MeetingStatus nvarchar(50) Checked
> >> > AllDayEvent bit Checked
> >> > ResponseRequested bit Checked
> >> > ReminderOffset int Checked
> >> > MailSender nvarchar(1500) Checked
> >> > MailTo nvarchar(1500) Checked
> >> > MailType smallint Checked
> >> >
> >> > In above table ID contains the ID of Appointment like
> >> > AQEAAAAAAEZ1AgAAAAAoCAkAAAAAA. Now If user delete a particular
> >> > appointment
> >> > then I execute a query in which that deleted appoinment ID is fetched.
> >> > After
> >> > fetching that appointment ID from Sql Server, I want create that
> >> > appointment
> >> > in outlook with SQL Server ID. Now I am facing a problem that when I
> >> > generate
> >> > appointment in outlook with that SQL server ID then it would generate
> >> > it
> >> > own
> >> > ID. So tell me is there any way of generating appointment on my given
> >> > ID.
> >> >
> >> > My code of generating appointment is given below
> >> >
> >> > Private Sub psbCreateDataAtOutlook(ByVal strURI As System.String)
> >> > Dim oDataset As New DataSet
> >> > Dim strTableName As String = "CreateDataAtOutlook"
> >> > Dim iCtr As System.Int16
> >> > Dim status As Integer
> >> > Try
> >> > oDataset = fnGetSource(strTableName, strAllIDs, 0)
> >> > If oDataset.Tables(strTableName).Rows.Count > 0 Then
> >> > If Me.MailType = 2 Then
> >> > For iCtr = 0 To
> >> > oDataset.Tables(strTableName).Rows.Count
> >> > - 1
> >> > sQuery = " > >> > encoding='utf-8'?>" &
> >> > _
> >> > " > >> > xmlns:a='DAV:' xmlns:m='urn:schemas:mailheader:'
> >> > xmlns:cal=""urn:schemas:calendar:"" " & _
> >> >
> >> > "xmlns:mapi=""http://schemas.microsoft.com/mapi/"" " & _
> >> >
> >> > "xmlns:e=""http://schemas.microsoft.com/exchange/"" " & _
> >> >
> >> > "xmlns:dt='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/' " & _
> >> >
> >> > "xmlns:mail='urn:schemas:httpmail:' " & _
> >> >
> >> > "xmlns:f=""http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/"">
> >> > " & _
> >> > "" & _
> >> > "" & _
> >> >
> >> > "urn:content-classes:appointment" & _
> >> >
> >> > "IPM.Appointment" & _
> >> > "" &
> >> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(0)), "",
> >> > oDataset.Tables(strTableName).Rows(iCtr).Item(0)) & "" & _
> >> > "" &
> >> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(0)), "",
> >> > oDataset.Tables(strTableName).Rows(iCtr).Item(0)) & "" & _
> >> > "" & _
> >> > "" & _
> >> > "" &
> >> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(2)), "",
> >> > oDataset.Tables(strTableName).Rows(iCtr).Item(2)) & " "
> >> > & _
> >> > "" & _
> >> > "" & _
> >> >
> >> > "Netaji Subhash Palace" &
> >> > _
> >> > "" & _
> >> > "" & _
> >> >
> >> > "Netaji
> >> > Subhash Palace" & _
> >> > "" & _
> >> > "" & _
> >> > "" &
> >> > fnChangerDateLocalGMT(oDataset.Tables(strTableName).Rows(iCtr).Item(5))
> >> > &
> >> > "
> >> > " & _
> >> > "" & _
> >> > "" & _
> >> > "" &
> >> > fnChangerDateLocalGMT(oDataset.Tables(strTableName).Rows(iCtr).Item(6))
> >> > &
> >> > "
> >> > " & _
> >> > " > >> > dt:dt=""int"">0" & _
> >> > "" & _
> >> > "" & _
> >> > ""
> >> > &
> >> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(7)), "",
> >> > oDataset.Tables(strTableName).Rows(0).Item(7)) & " " &
> >> > _
> >> > "" & _
> >> > "" & _
> >> >
> >> > ""
> >> > & IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(Cool), "",
> >> > oDataset.Tables(strTableName).Rows(0).Item(Cool) & "
> >> > " &
> >> > _
> >> > " > >> > dt:dt=""boolean"">0" & _
> >> >
> >> > "1" &
> >> > _
> >> >
> >> > " > >> > dt:dt=""int"">900" & _
> >> > "" &
> >> > Me.UserNameAlias & "" & _
> >> > " > >> > dt:dt=""boolean"">1" & _
> >> > "" & _
> >> > "" & _
> >> > ""
> >> >
> >> > 'oXMLHttp = CreateObject("Microsoft.XMLHTTP")
> >> > oXMLHttp.open("PROPPATCH",
> >> > oDataset.Tables(strTableName).Rows(iCtr).Item(1), False,
> >> > Me.UserNameAlias,
> >> > Me.Password)
> >> > ' Set up request headers.
> >> > oXMLHttp.setRequestHeader("Content-Type",
> >> > "text/xml")
> >> > 'oXMLHttp.setRequestHeader("Brief", "t")
> >> > ' Send the query.
> >> > oXMLHttp.send(sQuery)
> >> > status = CheckStatus(oXMLHttp.status)
> >> > MsgBox(oXMLHttp.responseText)
> >> > Next
> >> >
> >> > ElseIf Me.MailType = 3 Then
> >> > For iCtr = 0 To
> >> > oDataset.Tables(strTableName).Rows.Count
> >> > - 1
> >> > sQuery = " > >> > 'utf-8'?>"
> >> > & _
> >> > " > >> > xmlns:a='DAV:' xmlns:m='urn:schemas:mailheader:' " & _
> >> >
> >> > "xmlns:b='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/' " & _
> >> >
> >> > "xmlns:g='urn:schemas:httpmail:' " & _
> >> >
> >> > "xmlns:i='http://schemas.microsoft.com/mapi/id/" & _
> >> >
> >> > "{00062008-0000-0000-C000-000000000046}/' " & _
> >> >
> >> > "xmlns:h='http://schemas.microsoft.com/mapi/id/" & _
> >> >
> >> > "{00062003-0000-0000-C000-000000000046}/'> " & _
> >> > "" & _
> >> > "" & _
> >> > "" &
> >> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(0)), "",
> >> > oDataset.Tables(strTableName).Rows(iCtr).Item(0)) & " " & _
> >> > "" & _
> >> > "" & _
> >> > "" &
> >> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(1)), "",
> >> > oDataset.Tables(strTableName).Rows(iCtr).Item(1)) & " " & _
> >> > "" & _
> >> > "" & _
> >> > "" &
> >> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(2)), "",
> >> > oDataset.Tables(strTableName).Rows(iCtr).Item(2)) & " " & _
> >> > "" & _
> >> > "" & _
> >> >
> >> > "" &
> >> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(3)), "",
> >> > oDataset.Tables(strTableName).Rows(iCtr).Item(3)) & "
> >> > " &
> >> > _
> >> > "" & _
> >> > "" & _
> >> >
> >> > ""
> >> >
> >> > ' Set up request headers.
> >> > oXMLHttp.setRequestHeader("Content-Type",
> >> > "text/xml")
> >> > oXMLHttp.setRequestHeader("Brief", "t")
> >> > ' Send the query.
> >> > oXMLHttp.send(sQuery)
> >> > Next
> >> > End If
> >> >
> >> > End If
> >> >
> >> > Catch ex As Exception
> >> > oDataset.Dispose()
> >> > oDataset = Nothing
> >> > End Try
> >> > End Sub
Back to top
View user's profile Send private message
Atul Saxena



Joined: 12 Oct 2007
Posts: 15

PostPosted: Wed Oct 17, 2007 7:34 am    Post subject: Re: Showing Error: HTTP/1.1 403 (Forbidden) Reply with quote

Dear Henning,

Please tell me how could I create custom column in Outlook Appointment. As I
am able to make column 0x23,0x3 but i can't fetch the value of that column.

Please advice as I am new in exchange server.

thanks & regards,

Atul Saxena
"Atul Saxena" wrote:

> Dear Henning,
>
> I create the custom column
> xmlns:f=http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x23
> and create new my own ID at this column but when i again access from exchange
> then it gives error "Bad Request" in response text.
>
> Code for fetching appointment:
>
> sQuery = "" & _
> " > xmlns:m='urn:schemas:mailheader:' xmlns:cal=""urn:schemas:calendar:"" " & _
> "xmlns:dt='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/' "
> & _
> "xmlns:mail='urn:schemas:httpmail:'> " & _
>
> "xmlns:f=""http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/""> " & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> "" & _
> ""
>
> ' Set up request headers.
> oXMLHttp.setRequestHeader("Content-Type", "text/xml")
>
> ' Send the query.
> oXMLHttp.send(sQuery)
>
> Please tell me what I am doing wrong.
>
> Thanks & regards,
>
> Atul Saxena
> "Henning Krause [MVP - Exchange]" wrote:
>
> > Hello Atul,
> >
> > the solution I told you is fine for appointments.
> >
> > But for other types, simply store the
> > http://schemas.microsoft.com/exchange/permanenturl in your database.
> >
> > This is far easier because you can later access the item directly with that
> > url - no need to search for it.
> >
> > This doesn't work for appointments because Outlook recreates them under
> > certain circumstances, thus the entryid of the item is changed - and with it
> > the permanent url (See http://support.microsoft.com/kb/899919).
> >
> > Kind regards,
> > Henning
> >
> > "Atul Saxena" wrote in message
> > @microsoft.com...
> > > Hello Henning,
> > >
> > > Actually my purpose is to synchronized the outlook with sql server and
> > > vice
> > > versa. tell me whether I am going the right way to synchronization coz
> > > what I
> > > am doing is to update, insert and delete the outlook mails, appointment,
> > > task
> > > with sql server and vice versa.
> > >
> > > The solution u told me is
> > >
> > > The properties
> > >
> > > http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x23
> > > and
> > >
> > > http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x3 .
> > >
> > > Do you want to say in above namespace, It would create custom cloumn in
> > > exchange then on the basis of that I syn outlook.
> > >
> > > Thanks & regards,
> > >
> > > Atul Saxena
> > >
> > > "Henning Krause [MVP - Exchange]" wrote:
> > >
> > >> Hello Atul,
> > >>
> > >> If I you set the the property I mentioned to a valid Base64 encoded byte
> > >> array, Exchange will retain that value in that property - if you later
> > >> use
> > >> this value to search for that appointment, Exchange will return it.
> > >>
> > >> The properties
> > >> http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x23
> > >> and
> > >> http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x3
> > >> will retain their values if you set them to a valid binary value.
> > >>
> > >> All other Exchange id (EntryId, DAV:id, etc) will be set by Outlook and
> > >> can
> > >> not be modified.
> > >>
> > >> I'm still somewhat confused about what you are trying to do. Do you
> > >> effectively want to prevent your users to delete an appointment because
> > >> you
> > >> recreate it when they delete it?
> > >>
> > >> Kind regards,
> > >> Henning Krause
> > >>
> > >> "Atul Saxena" wrote in message
> > >> @microsoft.com...
> > >> > Dear Henning,
> > >> >
> > >> > What I do is first I synchronized outlook appointment of an user to sql
> > >> > server means all the appointment would be created in sql server in
> > >> > following
> > >> > format:
> > >> >
> > >> > ID nvarchar(1000) Checked
> > >> > Href text Checked
> > >> > LastModificationDate datetime Checked
> > >> > Subject text Checked
> > >> > TextDescription text Checked
> > >> > Location nvarchar(150) Checked
> > >> > DtStart datetime Checked
> > >> > DtEnd datetime Checked
> > >> > InstanceType nvarchar(150) Checked
> > >> > BusyStatus nvarchar(50) Checked
> > >> > MeetingStatus nvarchar(50) Checked
> > >> > AllDayEvent bit Checked
> > >> > ResponseRequested bit Checked
> > >> > ReminderOffset int Checked
> > >> > MailSender nvarchar(1500) Checked
> > >> > MailTo nvarchar(1500) Checked
> > >> > MailType smallint Checked
> > >> >
> > >> > In above table ID contains the ID of Appointment like
> > >> > AQEAAAAAAEZ1AgAAAAAoCAkAAAAAA. Now If user delete a particular
> > >> > appointment
> > >> > then I execute a query in which that deleted appoinment ID is fetched.
> > >> > After
> > >> > fetching that appointment ID from Sql Server, I want create that
> > >> > appointment
> > >> > in outlook with SQL Server ID. Now I am facing a problem that when I
> > >> > generate
> > >> > appointment in outlook with that SQL server ID then it would generate
> > >> > it
> > >> > own
> > >> > ID. So tell me is there any way of generating appointment on my given
> > >> > ID.
> > >> >
> > >> > My code of generating appointment is given below
> > >> >
> > >> > Private Sub psbCreateDataAtOutlook(ByVal strURI As System.String)
> > >> > Dim oDataset As New DataSet
> > >> > Dim strTableName As String = "CreateDataAtOutlook"
> > >> > Dim iCtr As System.Int16
> > >> > Dim status As Integer
> > >> > Try
> > >> > oDataset = fnGetSource(strTableName, strAllIDs, 0)
> > >> > If oDataset.Tables(strTableName).Rows.Count > 0 Then
> > >> > If Me.MailType = 2 Then
> > >> > For iCtr = 0 To
> > >> > oDataset.Tables(strTableName).Rows.Count
> > >> > - 1
> > >> > sQuery = " > > >> > encoding='utf-8'?>" &
> > >> > _
> > >> > " > > >> > xmlns:a='DAV:' xmlns:m='urn:schemas:mailheader:'
> > >> > xmlns:cal=""urn:schemas:calendar:"" " & _
> > >> >
> > >> > "xmlns:mapi=""http://schemas.microsoft.com/mapi/"" " & _
> > >> >
> > >> > "xmlns:e=""http://schemas.microsoft.com/exchange/"" " & _
> > >> >
> > >> > "xmlns:dt='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/' " & _
> > >> >
> > >> > "xmlns:mail='urn:schemas:httpmail:' " & _
> > >> >
> > >> > "xmlns:f=""http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/"">
> > >> > " & _
> > >> > "" & _
> > >> > "" & _
> > >> >
> > >> > "urn:content-classes:appointment" & _
> > >> >
> > >> > "IPM.Appointment" & _
> > >> > "" &
> > >> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(0)), "",
> > >> > oDataset.Tables(strTableName).Rows(iCtr).Item(0)) & "" & _
> > >> > "" &
> > >> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(0)), "",
> > >> > oDataset.Tables(strTableName).Rows(iCtr).Item(0)) & "" & _
> > >> > "" & _
> > >> > "" & _
> > >> > "" &
> > >> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(2)), "",
> > >> > oDataset.Tables(strTableName).Rows(iCtr).Item(2)) & " "
> > >> > & _
> > >> > "" & _
> > >> > "" & _
> > >> >
> > >> > "Netaji Subhash Palace" &
> > >> > _
> > >> > "" & _
> > >> > "" & _
> > >> >
> > >> > "Netaji
> > >> > Subhash Palace" & _
> > >> > "" & _
> > >> > "" & _
> > >> > "" &
> > >> > fnChangerDateLocalGMT(oDataset.Tables(strTableName).Rows(iCtr).Item(5))
> > >> > &
> > >> > "
> > >> > " & _
> > >> > "" & _
> > >> > "" & _
> > >> > "" &
> > >> > fnChangerDateLocalGMT(oDataset.Tables(strTableName).Rows(iCtr).Item(6))
> > >> > &
> > >> > "
> > >> > " & _
> > >> > " > > >> > dt:dt=""int"">0" & _
> > >> > "" & _
> > >> > "" & _
> > >> > ""
> > >> > &
> > >> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(7)), "",
> > >> > oDataset.Tables(strTableName).Rows(0).Item(7)) & " " &
> > >> > _
> > >> > "" & _
> > >> > "" & _
> > >> >
> > >> > ""
> > >> > & IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(Cool), "",
> > >> > oDataset.Tables(strTableName).Rows(0).Item(Cool) & "
> > >> > " &
> > >> > _
> > >> > " > > >> > dt:dt=""boolean"">0" & _
> > >> >
> > >> > "1" &
> > >> > _
> > >> >
> > >> > " > > >> > dt:dt=""int"">900" & _
> > >> > "" &
> > >> > Me.UserNameAlias & "" & _
> > >> > " > > >> > dt:dt=""boolean"">1" & _
> > >> > "" & _
> > >> > "" & _
> > >> > ""
> > >> >
> > >> > 'oXMLHttp = CreateObject("Microsoft.XMLHTTP")
> > >> > oXMLHttp.open("PROPPATCH",
> > >> > oDataset.Tables(strTableName).Rows(iCtr).Item(1), False,
> > >> > Me.UserNameAlias,
> > >> > Me.Password)
> > >> > ' Set up request headers.
> > >> > oXMLHttp.setRequestHeader("Content-Type",
> > >> > "text/xml")
> > >> > 'oXMLHttp.setRequestHeader("Brief", "t")
> > >> > ' Send the query.
> > >> > oXMLHttp.send(sQuery)
> > >> > status = CheckStatus(oXMLHttp.status)
Back to top
View user's profile Send private message
Henning Krause [MVP - Exc



Joined: 05 Aug 2007
Posts: 142

PostPosted: Wed Oct 17, 2007 9:14 pm    Post subject: Re: Showing Error: HTTP/1.1 403 (Forbidden) Reply with quote

Hello Atul,

the code at
http://www.infinitec.de/articles/exchange/creatingwebdavrequestswithxmlreaderwriter.aspx
contains everything you need to query the properties.

Just call the
CreatePropFindRequest("http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x23")
and send the created buffer to the server as shown in the PropFind method.

Kind regards,
Henning


"Atul Saxena" wrote in message @microsoft.com...
> Dear Henning,
>
> Please tell me how could I create custom column in Outlook Appointment. As
> I
> am able to make column 0x23,0x3 but i can't fetch the value of that
> column.
>
> Please advice as I am new in exchange server.
>
> thanks & regards,
>
> Atul Saxena
> "Atul Saxena" wrote:
>
>> Dear Henning,
>>
>> I create the custom column
>> xmlns:f=http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x23
>> and create new my own ID at this column but when i again access from
>> exchange
>> then it gives error "Bad Request" in response text.
>>
>> Code for fetching appointment:
>>
>> sQuery = "" & _
>> " >> xmlns:m='urn:schemas:mailheader:' xmlns:cal=""urn:schemas:calendar:"" " &
>> _
>>
>> "xmlns:dt='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/' "
>> & _
>> "xmlns:mail='urn:schemas:httpmail:'> " & _
>>
>> "xmlns:f=""http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/"">
>> " & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> "" & _
>> ""
>>
>> ' Set up request headers.
>> oXMLHttp.setRequestHeader("Content-Type", "text/xml")
>>
>> ' Send the query.
>> oXMLHttp.send(sQuery)
>>
>> Please tell me what I am doing wrong.
>>
>> Thanks & regards,
>>
>> Atul Saxena
>> "Henning Krause [MVP - Exchange]" wrote:
>>
>> > Hello Atul,
>> >
>> > the solution I told you is fine for appointments.
>> >
>> > But for other types, simply store the
>> > http://schemas.microsoft.com/exchange/permanenturl in your database.
>> >
>> > This is far easier because you can later access the item directly with
>> > that
>> > url - no need to search for it.
>> >
>> > This doesn't work for appointments because Outlook recreates them under
>> > certain circumstances, thus the entryid of the item is changed - and
>> > with it
>> > the permanent url (See http://support.microsoft.com/kb/899919).
>> >
>> > Kind regards,
>> > Henning
>> >
>> > "Atul Saxena" wrote in message
>> > @microsoft.com...
>> > > Hello Henning,
>> > >
>> > > Actually my purpose is to synchronized the outlook with sql server
>> > > and
>> > > vice
>> > > versa. tell me whether I am going the right way to synchronization
>> > > coz
>> > > what I
>> > > am doing is to update, insert and delete the outlook mails,
>> > > appointment,
>> > > task
>> > > with sql server and vice versa.
>> > >
>> > > The solution u told me is
>> > >
>> > > The properties
>> > >
>> > > http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x23
>> > > and
>> > >
>> > > http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x3 .
>> > >
>> > > Do you want to say in above namespace, It would create custom cloumn
>> > > in
>> > > exchange then on the basis of that I syn outlook.
>> > >
>> > > Thanks & regards,
>> > >
>> > > Atul Saxena
>> > >
>> > > "Henning Krause [MVP - Exchange]" wrote:
>> > >
>> > >> Hello Atul,
>> > >>
>> > >> If I you set the the property I mentioned to a valid Base64 encoded
>> > >> byte
>> > >> array, Exchange will retain that value in that property - if you
>> > >> later
>> > >> use
>> > >> this value to search for that appointment, Exchange will return it.
>> > >>
>> > >> The properties
>> > >> http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x23
>> > >> and
>> > >> http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x3
>> > >> will retain their values if you set them to a valid binary value.
>> > >>
>> > >> All other Exchange id (EntryId, DAV:id, etc) will be set by Outlook
>> > >> and
>> > >> can
>> > >> not be modified.
>> > >>
>> > >> I'm still somewhat confused about what you are trying to do. Do you
>> > >> effectively want to prevent your users to delete an appointment
>> > >> because
>> > >> you
>> > >> recreate it when they delete it?
>> > >>
>> > >> Kind regards,
>> > >> Henning Krause
>> > >>
>> > >> "Atul Saxena" wrote in
>> > >> message
>> > >> @microsoft.com...
>> > >> > Dear Henning,
>> > >> >
>> > >> > What I do is first I synchronized outlook appointment of an user
>> > >> > to sql
>> > >> > server means all the appointment would be created in sql server in
>> > >> > following
>> > >> > format:
>> > >> >
>> > >> > ID nvarchar(1000) Checked
>> > >> > Href text Checked
>> > >> > LastModificationDate datetime Checked
>> > >> > Subject text Checked
>> > >> > TextDescription text Checked
>> > >> > Location nvarchar(150) Checked
>> > >> > DtStart datetime Checked
>> > >> > DtEnd datetime Checked
>> > >> > InstanceType nvarchar(150) Checked
>> > >> > BusyStatus nvarchar(50) Checked
>> > >> > MeetingStatus nvarchar(50) Checked
>> > >> > AllDayEvent bit Checked
>> > >> > ResponseRequested bit Checked
>> > >> > ReminderOffset int Checked
>> > >> > MailSender nvarchar(1500) Checked
>> > >> > MailTo nvarchar(1500) Checked
>> > >> > MailType smallint Checked
>> > >> >
>> > >> > In above table ID contains the ID of Appointment like
>> > >> > AQEAAAAAAEZ1AgAAAAAoCAkAAAAAA. Now If user delete a particular
>> > >> > appointment
>> > >> > then I execute a query in which that deleted appoinment ID is
>> > >> > fetched.
>> > >> > After
>> > >> > fetching that appointment ID from Sql Server, I want create that
>> > >> > appointment
>> > >> > in outlook with SQL Server ID. Now I am facing a problem that when
>> > >> > I
>> > >> > generate
>> > >> > appointment in outlook with that SQL server ID then it would
>> > >> > generate
>> > >> > it
>> > >> > own
>> > >> > ID. So tell me is there any way of generating appointment on my
>> > >> > given
>> > >> > ID.
>> > >> >
>> > >> > My code of generating appointment is given below
>> > >> >
>> > >> > Private Sub psbCreateDataAtOutlook(ByVal strURI As
>> > >> > System.String)
>> > >> > Dim oDataset As New DataSet
>> > >> > Dim strTableName As String = "CreateDataAtOutlook"
>> > >> > Dim iCtr As System.Int16
>> > >> > Dim status As Integer
>> > >> > Try
>> > >> > oDataset = fnGetSource(strTableName, strAllIDs, 0)
>> > >> > If oDataset.Tables(strTableName).Rows.Count > 0 Then
>> > >> > If Me.MailType = 2 Then
>> > >> > For iCtr = 0 To
>> > >> > oDataset.Tables(strTableName).Rows.Count
>> > >> > - 1
>> > >> > sQuery = " >> > >> > encoding='utf-8'?>" &
>> > >> > _
>> > >> > " >> > >> > xmlns:a='DAV:' xmlns:m='urn:schemas:mailheader:'
>> > >> > xmlns:cal=""urn:schemas:calendar:"" " & _
>> > >> >
>> > >> > "xmlns:mapi=""http://schemas.microsoft.com/mapi/"" " & _
>> > >> >
>> > >> > "xmlns:e=""http://schemas.microsoft.com/exchange/"" " & _
>> > >> >
>> > >> > "xmlns:dt='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/' " & _
>> > >> >
>> > >> > "xmlns:mail='urn:schemas:httpmail:' " & _
>> > >> >
>> > >> > "xmlns:f=""http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/"">
>> > >> > " & _
>> > >> > "" & _
>> > >> > "" &
>> > >> > _
>> > >> >
>> > >> > "urn:content-classes:appointment"
>> > >> > & _
>> > >> >
>> > >> > "IPM.Appointment" &
>> > >> > _
>> > >> > "" &
>> > >> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(0)),
>> > >> > "",
>> > >> > oDataset.Tables(strTableName).Rows(iCtr).Item(0)) & "" &
>> > >> > _
>> > >> > "" &
>> > >> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(0)),
>> > >> > "",
>> > >> > oDataset.Tables(strTableName).Rows(iCtr).Item(0)) & "" & _
>> > >> > "" &
>> > >> > _
>> > >> > ""
>> > >> > & _
>> > >> >
>> > >> > "" &
>> > >> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(2)),
>> > >> > "",
>> > >> > oDataset.Tables(strTableName).Rows(iCtr).Item(2)) & "
>> > >> > "
>> > >> > & _
>> > >> > ""
>> > >> > & _
>> > >> > "" &
>> > >> > _
>> > >> >
>> > >> > "Netaji Subhash
>> > >> > Palace" &
>> > >> > _
>> > >> > ""
>> > >> > & _
>> > >> > "" &
>> > >> > _
>> > >> >
>> > >> > "Netaji
>> > >> > Subhash Palace" & _
>> > >> > ""
>> > >> > & _
>> > >> > "" &
>> > >> > _
>> > >> >
>> > >> > "" &
>> > >> > fnChangerDateLocalGMT(oDataset.Tables(strTableName).Rows(iCtr).Item(5))
>> > >> > &
>> > >> > "
>> > >> > " & _
>> > >> > ""
>> > >> > & _
>> > >> > "" &
>> > >> > _
>> > >> > ""
>> > >> > &
>> > >> > fnChangerDateLocalGMT(oDataset.Tables(strTableName).Rows(iCtr).Item(6))
>> > >> > &
>> > >> > "
>> > >> > " & _
>> > >> >
>> > >> > " >> > >> > dt:dt=""int"">0" & _
>> > >> > ""
>> > >> > & _
>> > >> > ""
>> > >> > & _
>> > >> >
>> > >> > ""
>> > >> > &
>> > >> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(7)),
>> > >> > "",
>> > >> > oDataset.Tables(strTableName).Rows(0).Item(7)) & "
>> > >> > " &
>> > >> > _
>> > >> > ""
>> > >> > & _
>> > >> > ""
>> > >> > & _
>> > >> >
>> > >> > ""
>> > >> > & IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(Cool),
>> > >> > "",
>> > >> > oDataset.Tables(strTableName).Rows(0).Item(Cool) & "
>> > >> > " &
>> > >> > _
>> > >> >
>> > >> > " >> > >> > dt:dt=""boolean"">0" & _
>> > >> >
>> > >> > " >> > >> > dt:dt=""boolean"">1" &
>> > >> > _
>> > >> >
>> > >> > " >> > >> > dt:dt=""int"">900" & _
>> > >> > "" &
>> > >> > Me.UserNameAlias & "" & _
>> > >> >
>> > >> > " >> > >> > dt:dt=""boolean"">1" & _
>> > >> > ""
>> > >> > & _
>> > >> > "" & _
>> > >> >
>> > >> > ""
>> > >> >
>> > >> > 'oXMLHttp =
>> > >> > CreateObject("Microsoft.XMLHTTP")
>> > >> > oXMLHttp.open("PROPPATCH",
>> > >> > oDataset.Tables(strTableName).Rows(iCtr).Item(1), False,
>> > >> > Me.UserNameAlias,
>> > >> > Me.Password)
>> > >> > ' Set up request headers.
>> > >> > oXMLHttp.setRequestHeader("Content-Type",
>> > >> > "text/xml")
>> > >> > 'oXMLHttp.setRequestHeader("Brief", "t")
>> > >> > ' Send the query.
>> > >> > oXMLHttp.send(sQuery)
>> > >> > status = CheckStatus(oXMLHttp.status)
Back to top
View user's profile Send private message
Atul Saxena



Joined: 12 Oct 2007
Posts: 15

PostPosted: Thu Oct 18, 2007 6:06 am    Post subject: Re: Showing Error: HTTP/1.1 403 (Forbidden) Reply with quote

Dear Henning,

could you please convert
http://www.infinitec.de/articles/exchange/creatingwebdavrequestswithxmlreaderwriter.aspx
C# code to vb.net code coz when I am trying it giving me lot of error.
please advice.

Thanks & regards,

Atul Saxena

"Henning Krause [MVP - Exchange]" wrote:

> Hello Atul,
>
> the code at
> http://www.infinitec.de/articles/exchange/creatingwebdavrequestswithxmlreaderwriter.aspx
> contains everything you need to query the properties.
>
> Just call the
> CreatePropFindRequest("http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x23")
> and send the created buffer to the server as shown in the PropFind method.
>
> Kind regards,
> Henning
>
>
> "Atul Saxena" wrote in message
> @microsoft.com...
> > Dear Henning,
> >
> > Please tell me how could I create custom column in Outlook Appointment. As
> > I
> > am able to make column 0x23,0x3 but i can't fetch the value of that
> > column.
> >
> > Please advice as I am new in exchange server.
> >
> > thanks & regards,
> >
> > Atul Saxena
> > "Atul Saxena" wrote:
> >
> >> Dear Henning,
> >>
> >> I create the custom column
> >> xmlns:f=http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x23
> >> and create new my own ID at this column but when i again access from
> >> exchange
> >> then it gives error "Bad Request" in response text.
> >>
> >> Code for fetching appointment:
> >>
> >> sQuery = "" & _
> >> " > >> xmlns:m='urn:schemas:mailheader:' xmlns:cal=""urn:schemas:calendar:"" " &
> >> _
> >>
> >> "xmlns:dt='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/' "
> >> & _
> >> "xmlns:mail='urn:schemas:httpmail:'> " & _
> >>
> >> "xmlns:f=""http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/"">
> >> " & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> "" & _
> >> ""
> >>
> >> ' Set up request headers.
> >> oXMLHttp.setRequestHeader("Content-Type", "text/xml")
> >>
> >> ' Send the query.
> >> oXMLHttp.send(sQuery)
> >>
> >> Please tell me what I am doing wrong.
> >>
> >> Thanks & regards,
> >>
> >> Atul Saxena
> >> "Henning Krause [MVP - Exchange]" wrote:
> >>
> >> > Hello Atul,
> >> >
> >> > the solution I told you is fine for appointments.
> >> >
> >> > But for other types, simply store the
> >> > http://schemas.microsoft.com/exchange/permanenturl in your database.
> >> >
> >> > This is far easier because you can later access the item directly with
> >> > that
> >> > url - no need to search for it.
> >> >
> >> > This doesn't work for appointments because Outlook recreates them under
> >> > certain circumstances, thus the entryid of the item is changed - and
> >> > with it
> >> > the permanent url (See http://support.microsoft.com/kb/899919).
> >> >
> >> > Kind regards,
> >> > Henning
> >> >
> >> > "Atul Saxena" wrote in message
> >> > @microsoft.com...
> >> > > Hello Henning,
> >> > >
> >> > > Actually my purpose is to synchronized the outlook with sql server
> >> > > and
> >> > > vice
> >> > > versa. tell me whether I am going the right way to synchronization
> >> > > coz
> >> > > what I
> >> > > am doing is to update, insert and delete the outlook mails,
> >> > > appointment,
> >> > > task
> >> > > with sql server and vice versa.
> >> > >
> >> > > The solution u told me is
> >> > >
> >> > > The properties
> >> > >
> >> > > http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x23
> >> > > and
> >> > >
> >> > > http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x3 .
> >> > >
> >> > > Do you want to say in above namespace, It would create custom cloumn
> >> > > in
> >> > > exchange then on the basis of that I syn outlook.
> >> > >
> >> > > Thanks & regards,
> >> > >
> >> > > Atul Saxena
> >> > >
> >> > > "Henning Krause [MVP - Exchange]" wrote:
> >> > >
> >> > >> Hello Atul,
> >> > >>
> >> > >> If I you set the the property I mentioned to a valid Base64 encoded
> >> > >> byte
> >> > >> array, Exchange will retain that value in that property - if you
> >> > >> later
> >> > >> use
> >> > >> this value to search for that appointment, Exchange will return it.
> >> > >>
> >> > >> The properties
> >> > >> http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x23
> >> > >> and
> >> > >> http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/0x3
> >> > >> will retain their values if you set them to a valid binary value.
> >> > >>
> >> > >> All other Exchange id (EntryId, DAV:id, etc) will be set by Outlook
> >> > >> and
> >> > >> can
> >> > >> not be modified.
> >> > >>
> >> > >> I'm still somewhat confused about what you are trying to do. Do you
> >> > >> effectively want to prevent your users to delete an appointment
> >> > >> because
> >> > >> you
> >> > >> recreate it when they delete it?
> >> > >>
> >> > >> Kind regards,
> >> > >> Henning Krause
> >> > >>
> >> > >> "Atul Saxena" wrote in
> >> > >> message
> >> > >> @microsoft.com...
> >> > >> > Dear Henning,
> >> > >> >
> >> > >> > What I do is first I synchronized outlook appointment of an user
> >> > >> > to sql
> >> > >> > server means all the appointment would be created in sql server in
> >> > >> > following
> >> > >> > format:
> >> > >> >
> >> > >> > ID nvarchar(1000) Checked
> >> > >> > Href text Checked
> >> > >> > LastModificationDate datetime Checked
> >> > >> > Subject text Checked
> >> > >> > TextDescription text Checked
> >> > >> > Location nvarchar(150) Checked
> >> > >> > DtStart datetime Checked
> >> > >> > DtEnd datetime Checked
> >> > >> > InstanceType nvarchar(150) Checked
> >> > >> > BusyStatus nvarchar(50) Checked
> >> > >> > MeetingStatus nvarchar(50) Checked
> >> > >> > AllDayEvent bit Checked
> >> > >> > ResponseRequested bit Checked
> >> > >> > ReminderOffset int Checked
> >> > >> > MailSender nvarchar(1500) Checked
> >> > >> > MailTo nvarchar(1500) Checked
> >> > >> > MailType smallint Checked
> >> > >> >
> >> > >> > In above table ID contains the ID of Appointment like
> >> > >> > AQEAAAAAAEZ1AgAAAAAoCAkAAAAAA. Now If user delete a particular
> >> > >> > appointment
> >> > >> > then I execute a query in which that deleted appoinment ID is
> >> > >> > fetched.
> >> > >> > After
> >> > >> > fetching that appointment ID from Sql Server, I want create that
> >> > >> > appointment
> >> > >> > in outlook with SQL Server ID. Now I am facing a problem that when
> >> > >> > I
> >> > >> > generate
> >> > >> > appointment in outlook with that SQL server ID then it would
> >> > >> > generate
> >> > >> > it
> >> > >> > own
> >> > >> > ID. So tell me is there any way of generating appointment on my
> >> > >> > given
> >> > >> > ID.
> >> > >> >
> >> > >> > My code of generating appointment is given below
> >> > >> >
> >> > >> > Private Sub psbCreateDataAtOutlook(ByVal strURI As
> >> > >> > System.String)
> >> > >> > Dim oDataset As New DataSet
> >> > >> > Dim strTableName As String = "CreateDataAtOutlook"
> >> > >> > Dim iCtr As System.Int16
> >> > >> > Dim status As Integer
> >> > >> > Try
> >> > >> > oDataset = fnGetSource(strTableName, strAllIDs, 0)
> >> > >> > If oDataset.Tables(strTableName).Rows.Count > 0 Then
> >> > >> > If Me.MailType = 2 Then
> >> > >> > For iCtr = 0 To
> >> > >> > oDataset.Tables(strTableName).Rows.Count
> >> > >> > - 1
> >> > >> > sQuery = " > >> > >> > encoding='utf-8'?>" &
> >> > >> > _
> >> > >> > " > >> > >> > xmlns:a='DAV:' xmlns:m='urn:schemas:mailheader:'
> >> > >> > xmlns:cal=""urn:schemas:calendar:"" " & _
> >> > >> >
> >> > >> > "xmlns:mapi=""http://schemas.microsoft.com/mapi/"" " & _
> >> > >> >
> >> > >> > "xmlns:e=""http://schemas.microsoft.com/exchange/"" " & _
> >> > >> >
> >> > >> > "xmlns:dt='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/' " & _
> >> > >> >
> >> > >> > "xmlns:mail='urn:schemas:httpmail:' " & _
> >> > >> >
> >> > >> > "xmlns:f=""http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/"">
> >> > >> > " & _
> >> > >> > "" & _
> >> > >> > "" &
> >> > >> > _
> >> > >> >
> >> > >> > "urn:content-classes:appointment"
> >> > >> > & _
> >> > >> >
> >> > >> > "IPM.Appointment" &
> >> > >> > _
> >> > >> > "" &
> >> > >> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(0)),
> >> > >> > "",
> >> > >> > oDataset.Tables(strTableName).Rows(iCtr).Item(0)) & "" &
> >> > >> > _
> >> > >> > "" &
> >> > >> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(0)),
> >> > >> > "",
> >> > >> > oDataset.Tables(strTableName).Rows(iCtr).Item(0)) & "" & _
> >> > >> > "" &
> >> > >> > _
> >> > >> > ""
> >> > >> > & _
> >> > >> >
> >> > >> > "" &
> >> > >> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(2)),
> >> > >> > "",
> >> > >> > oDataset.Tables(strTableName).Rows(iCtr).Item(2)) & "
> >> > >> > "
> >> > >> > & _
> >> > >> > ""
> >> > >> > & _
> >> > >> > "" &
> >> > >> > _
> >> > >> >
> >> > >> > "Netaji Subhash
> >> > >> > Palace" &

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
RPC over HTTP problem The problem that I had is that I'm prompt constantly to provide my user and pass. My servers are configured as follows: windows 2000 server with exchange 2003 (this one has the store and it's also DC) Windows server 2003 with Exchange 2003 in Front End mo

OWA http link setup Hi, I can access directly without /exchange from internal access but not for external access, it was pointed to the IIS Default page and not OWA login page. It's only allowed to direct the owa login page with /exchange on behind of Any wa

error Task Info. 308 system mail Task 'SETTASK' update error! Return code 0x20 Does anyone know what this error is. Also it came from a SpntLog. Thanks

error in application log The www service keeps getting hung up and the following is logged in the application log Error: File Unexpected error Can someone provided assistance in resolving this issue?

CDO error within ASP application My ASP application uses Windows integrated and security as its security settings within the IIS server. I'm trying to execute a page that connects to the user's Exchange 5.5 mailbox (on a seperate server). To achieve this, I'm using CDO
Post new topic   Reply to topic    exchangefreaks.com Forum Index -> MS Exchange Applications All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group