|
|
|
date: Thu, 11 Oct 2007 20:48:01 -0700,
group: microsoft.public.exchange.applications
back
Re: Showing Error: HTTP/1.1 403 (Forbidden)
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
> news:051D97A6-F35C-4715-849F-3074DA1686F0@microsoft.com...
> > While creating an new appointment, I am getting Error: HTTP/1.1 403
> > (Forbidden)
> > error.
> >
> > My code is:
> >
> > <?xml version='1.0'?><a:propertyupdate 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:'>
> > <a:set><a:prop><a:contentclass>urn:content-classes:appointment</a:contentclass><e:outlookmessageclass>IPM.Appointment</e:outlookmessageclass><a:id>AQEAAAAAAEZ1AgAAAAAoCAgAAAAA
> > </a:id></a:prop><a:prop><mail:subject>Solve Hexadecimal Error by Atul
> > Saxena
> > </mail:subject></a:prop><a:prop><mail:textdescription>Netaji Subhash
> > Palace</mail:textdescription></a:prop><a:prop><cal:location>Netaji Subhash
> > Palace</cal:location></a:prop><a:prop><cal:dtstart>2007-09-27T03:30:00.000Z
> > </cal:dtstart></a:prop><a:prop><cal:dtend>2007-09-27T04:00:00.000Z
> > </cal:dtend><cal:instancetype
> > dt:dt="int">0</cal:instancetype></a:prop><a:prop><cal:busystatus>BUSY
> > </cal:busystatus></a:prop><a:prop><cal:meetingstatus>TENTATIVE
> > </cal:meetingstatus><cal:alldayevent
> > dt:dt="boolean">0</cal:alldayevent><cal:responserequested
> > dt:dt="boolean">1</cal:responserequested><cal:reminderoffset
> > dt:dt="int">900</cal:reminderoffset><m:to>ccrindiaadmin@ccrindia.com</m:to><mapi:finvited
> > dt:dt="boolean">1</mapi:finvited></a:prop></a:set></a:propertyupdate>
> >
> > 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:
> >
> > <?xml version="1.0"?><a:multistatus
> > xmlns:b="http://schemas.microsoft.com/exchange/"
> > xmlns:a="DAV:"><a:response><a:href>http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar</a:href><a:propstat><a:status>HTTP/1.1
> > 403
> > Forbidden</a:status><a:prop><a:id/></a:prop></a:propstat></a:response></a:multistatus>
> >
> > 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
> >
> >
>
>
date: Thu, 11 Oct 2007 23:43:02 -0700
author: Atul Saxena
Re: Showing Error: HTTP/1.1 403 (Forbidden)
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
news:FEB54591-180C-4A35-A35B-B2AC6EAEC05C@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
>> news:051D97A6-F35C-4715-849F-3074DA1686F0@microsoft.com...
>> > While creating an new appointment, I am getting Error: HTTP/1.1 403
>> > (Forbidden)
>> > error.
>> >
>> > My code is:
>> >
>> > <?xml version='1.0'?><a:propertyupdate 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:'>
>> > <a:set><a:prop><a:contentclass>urn:content-classes:appointment</a:contentclass><e:outlookmessageclass>IPM.Appointment</e:outlookmessageclass><a:id>AQEAAAAAAEZ1AgAAAAAoCAgAAAAA
>> > </a:id></a:prop><a:prop><mail:subject>Solve Hexadecimal Error by Atul
>> > Saxena
>> > </mail:subject></a:prop><a:prop><mail:textdescription>Netaji Subhash
>> > Palace</mail:textdescription></a:prop><a:prop><cal:location>Netaji
>> > Subhash
>> > Palace</cal:location></a:prop><a:prop><cal:dtstart>2007-09-27T03:30:00.000Z
>> > </cal:dtstart></a:prop><a:prop><cal:dtend>2007-09-27T04:00:00.000Z
>> > </cal:dtend><cal:instancetype
>> > dt:dt="int">0</cal:instancetype></a:prop><a:prop><cal:busystatus>BUSY
>> > </cal:busystatus></a:prop><a:prop><cal:meetingstatus>TENTATIVE
>> > </cal:meetingstatus><cal:alldayevent
>> > dt:dt="boolean">0</cal:alldayevent><cal:responserequested
>> > dt:dt="boolean">1</cal:responserequested><cal:reminderoffset
>> > dt:dt="int">900</cal:reminderoffset><m:to>ccrindiaadmin@ccrindia.com</m:to><mapi:finvited
>> > dt:dt="boolean">1</mapi:finvited></a:prop></a:set></a:propertyupdate>
>> >
>> > 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:
>> >
>> > <?xml version="1.0"?><a:multistatus
>> > xmlns:b="http://schemas.microsoft.com/exchange/"
>> > xmlns:a="DAV:"><a:response><a:href>http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar</a:href><a:propstat><a:status>HTTP/1.1
>> > 403
>> > Forbidden</a:status><a:prop><a:id/></a:prop></a:propstat></a:response></a:multistatus>
>> >
>> > 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
>> >
>> >
>>
>>
date: Fri, 12 Oct 2007 10:54:44 +0200
author: Henning Krause [MVP - Exchange]
Re: Showing Error: HTTP/1.1 403 (Forbidden)
Hi Henning,
Thanks for quick response. As I am creating desired ID by your specified
namespace which code is mentioned below:
<?xml version='1.0' encoding='utf-8'?><a:propertyupdate 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}/">
<a:set><a:prop><a:contentclass>urn:content-classes:appointment</a:contentclass><e:outlookmessageclass>IPM.Appointment</e:outlookmessageclass><f:0x23>AQEAAAAAAEZ1AgAAAAAoCAkAAAAAA</f:0x23><f:0x3>AQEAAAAAAEZ1AgAAAAAoCAkAAAAA</f:0x3></a:prop><a:prop><mail:subject>No
Appointment </mail:subject></a:prop><a:prop><mail:textdescription>Netaji
Subhash Palace</mail:textdescription></a:prop><a:prop><cal:location>Netaji
Subhash
Palace</cal:location></a:prop><a:prop><cal:dtstart>2007-09-27T04:30:00.000Z
</cal:dtstart></a:prop><a:prop><cal:dtend>2007-09-27T05:00:00.000Z
</cal:dtend><cal:instancetype
dt:dt="int">0</cal:instancetype></a:prop><a:prop><cal:busystatus>BUSY
</cal:busystatus></a:prop><a:prop><cal:meetingstatus>TENTATIVE
</cal:meetingstatus><cal:alldayevent
dt:dt="boolean">0</cal:alldayevent><cal:responserequested
dt:dt="boolean">1</cal:responserequested><cal:reminderoffset
dt:dt="int">900</cal:reminderoffset><m:to>ccrindiaadmin@ccrindia.com</m:to><mapi:finvited
dt:dt="boolean">1</mapi:finvited></a:prop></a:set></a:propertyupdate>
This code is working fine and response of this is:
<?xml version="1.0"?><a:multistatus
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:"><a:response><a:href>http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar/No%20Appointment.EML</a:href><a:propstat><a:status>HTTP/1.1
200
OK</a:status><a:prop><a:contentclass/><b:outlookmessageclass/><c:0x23/><c:0x3/><d:subject/><d:textdescription/><e:location/><e:dtstart/><e:dtend/><e:instancetype/><e:busystatus/><e:meetingstatus/><e:alldayevent/><e:responserequested/><e:reminderoffset/><f:to/><g:finvited/></a:prop></a:propstat></a:response></a:multistatus>
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
> news:FEB54591-180C-4A35-A35B-B2AC6EAEC05C@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
> >> news:051D97A6-F35C-4715-849F-3074DA1686F0@microsoft.com...
> >> > While creating an new appointment, I am getting Error: HTTP/1.1 403
> >> > (Forbidden)
> >> > error.
> >> >
> >> > My code is:
> >> >
> >> > <?xml version='1.0'?><a:propertyupdate 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:'>
> >> > <a:set><a:prop><a:contentclass>urn:content-classes:appointment</a:contentclass><e:outlookmessageclass>IPM.Appointment</e:outlookmessageclass><a:id>AQEAAAAAAEZ1AgAAAAAoCAgAAAAA
> >> > </a:id></a:prop><a:prop><mail:subject>Solve Hexadecimal Error by Atul
> >> > Saxena
> >> > </mail:subject></a:prop><a:prop><mail:textdescription>Netaji Subhash
> >> > Palace</mail:textdescription></a:prop><a:prop><cal:location>Netaji
> >> > Subhash
> >> > Palace</cal:location></a:prop><a:prop><cal:dtstart>2007-09-27T03:30:00.000Z
> >> > </cal:dtstart></a:prop><a:prop><cal:dtend>2007-09-27T04:00:00.000Z
> >> > </cal:dtend><cal:instancetype
> >> > dt:dt="int">0</cal:instancetype></a:prop><a:prop><cal:busystatus>BUSY
> >> > </cal:busystatus></a:prop><a:prop><cal:meetingstatus>TENTATIVE
> >> > </cal:meetingstatus><cal:alldayevent
> >> > dt:dt="boolean">0</cal:alldayevent><cal:responserequested
> >> > dt:dt="boolean">1</cal:responserequested><cal:reminderoffset
> >> > dt:dt="int">900</cal:reminderoffset><m:to>ccrindiaadmin@ccrindia.com</m:to><mapi:finvited
> >> > dt:dt="boolean">1</mapi:finvited></a:prop></a:set></a:propertyupdate>
> >> >
> >> > 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:
> >> >
> >> > <?xml version="1.0"?><a:multistatus
> >> > xmlns:b="http://schemas.microsoft.com/exchange/"
> >> > xmlns:a="DAV:"><a:response><a:href>http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar</a:href><a:propstat><a:status>HTTP/1.1
> >> > 403
> >> > Forbidden</a:status><a:prop><a:id/></a:prop></a:propstat></a:response></a:multistatus>
> >> >
> >> > 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
> >> >
> >> >
> >>
> >>
>
>
date: Fri, 12 Oct 2007 04:23:00 -0700
author: Atul Saxena
Re: Showing Error: HTTP/1.1 403 (Forbidden)
Hi Henning,
Thanks for quick response. As I am creating desired ID by your specified
namespace which code is mentioned below:
<?xml version='1.0' encoding='utf-8'?><a:propertyupdate 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}/">
<a:set><a:prop><a:contentclass>urn:content-classes:appointment</a:contentclass><e:outlookmessageclass>IPM.Appointment</e:outlookmessageclass><f:0x23>AQEAAAAAAEZ1AgAAAAAoCAkAAAAAA</f:0x23><f:0x3>AQEAAAAAAEZ1AgAAAAAoCAkAAAAA</f:0x3></a:prop><a:prop><mail:subject>No
Appointment </mail:subject></a:prop><a:prop><mail:textdescription>Netaji
Subhash Palace</mail:textdescription></a:prop><a:prop><cal:location>Netaji
Subhash
Palace</cal:location></a:prop><a:prop><cal:dtstart>2007-09-27T04:30:00.000Z
</cal:dtstart></a:prop><a:prop><cal:dtend>2007-09-27T05:00:00.000Z
</cal:dtend><cal:instancetype
dt:dt="int">0</cal:instancetype></a:prop><a:prop><cal:busystatus>BUSY
</cal:busystatus></a:prop><a:prop><cal:meetingstatus>TENTATIVE
</cal:meetingstatus><cal:alldayevent
dt:dt="boolean">0</cal:alldayevent><cal:responserequested
dt:dt="boolean">1</cal:responserequested><cal:reminderoffset
dt:dt="int">900</cal:reminderoffset><m:to>ccrindiaadmin@ccrindia.com</m:to><mapi:finvited
dt:dt="boolean">1</mapi:finvited></a:prop></a:set></a:propertyupdate>
This code is working fine and response of this is:
<?xml version="1.0"?><a:multistatus
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:"><a:response><a:href>http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar/No%20Appointment.EML</a:href><a:propstat><a:status>HTTP/1.1
200
OK</a:status><a:prop><a:contentclass/><b:outlookmessageclass/><c:0x23/><c:0x3/><d:subject/><d:textdescription/><e:location/><e:dtstart/><e:dtend/><e:instancetype/><e:busystatus/><e:meetingstatus/><e:alldayevent/><e:responserequested/><e:reminderoffset/><f:to/><g:finvited/></a:prop></a:propstat></a:response></a:multistatus>
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
> news:FEB54591-180C-4A35-A35B-B2AC6EAEC05C@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
> >> news:051D97A6-F35C-4715-849F-3074DA1686F0@microsoft.com...
> >> > While creating an new appointment, I am getting Error: HTTP/1.1 403
> >> > (Forbidden)
> >> > error.
> >> >
> >> > My code is:
> >> >
> >> > <?xml version='1.0'?><a:propertyupdate 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:'>
> >> > <a:set><a:prop><a:contentclass>urn:content-classes:appointment</a:contentclass><e:outlookmessageclass>IPM.Appointment</e:outlookmessageclass><a:id>AQEAAAAAAEZ1AgAAAAAoCAgAAAAA
> >> > </a:id></a:prop><a:prop><mail:subject>Solve Hexadecimal Error by Atul
> >> > Saxena
> >> > </mail:subject></a:prop><a:prop><mail:textdescription>Netaji Subhash
> >> > Palace</mail:textdescription></a:prop><a:prop><cal:location>Netaji
> >> > Subhash
> >> > Palace</cal:location></a:prop><a:prop><cal:dtstart>2007-09-27T03:30:00.000Z
> >> > </cal:dtstart></a:prop><a:prop><cal:dtend>2007-09-27T04:00:00.000Z
> >> > </cal:dtend><cal:instancetype
> >> > dt:dt="int">0</cal:instancetype></a:prop><a:prop><cal:busystatus>BUSY
> >> > </cal:busystatus></a:prop><a:prop><cal:meetingstatus>TENTATIVE
> >> > </cal:meetingstatus><cal:alldayevent
> >> > dt:dt="boolean">0</cal:alldayevent><cal:responserequested
> >> > dt:dt="boolean">1</cal:responserequested><cal:reminderoffset
> >> > dt:dt="int">900</cal:reminderoffset><m:to>ccrindiaadmin@ccrindia.com</m:to><mapi:finvited
> >> > dt:dt="boolean">1</mapi:finvited></a:prop></a:set></a:propertyupdate>
> >> >
> >> > 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:
> >> >
> >> > <?xml version="1.0"?><a:multistatus
> >> > xmlns:b="http://schemas.microsoft.com/exchange/"
> >> > xmlns:a="DAV:"><a:response><a:href>http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar</a:href><a:propstat><a:status>HTTP/1.1
> >> > 403
> >> > Forbidden</a:status><a:prop><a:id/></a:prop></a:propstat></a:response></a:multistatus>
> >> >
> >> > 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
> >> >
> >> >
> >>
> >>
>
>
date: Fri, 12 Oct 2007 04:34:00 -0700
author: Atul Saxena
Re: Showing Error: HTTP/1.1 403 (Forbidden)
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
news:4FF63A04-93EA-482D-AC56-2936865E6F4F@microsoft.com...
> Hi Henning,
>
> Thanks for quick response. As I am creating desired ID by your specified
> namespace which code is mentioned below:
>
> <?xml version='1.0' encoding='utf-8'?><a:propertyupdate 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}/">
> <a:set><a:prop><a:contentclass>urn:content-classes:appointment</a:contentclass><e:outlookmessageclass>IPM.Appointment</e:outlookmessageclass><f:0x23>AQEAAAAAAEZ1AgAAAAAoCAkAAAAAA</f:0x23><f:0x3>AQEAAAAAAEZ1AgAAAAAoCAkAAAAA</f:0x3></a:prop><a:prop><mail:subject>No
> Appointment </mail:subject></a:prop><a:prop><mail:textdescription>Netaji
> Subhash Palace</mail:textdescription></a:prop><a:prop><cal:location>Netaji
> Subhash
> Palace</cal:location></a:prop><a:prop><cal:dtstart>2007-09-27T04:30:00.000Z
> </cal:dtstart></a:prop><a:prop><cal:dtend>2007-09-27T05:00:00.000Z
> </cal:dtend><cal:instancetype
> dt:dt="int">0</cal:instancetype></a:prop><a:prop><cal:busystatus>BUSY
> </cal:busystatus></a:prop><a:prop><cal:meetingstatus>TENTATIVE
> </cal:meetingstatus><cal:alldayevent
> dt:dt="boolean">0</cal:alldayevent><cal:responserequested
> dt:dt="boolean">1</cal:responserequested><cal:reminderoffset
> dt:dt="int">900</cal:reminderoffset><m:to>ccrindiaadmin@ccrindia.com</m:to><mapi:finvited
> dt:dt="boolean">1</mapi:finvited></a:prop></a:set></a:propertyupdate>
>
> This code is working fine and response of this is:
>
> <?xml version="1.0"?><a:multistatus
> 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:"><a:response><a:href>http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar/No%20Appointment.EML</a:href><a:propstat><a:status>HTTP/1.1
> 200
> OK</a:status><a:prop><a:contentclass/><b:outlookmessageclass/><c:0x23/><c:0x3/><d:subject/><d:textdescription/><e:location/><e:dtstart/><e:dtend/><e:instancetype/><e:busystatus/><e:meetingstatus/><e:alldayevent/><e:responserequested/><e:reminderoffset/><f:to/><g:finvited/></a:prop></a:propstat></a:response></a:multistatus>
>
> 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
>> news:FEB54591-180C-4A35-A35B-B2AC6EAEC05C@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
>> >> news:051D97A6-F35C-4715-849F-3074DA1686F0@microsoft.com...
>> >> > While creating an new appointment, I am getting Error: HTTP/1.1 403
>> >> > (Forbidden)
>> >> > error.
>> >> >
>> >> > My code is:
>> >> >
>> >> > <?xml version='1.0'?><a:propertyupdate 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:'>
>> >> > <a:set><a:prop><a:contentclass>urn:content-classes:appointment</a:contentclass><e:outlookmessageclass>IPM.Appointment</e:outlookmessageclass><a:id>AQEAAAAAAEZ1AgAAAAAoCAgAAAAA
>> >> > </a:id></a:prop><a:prop><mail:subject>Solve Hexadecimal Error by
>> >> > Atul
>> >> > Saxena
>> >> > </mail:subject></a:prop><a:prop><mail:textdescription>Netaji Subhash
>> >> > Palace</mail:textdescription></a:prop><a:prop><cal:location>Netaji
>> >> > Subhash
>> >> > Palace</cal:location></a:prop><a:prop><cal:dtstart>2007-09-27T03:30:00.000Z
>> >> > </cal:dtstart></a:prop><a:prop><cal:dtend>2007-09-27T04:00:00.000Z
>> >> > </cal:dtend><cal:instancetype
>> >> > dt:dt="int">0</cal:instancetype></a:prop><a:prop><cal:busystatus>BUSY
>> >> > </cal:busystatus></a:prop><a:prop><cal:meetingstatus>TENTATIVE
>> >> > </cal:meetingstatus><cal:alldayevent
>> >> > dt:dt="boolean">0</cal:alldayevent><cal:responserequested
>> >> > dt:dt="boolean">1</cal:responserequested><cal:reminderoffset
>> >> > dt:dt="int">900</cal:reminderoffset><m:to>ccrindiaadmin@ccrindia.com</m:to><mapi:finvited
>> >> > dt:dt="boolean">1</mapi:finvited></a:prop></a:set></a:propertyupdate>
>> >> >
>> >> > 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:
>> >> >
>> >> > <?xml version="1.0"?><a:multistatus
>> >> > xmlns:b="http://schemas.microsoft.com/exchange/"
>> >> > xmlns:a="DAV:"><a:response><a:href>http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar</a:href><a:propstat><a:status>HTTP/1.1
>> >> > 403
>> >> > Forbidden</a:status><a:prop><a:id/></a:prop></a:propstat></a:response></a:multistatus>
>> >> >
>> >> > 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
>> >> >
>> >> >
>> >>
>> >>
>>
>>
date: Fri, 12 Oct 2007 13:36:02 +0200
author: Henning Krause [MVP - Exchange]
Re: Showing Error: HTTP/1.1 403 (Forbidden)
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 = "<?xml version='1.0' encoding='utf-8'?>" & _
"<a:propertyupdate
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}/""> " & _
"<a:set>" & _
"<a:prop>" & _
"<a:contentclass>urn:content-classes:appointment</a:contentclass>" & _
"<e:outlookmessageclass>IPM.Appointment</e:outlookmessageclass>" & _
"<f:0x23>" &
IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(0)), "",
oDataset.Tables(strTableName).Rows(iCtr).Item(0)) & "</f:0x23>" & _
"<f:0x3>" &
IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(0)), "",
oDataset.Tables(strTableName).Rows(iCtr).Item(0)) & "</f:0x3>" & _
"</a:prop>" & _
"<a:prop>" & _
"<mail:subject>" &
IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(2)), "",
oDataset.Tables(strTableName).Rows(iCtr).Item(2)) & " </mail:subject>" & _
"</a:prop>" & _
"<a:prop>" & _
"<mail:textdescription>Netaji Subhash Palace</mail:textdescription>" & _
"</a:prop>" & _
"<a:prop>" & _
"<cal:location>Netaji
Subhash Palace</cal:location>" & _
"</a:prop>" & _
"<a:prop>" & _
"<cal:dtstart>" &
fnChangerDateLocalGMT(oDataset.Tables(strTableName).Rows(iCtr).Item(5)) & "
</cal:dtstart>" & _
"</a:prop>" & _
"<a:prop>" & _
"<cal:dtend>" &
fnChangerDateLocalGMT(oDataset.Tables(strTableName).Rows(iCtr).Item(6)) & "
</cal:dtend>" & _
"<cal:instancetype
dt:dt=""int"">0</cal:instancetype>" & _
"</a:prop>" & _
"<a:prop>" & _
"<cal:busystatus>" &
IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(7)), "",
oDataset.Tables(strTableName).Rows(0).Item(7)) & " </cal:busystatus>" & _
"</a:prop>" & _
"<a:prop>" & _
"<cal:meetingstatus>"
& IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(8)), "",
oDataset.Tables(strTableName).Rows(0).Item(8)) & " </cal:meetingstatus>" & _
"<cal:alldayevent
dt:dt=""boolean"">0</cal:alldayevent>" & _
"<cal:responserequested dt:dt=""boolean"">1</cal:responserequested>" & _
"<cal:reminderoffset
dt:dt=""int"">900</cal:reminderoffset>" & _
"<m:to>" &
Me.UserNameAlias & "</m:to>" & _
"<mapi:finvited
dt:dt=""boolean"">1</mapi:finvited>" & _
"</a:prop>" & _
"</a:set>" & _
"</a:propertyupdate>"
'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 = "<?xml version='1.0' encoding = 'utf-8'?>"
& _
"<a:propertyupdate
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}/'> " & _
"<a:set>" & _
"<a:prop>" & _
"<a:id>" &
IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(0)), "",
oDataset.Tables(strTableName).Rows(iCtr).Item(0)) & " </a:id>" & _
"</a:prop>" & _
"<a:prop>" & _
"<a:href>" &
IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(1)), "",
oDataset.Tables(strTableName).Rows(iCtr).Item(1)) & " </a:href>" & _
"</a:prop>" & _
"<a:prop>" & _
"<m:subject>" &
IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(2)), "",
oDataset.Tables(strTableName).Rows(iCtr).Item(2)) & " </m:subject>" & _
"</a:prop>" & _
"<a:prop>" & _
"<g:textdescription>" &
IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(3)), "",
oDataset.Tables(strTableName).Rows(iCtr).Item(3)) & " </g:textdescription>" &
_
"</a:prop>" & _
"</a:set>" & _
"</a:propertyupdate>"
' 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
> news:4FF63A04-93EA-482D-AC56-2936865E6F4F@microsoft.com...
> > Hi Henning,
> >
> > Thanks for quick response. As I am creating desired ID by your specified
> > namespace which code is mentioned below:
> >
> > <?xml version='1.0' encoding='utf-8'?><a:propertyupdate 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}/">
> > <a:set><a:prop><a:contentclass>urn:content-classes:appointment</a:contentclass><e:outlookmessageclass>IPM.Appointment</e:outlookmessageclass><f:0x23>AQEAAAAAAEZ1AgAAAAAoCAkAAAAAA</f:0x23><f:0x3>AQEAAAAAAEZ1AgAAAAAoCAkAAAAA</f:0x3></a:prop><a:prop><mail:subject>No
> > Appointment </mail:subject></a:prop><a:prop><mail:textdescription>Netaji
> > Subhash Palace</mail:textdescription></a:prop><a:prop><cal:location>Netaji
> > Subhash
> > Palace</cal:location></a:prop><a:prop><cal:dtstart>2007-09-27T04:30:00.000Z
> > </cal:dtstart></a:prop><a:prop><cal:dtend>2007-09-27T05:00:00.000Z
> > </cal:dtend><cal:instancetype
> > dt:dt="int">0</cal:instancetype></a:prop><a:prop><cal:busystatus>BUSY
> > </cal:busystatus></a:prop><a:prop><cal:meetingstatus>TENTATIVE
> > </cal:meetingstatus><cal:alldayevent
> > dt:dt="boolean">0</cal:alldayevent><cal:responserequested
> > dt:dt="boolean">1</cal:responserequested><cal:reminderoffset
> > dt:dt="int">900</cal:reminderoffset><m:to>ccrindiaadmin@ccrindia.com</m:to><mapi:finvited
> > dt:dt="boolean">1</mapi:finvited></a:prop></a:set></a:propertyupdate>
> >
> > This code is working fine and response of this is:
> >
> > <?xml version="1.0"?><a:multistatus
> > 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:"><a:response><a:href>http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar/No%20Appointment.EML</a:href><a:propstat><a:status>HTTP/1.1
> > 200
> > OK</a:status><a:prop><a:contentclass/><b:outlookmessageclass/><c:0x23/><c:0x3/><d:subject/><d:textdescription/><e:location/><e:dtstart/><e:dtend/><e:instancetype/><e:busystatus/><e:meetingstatus/><e:alldayevent/><e:responserequested/><e:reminderoffset/><f:to/><g:finvited/></a:prop></a:propstat></a:response></a:multistatus>
> >
> > 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
> >> news:FEB54591-180C-4A35-A35B-B2AC6EAEC05C@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
> >> >> news:051D97A6-F35C-4715-849F-3074DA1686F0@microsoft.com...
> >> >> > While creating an new appointment, I am getting Error: HTTP/1.1 403
> >> >> > (Forbidden)
> >> >> > error.
> >> >> >
> >> >> > My code is:
> >> >> >
> >> >> > <?xml version='1.0'?><a:propertyupdate 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:'>
> >> >> > <a:set><a:prop><a:contentclass>urn:content-classes:appointment</a:contentclass><e:outlookmessageclass>IPM.Appointment</e:outlookmessageclass><a:id>AQEAAAAAAEZ1AgAAAAAoCAgAAAAA
> >> >> > </a:id></a:prop><a:prop><mail:subject>Solve Hexadecimal Error by
> >> >> > Atul
> >> >> > Saxena
> >> >> > </mail:subject></a:prop><a:prop><mail:textdescription>Netaji Subhash
> >> >> > Palace</mail:textdescription></a:prop><a:prop><cal:location>Netaji
> >> >> > Subhash
> >> >> > Palace</cal:location></a:prop><a:prop><cal:dtstart>2007-09-27T03:30:00.000Z
> >> >> > </cal:dtstart></a:prop><a:prop><cal:dtend>2007-09-27T04:00:00.000Z
> >> >> > </cal:dtend><cal:instancetype
> >> >> > dt:dt="int">0</cal:instancetype></a:prop><a:prop><cal:busystatus>BUSY
> >> >> > </cal:busystatus></a:prop><a:prop><cal:meetingstatus>TENTATIVE
> >> >> > </cal:meetingstatus><cal:alldayevent
> >> >> > dt:dt="boolean">0</cal:alldayevent><cal:responserequested
> >> >> > dt:dt="boolean">1</cal:responserequested><cal:reminderoffset
> >> >> > dt:dt="int">900</cal:reminderoffset><m:to>ccrindiaadmin@ccrindia.com</m:to><mapi:finvited
> >> >> > dt:dt="boolean">1</mapi:finvited></a:prop></a:set></a:propertyupdate>
> >> >> >
> >> >> > 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:
> >> >> >
> >> >> > <?xml version="1.0"?><a:multistatus
> >> >> > xmlns:b="http://schemas.microsoft.com/exchange/"
> >> >> > xmlns:a="DAV:"><a:response><a:href>http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar</a:href><a:propstat><a:status>HTTP/1.1
> >> >> > 403
> >> >> > Forbidden</a:status><a:prop><a:id/></a:prop></a:propstat></a:response></a:multistatus>
> >> >> >
> >> >> > 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
> >> >> >
> >> >> >
> >> >>
> >> >>
> >>
> >>
>
>
date: Sun, 14 Oct 2007 21:47:00 -0700
author: Atul Saxena
Re: Showing Error: HTTP/1.1 403 (Forbidden)
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
news:F2DA17B2-558E-4545-83D2-032C027A3EBD@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 = "<?xml version='1.0' encoding='utf-8'?>" &
> _
> "<a:propertyupdate
> 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}/"">
> " & _
> "<a:set>" & _
> "<a:prop>" & _
>
> "<a:contentclass>urn:content-classes:appointment</a:contentclass>" & _
>
> "<e:outlookmessageclass>IPM.Appointment</e:outlookmessageclass>" & _
> "<f:0x23>" &
> IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(0)), "",
> oDataset.Tables(strTableName).Rows(iCtr).Item(0)) & "</f:0x23>" & _
> "<f:0x3>" &
> IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(0)), "",
> oDataset.Tables(strTableName).Rows(iCtr).Item(0)) & "</f:0x3>" & _
> "</a:prop>" & _
> "<a:prop>" & _
> "<mail:subject>" &
> IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(2)), "",
> oDataset.Tables(strTableName).Rows(iCtr).Item(2)) & " </mail:subject>" & _
> "</a:prop>" & _
> "<a:prop>" & _
>
> "<mail:textdescription>Netaji Subhash Palace</mail:textdescription>" & _
> "</a:prop>" & _
> "<a:prop>" & _
> "<cal:location>Netaji
> Subhash Palace</cal:location>" & _
> "</a:prop>" & _
> "<a:prop>" & _
> "<cal:dtstart>" &
> fnChangerDateLocalGMT(oDataset.Tables(strTableName).Rows(iCtr).Item(5)) &
> "
> </cal:dtstart>" & _
> "</a:prop>" & _
> "<a:prop>" & _
> "<cal:dtend>" &
> fnChangerDateLocalGMT(oDataset.Tables(strTableName).Rows(iCtr).Item(6)) &
> "
> </cal:dtend>" & _
> "<cal:instancetype
> dt:dt=""int"">0</cal:instancetype>" & _
> "</a:prop>" & _
> "<a:prop>" & _
> "<cal:busystatus>" &
> IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(7)), "",
> oDataset.Tables(strTableName).Rows(0).Item(7)) & " </cal:busystatus>" & _
> "</a:prop>" & _
> "<a:prop>" & _
> "<cal:meetingstatus>"
> & IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(8)), "",
> oDataset.Tables(strTableName).Rows(0).Item(8)) & " </cal:meetingstatus>" &
> _
> "<cal:alldayevent
> dt:dt=""boolean"">0</cal:alldayevent>" & _
>
> "<cal:responserequested dt:dt=""boolean"">1</cal:responserequested>" & _
> "<cal:reminderoffset
> dt:dt=""int"">900</cal:reminderoffset>" & _
> "<m:to>" &
> Me.UserNameAlias & "</m:to>" & _
> "<mapi:finvited
> dt:dt=""boolean"">1</mapi:finvited>" & _
> "</a:prop>" & _
> "</a:set>" & _
> "</a:propertyupdate>"
>
> '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 = "<?xml version='1.0' encoding = 'utf-8'?>"
> & _
> "<a:propertyupdate
> 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}/'> " & _
> "<a:set>" & _
> "<a:prop>" & _
> "<a:id>" &
> IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(0)), "",
> oDataset.Tables(strTableName).Rows(iCtr).Item(0)) & " </a:id>" & _
> "</a:prop>" & _
> "<a:prop>" & _
> "<a:href>" &
> IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(1)), "",
> oDataset.Tables(strTableName).Rows(iCtr).Item(1)) & " </a:href>" & _
> "</a:prop>" & _
> "<a:prop>" & _
> "<m:subject>" &
> IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(2)), "",
> oDataset.Tables(strTableName).Rows(iCtr).Item(2)) & " </m:subject>" & _
> "</a:prop>" & _
> "<a:prop>" & _
> "<g:textdescription>" &
> IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(3)), "",
> oDataset.Tables(strTableName).Rows(iCtr).Item(3)) & "
> </g:textdescription>" &
> _
> "</a:prop>" & _
> "</a:set>" & _
> "</a:propertyupdate>"
>
> ' 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
>> news:4FF63A04-93EA-482D-AC56-2936865E6F4F@microsoft.com...
>> > Hi Henning,
>> >
>> > Thanks for quick response. As I am creating desired ID by your
>> > specified
>> > namespace which code is mentioned below:
>> >
>> > <?xml version='1.0' encoding='utf-8'?><a:propertyupdate 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}/">
>> > <a:set><a:prop><a:contentclass>urn:content-classes:appointment</a:contentclass><e:outlookmessageclass>IPM.Appointment</e:outlookmessageclass><f:0x23>AQEAAAAAAEZ1AgAAAAAoCAkAAAAAA</f:0x23><f:0x3>AQEAAAAAAEZ1AgAAAAAoCAkAAAAA</f:0x3></a:prop><a:prop><mail:subject>No
>> > Appointment
>> > </mail:subject></a:prop><a:prop><mail:textdescription>Netaji
>> > Subhash
>> > Palace</mail:textdescription></a:prop><a:prop><cal:location>Netaji
>> > Subhash
>> > Palace</cal:location></a:prop><a:prop><cal:dtstart>2007-09-27T04:30:00.000Z
>> > </cal:dtstart></a:prop><a:prop><cal:dtend>2007-09-27T05:00:00.000Z
>> > </cal:dtend><cal:instancetype
>> > dt:dt="int">0</cal:instancetype></a:prop><a:prop><cal:busystatus>BUSY
>> > </cal:busystatus></a:prop><a:prop><cal:meetingstatus>TENTATIVE
>> > </cal:meetingstatus><cal:alldayevent
>> > dt:dt="boolean">0</cal:alldayevent><cal:responserequested
>> > dt:dt="boolean">1</cal:responserequested><cal:reminderoffset
>> > dt:dt="int">900</cal:reminderoffset><m:to>ccrindiaadmin@ccrindia.com</m:to><mapi:finvited
>> > dt:dt="boolean">1</mapi:finvited></a:prop></a:set></a:propertyupdate>
>> >
>> > This code is working fine and response of this is:
>> >
>> > <?xml version="1.0"?><a:multistatus
>> > 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:"><a:response><a:href>http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar/No%20Appointment.EML</a:href><a:propstat><a:status>HTTP/1.1
>> > 200
>> > OK</a:status><a:prop><a:contentclass/><b:outlookmessageclass/><c:0x23/><c:0x3/><d:subject/><d:textdescription/><e:location/><e:dtstart/><e:dtend/><e:instancetype/><e:busystatus/><e:meetingstatus/><e:alldayevent/><e:responserequested/><e:reminderoffset/><f:to/><g:finvited/></a:prop></a:propstat></a:response></a:multistatus>
>> >
>> > 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
>> >> news:FEB54591-180C-4A35-A35B-B2AC6EAEC05C@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
>> >> >> news:051D97A6-F35C-4715-849F-3074DA1686F0@microsoft.com...
>> >> >> > While creating an new appointment, I am getting Error: HTTP/1.1
>> >> >> > 403
>> >> >> > (Forbidden)
>> >> >> > error.
>> >> >> >
>> >> >> > My code is:
>> >> >> >
>> >> >> > <?xml version='1.0'?><a:propertyupdate 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:'>
>> >> >> > <a:set><a:prop><a:contentclass>urn:content-classes:appointment</a:contentclass><e:outlookmessageclass>IPM.Appointment</e:outlookmessageclass><a:id>AQEAAAAAAEZ1AgAAAAAoCAgAAAAA
>> >> >> > </a:id></a:prop><a:prop><mail:subject>Solve Hexadecimal Error by
>> >> >> > Atul
>> >> >> > Saxena
>> >> >> > </mail:subject></a:prop><a:prop><mail:textdescription>Netaji
>> >> >> > Subhash
>> >> >> > Palace</mail:textdescription></a:prop><a:prop><cal:location>Netaji
>> >> >> > Subhash
>> >> >> > Palace</cal:location></a:prop><a:prop><cal:dtstart>2007-09-27T03:30:00.000Z
>> >> >> > </cal:dtstart></a:prop><a:prop><cal:dtend>2007-09-27T04:00:00.000Z
>> >> >> > </cal:dtend><cal:instancetype
>> >> >> > dt:dt="int">0</cal:instancetype></a:prop><a:prop><cal:busystatus>BUSY
>> >> >> > </cal:busystatus></a:prop><a:prop><cal:meetingstatus>TENTATIVE
>> >> >> > </cal:meetingstatus><cal:alldayevent
>> >> >> > dt:dt="boolean">0</cal:alldayevent><cal:responserequested
>> >> >> > dt:dt="boolean">1</cal:responserequested><cal:reminderoffset
>> >> >> > dt:dt="int">900</cal:reminderoffset><m:to>ccrindiaadmin@ccrindia.com</m:to><mapi:finvited
>> >> >> > dt:dt="boolean">1</mapi:finvited></a:prop></a:set></a:propertyupdate>
>> >> >> >
>> >> >> > 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:
>> >> >> >
>> >> >> > <?xml version="1.0"?><a:multistatus
>> >> >> > xmlns:b="http://schemas.microsoft.com/exchange/"
>> >> >> > xmlns:a="DAV:"><a:response><a:href>http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar</a:href><a:propstat><a:status>HTTP/1.1
>> >> >> > 403
>> >> >> > Forbidden</a:status><a:prop><a:id/></a:prop></a:propstat></a:response></a:multistatus>
>> >> >> >
>> >> >> > 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
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >>
>> >>
>>
>>
date: Mon, 15 Oct 2007 17:46:30 +0200
author: Henning Krause [MVP - Exchange]
Re: Showing Error: HTTP/1.1 403 (Forbidden)
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
> news:F2DA17B2-558E-4545-83D2-032C027A3EBD@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 = "<?xml version='1.0' encoding='utf-8'?>" &
> > _
> > "<a:propertyupdate
> > 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}/"">
> > " & _
> > "<a:set>" & _
> > "<a:prop>" & _
> >
> > "<a:contentclass>urn:content-classes:appointment</a:contentclass>" & _
> >
> > "<e:outlookmessageclass>IPM.Appointment</e:outlookmessageclass>" & _
> > "<f:0x23>" &
> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(0)), "",
> > oDataset.Tables(strTableName).Rows(iCtr).Item(0)) & "</f:0x23>" & _
> > "<f:0x3>" &
> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(0)), "",
> > oDataset.Tables(strTableName).Rows(iCtr).Item(0)) & "</f:0x3>" & _
> > "</a:prop>" & _
> > "<a:prop>" & _
> > "<mail:subject>" &
> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(2)), "",
> > oDataset.Tables(strTableName).Rows(iCtr).Item(2)) & " </mail:subject>" & _
> > "</a:prop>" & _
> > "<a:prop>" & _
> >
> > "<mail:textdescription>Netaji Subhash Palace</mail:textdescription>" & _
> > "</a:prop>" & _
> > "<a:prop>" & _
> > "<cal:location>Netaji
> > Subhash Palace</cal:location>" & _
> > "</a:prop>" & _
> > "<a:prop>" & _
> > "<cal:dtstart>" &
> > fnChangerDateLocalGMT(oDataset.Tables(strTableName).Rows(iCtr).Item(5)) &
> > "
> > </cal:dtstart>" & _
> > "</a:prop>" & _
> > "<a:prop>" & _
> > "<cal:dtend>" &
> > fnChangerDateLocalGMT(oDataset.Tables(strTableName).Rows(iCtr).Item(6)) &
> > "
> > </cal:dtend>" & _
> > "<cal:instancetype
> > dt:dt=""int"">0</cal:instancetype>" & _
> > "</a:prop>" & _
> > "<a:prop>" & _
> > "<cal:busystatus>" &
> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(7)), "",
> > oDataset.Tables(strTableName).Rows(0).Item(7)) & " </cal:busystatus>" & _
> > "</a:prop>" & _
> > "<a:prop>" & _
> > "<cal:meetingstatus>"
> > & IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(8)), "",
> > oDataset.Tables(strTableName).Rows(0).Item(8)) & " </cal:meetingstatus>" &
> > _
> > "<cal:alldayevent
> > dt:dt=""boolean"">0</cal:alldayevent>" & _
> >
> > "<cal:responserequested dt:dt=""boolean"">1</cal:responserequested>" & _
> > "<cal:reminderoffset
> > dt:dt=""int"">900</cal:reminderoffset>" & _
> > "<m:to>" &
> > Me.UserNameAlias & "</m:to>" & _
> > "<mapi:finvited
> > dt:dt=""boolean"">1</mapi:finvited>" & _
> > "</a:prop>" & _
> > "</a:set>" & _
> > "</a:propertyupdate>"
> >
> > '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 = "<?xml version='1.0' encoding = 'utf-8'?>"
> > & _
> > "<a:propertyupdate
> > 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}/'> " & _
> > "<a:set>" & _
> > "<a:prop>" & _
> > "<a:id>" &
> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(0)), "",
> > oDataset.Tables(strTableName).Rows(iCtr).Item(0)) & " </a:id>" & _
> > "</a:prop>" & _
> > "<a:prop>" & _
> > "<a:href>" &
> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(1)), "",
> > oDataset.Tables(strTableName).Rows(iCtr).Item(1)) & " </a:href>" & _
> > "</a:prop>" & _
> > "<a:prop>" & _
> > "<m:subject>" &
> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(2)), "",
> > oDataset.Tables(strTableName).Rows(iCtr).Item(2)) & " </m:subject>" & _
> > "</a:prop>" & _
> > "<a:prop>" & _
> > "<g:textdescription>" &
> > IIf(IsDBNull(oDataset.Tables(strTableName).Rows(iCtr).Item(3)), "",
> > oDataset.Tables(strTableName).Rows(iCtr).Item(3)) & "
> > </g:textdescription>" &
> > _
> > "</a:prop>" & _
> > "</a:set>" & _
> > "</a:propertyupdate>"
> >
> > ' 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
> >> news:4FF63A04-93EA-482D-AC56-2936865E6F4F@microsoft.com...
> >> > Hi Henning,
> >> >
> >> > Thanks for quick response. As I am creating desired ID by your
> >> > specified
> >> > namespace which code is mentioned below:
> >> >
date: Mon, 15 Oct 2007 20:50:01 -0700
author: Atul Saxena
Re: Showing Error: HTTP/1.1 403 (Forbidden)
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
news:752D919F-330E-42C3-A2CE-4CFBA1CD30CA@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
>> news:F2DA17B2-558E-4545-83D2-032C027A3EBD@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 |