Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Exchange
2000.active.directory
2000.admin
2000.announcements
2000.app.conversion
2000.applications
2000.clients
2000.clustering
2000.connectivity
2000.development
2000.documentation
2000.general
2000.information.store
2000.interop
2000.kms
2000.misc
2000.protocols
2000.realtime.collabo.
2000.setup
2000.transport
2000.win2000
admin
application.conversion
applications
clients
clustering
connectivity
design
development
misc
mobility
setup
tools
  
 
date: 10 Oct 2005 16:39:32 -0700,    group: microsoft.public.exchange2000.development        back       


Error: 400 Bad Request when creating Exchange Task using WebDAV   
Hi - I'm trying to create a Task in an exchange mailbox using the
example in this post:

http://groups.google.com/group/microsoft.public.exchange2000.development/browse_thread/thread/64a5a05da1a5a49d/7d62aff92111f0be%237d62aff92111f0be?sa=X&oi=groupsr&start=1&num=3&auth=DQAAAGwAAACVYrY25NLcCeb2MXUwJ_1TeBLlMDD9MAfQt1kAlC9tkXG-FQ5LY459estHuFhmlq3disY2LfK0Y2KFjq3KWZvOMkJZ2b6nm46Jh_GkUWQ6f7JrkG7lXVWQ8p38TQDAWhTgWMenkq9QYb7n8apgWUSF


It's failing at the line:

PROPPATCHResponse = CType(PROPPATCHRequest.GetResponse(),
System.Net.HttpWebResponse)

Giving me the error message:
"The remote server returned an error: (400) Bad Request"


I'm able to successfully create Calendar Items using the msdn example
here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wss/wss/_esdk_creating_an_appointment_webdav.asp


so i don't think the error has to do with the way my exchange server is
setup..

Any ideas.


Thanks..
date: 10 Oct 2005 16:39:32 -0700   author:   unknown

Re: Error: 400 Bad Request when creating Exchange Task using WebDAV   
That code look okay except for

req.Headers.Add("Translate", "t")

should be

req.Headers.Add("Translate", "f")

And i would adjust "<h:0x8517 
b:dt=""dateTime.tz"">2004-11-04T13:30:00.00Z</h:0x8517>"
& _

to

"<h:0x00008517 b:dt=""dateTime.tz"">2004-11-04T13:30:00.00Z</h:0x00008517>"
& _

(more just so its consistent). It only take mugging one of those properties 
or dates for the code to fail with 400 Bad Request you might want to try 
posting the code your trying to use and someone maybe able to spot the 
error.

Cheers
Glen




 wrote in message 
news:1128987572.651360.13760@g14g2000cwa.googlegroups.com...
> Hi - I'm trying to create a Task in an exchange mailbox using the
> example in this post:
>
> http://groups.google.com/group/microsoft.public.exchange2000.development/browse_thread/thread/64a5a05da1a5a49d/7d62aff92111f0be%237d62aff92111f0be?sa=X&oi=groupsr&start=1&num=3&auth=DQAAAGwAAACVYrY25NLcCeb2MXUwJ_1TeBLlMDD9MAfQt1kAlC9tkXG-FQ5LY459estHuFhmlq3disY2LfK0Y2KFjq3KWZvOMkJZ2b6nm46Jh_GkUWQ6f7JrkG7lXVWQ8p38TQDAWhTgWMenkq9QYb7n8apgWUSF
>
>
> It's failing at the line:
>
> PROPPATCHResponse = CType(PROPPATCHRequest.GetResponse(),
> System.Net.HttpWebResponse)
>
> Giving me the error message:
> "The remote server returned an error: (400) Bad Request"
>
>
> I'm able to successfully create Calendar Items using the msdn example
> here:
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wss/wss/_esdk_creating_an_appointment_webdav.asp
>
>
> so i don't think the error has to do with the way my exchange server is
> setup..
>
> Any ideas.
>
>
> Thanks..
>
date: Tue, 11 Oct 2005 14:36:36 +1000   author:   Glen Scales [MVP]

Re: Error: 400 Bad Request when creating Exchange Task using WebDAV   
Hi -

Here is the code that I'm using:

It's VB .NET





Dim strExchSvrName As String
        Dim strMailbox As String
        Dim strTaskUri As String
        Dim strTaskItem As String
        Dim strDomain As String
        Dim strUserName As String
        Dim strPassword As String
        Dim strApptRequest As String
        Dim strMailInfo As String
        Dim strTaskInfo As String
        Dim strXMLNSInfo As String
        Dim strHeaderInfo As String
        Dim PROPPATCHRequest As HttpWebRequest
        Dim PROPPATCHResponse As WebResponse
        Dim MyCredentialCache As CredentialCache
        Dim bytes() As Byte
        Dim PROPPATCHRequestStream As System.IO.Stream

        Try
            ' Exchange server name
            strExchSvrName = "SACINF02"

            ' Mailbox folder name.
            strMailbox = Environment.UserName

            'Take out the Domain name from the Environment User Name

            strMailbox = Right(strMailbox, Len(strMailbox) -
InStr(strMailbox, "\"))
            ' Appointment item.
            'strTaskItem = TaskName & "Task.eml"
            strTaskItem = "testtask.eml"
            ' URI of the user's calendar folder.
            strTaskUri = "http://" & strExchSvrName & "/exchange/" & _
            strMailbox & "/tasks/"

            ' User name and password of appointment creator.
            strUserName = strMailbox
            strDomain = "SACRAMENTO"

            strPassword = thepassword


            ' XML namespace info for the WebDAV request.
            strXMLNSInfo = "xmlns:d=""DAV:""" & _
               "xmlns:e=""http://schemas.microsoft.com/exchange/"" " &
_

"xmlns:b=""urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/"" " & _
               "xmlns:f=""urn:schemas:mailheader:"" " & _
               "xmlns:g=""urn:schemas:httpmail:""" & _

"xmlns:h=""http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/"""

            ' Set the Task item properties.  The reminder time is set
in seconds.
            ' To create an all-day meeting, set the dtstart/dtend range
for 24 hours
            ' or more and set the alldayevent property to 1.  See the
documentation
            ' on the properties in the urn:schemas:calendar: namespace
for more information.

            '"<cal:dtstart
dt:dt=""dateTime.tz"">2004-05-18T23:00:00.000Z</cal:dtstart>" & _
            Start = Start.Replace("\", "-")
            Start = Start.Replace("/", "-")

            'strTaskInfo = "<h:0x00008104
dt:dt=\""dateTime.tz\"">2005-09-29T00:00:00Z</h:0x00008104>" & _
            '   "<h:0x00008105
dt:dt=\""dateTime.tz\"">2005-09-29T00:00:00Z</h:0x00008105>" & _
            '  "<h:0x0000811C dt:dt=\""boolean\"">0</h:0x0000811C>" & _
            ' "<h:0x00008101 dt:dt=\""int\"">0</h:0x00008101>" & _
            '"<h:0x00008102 dt:dt=\""float\"">0</h:0x00008102>" & _
            '"<i:0x00008503 dt:dt=\""boolean\"">1</i:0x00008503>"


            strTaskInfo = "<h:0x00008102
b:dt=""float"">.25</h:0x00008102>" & _
                              "<h:0x00008101
b:dt=""int"">1</h:0x00008101>" & _
                              "<h:0x00008517
b:dt=""dateTime.tz"">2005-10-10T13:30:00.00Z</h:0x00008517>"
            ' Set the required attendee of the appointment.
            'strHeaderInfo = "<header:to> & strMailBox & </header:to>"
            strHeaderInfo = ""
            ' Set the subject of the appointment.
            strMailInfo = "<f:subject>Test Task Subject </f:subject>" &
_
               "<g:textdescription>Test Task
Description</g:textdescription>"

            ' Build the XML body of the PROPPATCH request.
            strApptRequest = "<?xml version=""1.0""?>" & _
               "<d:propertyupdate " & strXMLNSInfo & ">" & _
               "<d:set><d:prop>" & _

"<d:contentclass>urn:content-classes:task</d:contentclass>" & _

"<e:outlookmessageclass>IPM.Task</e:outlookmessageclass>" & _
               strMailInfo & _
               strTaskInfo & _
               strHeaderInfo & _
               "</d:prop></d:set>" & _
               "</d:propertyupdate>"
               '"<mapi:finvited dt:dt=""boolean"">1</mapi:finvited>" &
_
            '"<mapi:apptstateflags
dt:dt=""int"">0</mapi:apptstateflags>" & _


            ' Create a new CredentialCache object and fill it with the
network
            ' credentials required to access the server.
            MyCredentialCache = New System.Net.CredentialCache
            MyCredentialCache.Add(New System.Uri(strTaskUri &
strTaskItem), "NTLM", New System.Net.NetworkCredential(strUserName,
strPassword, strDomain))

            ' Create the HttpWebRequest object.
            PROPPATCHRequest = HttpWebRequest.Create(strTaskUri &
strTaskItem)

            ' Add the network credentials to the request.
            PROPPATCHRequest.Credentials = MyCredentialCache

            ' Specify the PROPPATCH method.
            PROPPATCHRequest.Method = "PROPPATCH"
            PROPPATCHRequest.Headers.Add("Translate", "f")
            PROPPATCHRequest.ContentType = "text/xml"
            bytes = System.Text.Encoding.UTF8.GetBytes(strApptRequest)
            PROPPATCHRequest.ContentLength = bytes.Length
            PROPPATCHRequestStream =
PROPPATCHRequest.GetRequestStream()
            PROPPATCHRequestStream.Write(bytes, 0, bytes.Length)
            'PROPPATCHRequestStream.Close()


            Try
                ' Create the Task in the user's mailbox
                PROPPATCHResponse =
CType(PROPPATCHRequest.GetResponse(), System.Net.HttpWebResponse)
            Catch ex As Exception
                MsgBox(ex.ToString())

            End Try



            MsgBox("Task successfully created.")
            PROPPATCHResponse.Close()

        Catch ex As Exception
                ' Catch any exceptions. Any error codes from the
PROPPATCH
                ' or MOVE method requests on the server will be caught
                ' here, also.
                MsgBox(ex.Message)

            End Try
date: 11 Oct 2005 16:20:15 -0700   author:   unknown

Re: Error: 400 Bad Request when creating Exchange Task using WebDAV   
The two problems I see when I run this code is in your namespace declaration 
you haven't put any spaces between 2 of your declarations which will cause 
them to run together.

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

You need to add a space eg strXMLNSInfo = "xmlns:d=""DAV:"" " & _

and

"xmlns:g=""urn:schemas:httpmail:""" & _
"xmlns:h=""http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/"""

you need a space as well after "xmlns:g=""urn:schemas:httpmail:"" " & _

With those two fixes the proppatch works okay for me. A good way to pick up 
these type of problem is use something like Ethereal to do a packet capture 
of the actual request your sending to the Exchange box. This will let you 
see what the actually XML is that gets sent is.

Cheers
Glen


 wrote in message 
news:1129072815.409000.271090@o13g2000cwo.googlegroups.com...
> Hi -
>
> Here is the code that I'm using:
>
> It's VB .NET
>
>
>
>
>
> Dim strExchSvrName As String
>        Dim strMailbox As String
>        Dim strTaskUri As String
>        Dim strTaskItem As String
>        Dim strDomain As String
>        Dim strUserName As String
>        Dim strPassword As String
>        Dim strApptRequest As String
>        Dim strMailInfo As String
>        Dim strTaskInfo As String
>        Dim strXMLNSInfo As String
>        Dim strHeaderInfo As String
>        Dim PROPPATCHRequest As HttpWebRequest
>        Dim PROPPATCHResponse As WebResponse
>        Dim MyCredentialCache As CredentialCache
>        Dim bytes() As Byte
>        Dim PROPPATCHRequestStream As System.IO.Stream
>
>        Try
>            ' Exchange server name
>            strExchSvrName = "SACINF02"
>
>            ' Mailbox folder name.
>            strMailbox = Environment.UserName
>
>            'Take out the Domain name from the Environment User Name
>
>            strMailbox = Right(strMailbox, Len(strMailbox) -
> InStr(strMailbox, "\"))
>            ' Appointment item.
>            'strTaskItem = TaskName & "Task.eml"
>            strTaskItem = "testtask.eml"
>            ' URI of the user's calendar folder.
>            strTaskUri = "http://" & strExchSvrName & "/exchange/" & _
>            strMailbox & "/tasks/"
>
>            ' User name and password of appointment creator.
>            strUserName = strMailbox
>            strDomain = "SACRAMENTO"
>
>            strPassword = thepassword
>
>
>            ' XML namespace info for the WebDAV request.
>            strXMLNSInfo = "xmlns:d=""DAV:""" & _
>               "xmlns:e=""http://schemas.microsoft.com/exchange/"" " &
> _
>
> "xmlns:b=""urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/"" " & _
>               "xmlns:f=""urn:schemas:mailheader:"" " & _
>               "xmlns:g=""urn:schemas:httpmail:""" & _
>
> "xmlns:h=""http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/"""
>
>            ' Set the Task item properties.  The reminder time is set
> in seconds.
>            ' To create an all-day meeting, set the dtstart/dtend range
> for 24 hours
>            ' or more and set the alldayevent property to 1.  See the
> documentation
>            ' on the properties in the urn:schemas:calendar: namespace
> for more information.
>
>            '"<cal:dtstart
> dt:dt=""dateTime.tz"">2004-05-18T23:00:00.000Z</cal:dtstart>" & _
>            Start = Start.Replace("\", "-")
>            Start = Start.Replace("/", "-")
>
>            'strTaskInfo = "<h:0x00008104
> dt:dt=\""dateTime.tz\"">2005-09-29T00:00:00Z</h:0x00008104>" & _
>            '   "<h:0x00008105
> dt:dt=\""dateTime.tz\"">2005-09-29T00:00:00Z</h:0x00008105>" & _
>            '  "<h:0x0000811C dt:dt=\""boolean\"">0</h:0x0000811C>" & _
>            ' "<h:0x00008101 dt:dt=\""int\"">0</h:0x00008101>" & _
>            '"<h:0x00008102 dt:dt=\""float\"">0</h:0x00008102>" & _
>            '"<i:0x00008503 dt:dt=\""boolean\"">1</i:0x00008503>"
>
>
>            strTaskInfo = "<h:0x00008102
> b:dt=""float"">.25</h:0x00008102>" & _
>                              "<h:0x00008101
> b:dt=""int"">1</h:0x00008101>" & _
>                              "<h:0x00008517
> b:dt=""dateTime.tz"">2005-10-10T13:30:00.00Z</h:0x00008517>"
>            ' Set the required attendee of the appointment.
>            'strHeaderInfo = "<header:to> & strMailBox & </header:to>"
>            strHeaderInfo = ""
>            ' Set the subject of the appointment.
>            strMailInfo = "<f:subject>Test Task Subject </f:subject>" &
> _
>               "<g:textdescription>Test Task
> Description</g:textdescription>"
>
>            ' Build the XML body of the PROPPATCH request.
>            strApptRequest = "<?xml version=""1.0""?>" & _
>               "<d:propertyupdate " & strXMLNSInfo & ">" & _
>               "<d:set><d:prop>" & _
>
> "<d:contentclass>urn:content-classes:task</d:contentclass>" & _
>
> "<e:outlookmessageclass>IPM.Task</e:outlookmessageclass>" & _
>               strMailInfo & _
>               strTaskInfo & _
>               strHeaderInfo & _
>               "</d:prop></d:set>" & _
>               "</d:propertyupdate>"
>               '"<mapi:finvited dt:dt=""boolean"">1</mapi:finvited>" &
> _
>            '"<mapi:apptstateflags
> dt:dt=""int"">0</mapi:apptstateflags>" & _
>
>
>            ' Create a new CredentialCache object and fill it with the
> network
>            ' credentials required to access the server.
>            MyCredentialCache = New System.Net.CredentialCache
>            MyCredentialCache.Add(New System.Uri(strTaskUri &
> strTaskItem), "NTLM", New System.Net.NetworkCredential(strUserName,
> strPassword, strDomain))
>
>            ' Create the HttpWebRequest object.
>            PROPPATCHRequest = HttpWebRequest.Create(strTaskUri &
> strTaskItem)
>
>            ' Add the network credentials to the request.
>            PROPPATCHRequest.Credentials = MyCredentialCache
>
>            ' Specify the PROPPATCH method.
>            PROPPATCHRequest.Method = "PROPPATCH"
>            PROPPATCHRequest.Headers.Add("Translate", "f")
>            PROPPATCHRequest.ContentType = "text/xml"
>            bytes = System.Text.Encoding.UTF8.GetBytes(strApptRequest)
>            PROPPATCHRequest.ContentLength = bytes.Length
>            PROPPATCHRequestStream =
> PROPPATCHRequest.GetRequestStream()
>            PROPPATCHRequestStream.Write(bytes, 0, bytes.Length)
>            'PROPPATCHRequestStream.Close()
>
>
>            Try
>                ' Create the Task in the user's mailbox
>                PROPPATCHResponse =
> CType(PROPPATCHRequest.GetResponse(), System.Net.HttpWebResponse)
>            Catch ex As Exception
>                MsgBox(ex.ToString())
>
>            End Try
>
>
>
>            MsgBox("Task successfully created.")
>            PROPPATCHResponse.Close()
>
>        Catch ex As Exception
>                ' Catch any exceptions. Any error codes from the
> PROPPATCH
>                ' or MOVE method requests on the server will be caught
>                ' here, also.
>                MsgBox(ex.Message)
>
>            End Try
>
date: Wed, 12 Oct 2005 10:37:26 +1000   author:   Glen Scales [MVP]

Re: Error: 400 Bad Request when creating Exchange Task using WebDAV   
it worked! 


Thanks!
date: 12 Oct 2005 15:41:00 -0700   author:   unknown

Re: Error: 400 Bad Request when creating Exchange Task using WebDAV   
Hi Glen,
     Do you know how to set the Priority property of the Task Item that
you're creating.    What's the hexdecimal code for that.


Thanks.
date: 14 Oct 2005 12:47:18 -0700   author:   unknown

Re: Error: 400 Bad Request when creating Exchange Task using WebDAV   
You can use http://schemas.microsoft.com/exchange/x-priority-long  this is a 
integer datatype so low=0 normal=1 hight = 2 eg the following will set a 
task priority to high as long as you have namespace declaration for 
xmlns:e=""http://schemas.microsoft.com/exchange/"""xmlns:e="http://schemas.microsoft.com/exchange/"" 
"

<e:x-priority-long dt:dt=""int"">2</e:x-priority-long>

Cheers
Glen

 wrote in message 
news:1129319238.395595.147910@o13g2000cwo.googlegroups.com...
> Hi Glen,
>     Do you know how to set the Priority property of the Task Item that
> you're creating.    What's the hexdecimal code for that.
>
>
> Thanks.
>
date: Sat, 15 Oct 2005 08:41:15 +1000   author:   Glen Scales [MVP]

Re: Error: 400 Bad Request when creating Exchange Task using WebDAV   
Thanks.

Now - about the WebDAV DELETE method - I'm using the following code to
try and delete an appointment and it is crashing out with the error
message:  The remote server returned an error: (501): Not Implemented.
What does this mean - and how can i fix it?



Dim Request As System.Net.HttpWebRequest
        Dim Response As System.Net.HttpWebResponse
        Dim MyCredentialCache As System.Net.CredentialCache
        Dim strPassword As String
        Dim strDomain As String
        Dim strUserName As String
        Dim strSourceURI As String
        Dim strmailbox As String
        Dim exchServername As String

        strmailbox = Environment.UserName
        strmailbox = Right(strmailbox, Len(strmailbox) -
InStr(strmailbox, "\"))

        exchServername = "SACINF02"

        Try
            ' Initialize variables.
            strUserName = strmailbox
            strPassword = thepassword
            strDomain = "SACRAMENTO"
            strSourceURI = "http://" & exchServername & "/Calendar/" &
strmailbox & "/" & TaskName & "Appt.eml"

            ' Create a new CredentialCache object and fill it with the
network
            ' credentials required to access the server.
            MyCredentialCache = New System.Net.CredentialCache
            MyCredentialCache.Add(New System.Uri(strSourceURI), _
                "NTLM", _
                New System.Net.NetworkCredential(strUserName,
strPassword, strDomain) _
                )

            ' Create the HttpWebRequest object.
            Request = CType(System.Net.WebRequest.Create(strSourceURI),
_
                            System.Net.HttpWebRequest)

            ' Add the network credentials to the request.
            Request.Credentials = MyCredentialCache

            ' Specify the method.
            Request.Method = "DELETE"

            ' Send the DELETE method request and get the
            ' response from the server.
            Response = CType(Request.GetResponse(),
System.Net.HttpWebResponse)

            MsgBox("Appointment successfully deleted.")

            ' Clean up.
            Response.Close()

        Catch ex As Exception

            ' Catch any exceptions. Any error codes from the
            ' DELETE method requests on the server will be caught
            ' here, also.
            MsgBox(ex.Message)

        End Try



Thanks.
date: 17 Oct 2005 15:03:23 -0700   author:   unknown

Re: Error: 400 Bad Request when creating Exchange Task using WebDAV   
code looks okay but your source URL looks very wrong

        strSourceURI = "http://" & exchServername & "/Calendar/" &
strmailbox & "/" & TaskName & "Appt.eml"

Should be something like http://server/exchange/mailbox/folder/item.eml

Cheers
Glen

 wrote in message 
news:1129586598.230769.278170@z14g2000cwz.googlegroups.com...
> Thanks.
>
> Now - about the WebDAV DELETE method - I'm using the following code to
> try and delete an appointment and it is crashing out with the error
> message:  The remote server returned an error: (501): Not Implemented.
> What does this mean - and how can i fix it?
>
>
>
> Dim Request As System.Net.HttpWebRequest
>        Dim Response As System.Net.HttpWebResponse
>        Dim MyCredentialCache As System.Net.CredentialCache
>        Dim strPassword As String
>        Dim strDomain As String
>        Dim strUserName As String
>        Dim strSourceURI As String
>        Dim strmailbox As String
>        Dim exchServername As String
>
>        strmailbox = Environment.UserName
>        strmailbox = Right(strmailbox, Len(strmailbox) -
> InStr(strmailbox, "\"))
>
>        exchServername = "SACINF02"
>
>        Try
>            ' Initialize variables.
>            strUserName = strmailbox
>            strPassword = thepassword
>            strDomain = "SACRAMENTO"
>            strSourceURI = "http://" & exchServername & "/Calendar/" &
> strmailbox & "/" & TaskName & "Appt.eml"
>
>            ' Create a new CredentialCache object and fill it with the
> network
>            ' credentials required to access the server.
>            MyCredentialCache = New System.Net.CredentialCache
>            MyCredentialCache.Add(New System.Uri(strSourceURI), _
>                "NTLM", _
>                New System.Net.NetworkCredential(strUserName,
> strPassword, strDomain) _
>                )
>
>            ' Create the HttpWebRequest object.
>            Request = CType(System.Net.WebRequest.Create(strSourceURI),
> _
>                            System.Net.HttpWebRequest)
>
>            ' Add the network credentials to the request.
>            Request.Credentials = MyCredentialCache
>
>            ' Specify the method.
>            Request.Method = "DELETE"
>
>            ' Send the DELETE method request and get the
>            ' response from the server.
>            Response = CType(Request.GetResponse(),
> System.Net.HttpWebResponse)
>
>            MsgBox("Appointment successfully deleted.")
>
>            ' Clean up.
>            Response.Close()
>
>        Catch ex As Exception
>
>            ' Catch any exceptions. Any error codes from the
>            ' DELETE method requests on the server will be caught
>            ' here, also.
>            MsgBox(ex.Message)
>
>        End Try
>
>
>
> Thanks.
>
date: Tue, 18 Oct 2005 12:17:46 +1000   author:   Glen Scales [MVP]

Re: Error: 400 Bad Request when creating Exchange Task using WebDAV   
Yeah - I saw that.  I fixed it and it works now.....   Thanks.
date: 18 Oct 2005 12:31:38 -0700   author:   unknown

Re: Error: 400 Bad Request when creating Exchange Task using WebDAV   
Hey Glen -
Is there a way to bypass the password parameter in
System.Net.NetworkCredential - I've created an application where the
user will make a connection to another person's mailbox to create an
appointment and an exchange task in that person's mailbox - he/she does
not know the password of the person whose mailbox he/she will be
writing to ......
date: 28 Oct 2005 14:33:00 -0700   author:   unknown

Re: Error: 400 Bad Request when creating Exchange Task using WebDAV   
You should be able to use the logged on users credentials all you need to do 
is change one line eg

Request.Credentials = System.Net.CredentialCache.DefaultCredentials

Cheers
Glen

 wrote in message 
news:1130535180.686982.281370@o13g2000cwo.googlegroups.com...

> Hey Glen -
> Is there a way to bypass the password parameter in
> System.Net.NetworkCredential - I've created an application where the
> user will make a connection to another person's mailbox to create an
> appointment and an exchange task in that person's mailbox - he/she does
> not know the password of the person whose mailbox he/she will be
> writing to ......
>
date: Mon, 31 Oct 2005 11:13:24 +1100   author:   Glen Scales [MVP]

Re: Error: 400 Bad Request when creating Exchange Task using WebDAV   
What you just mentioned in your post lets me add a calendar appointment
to myself - how do I add a calendar appointment to someone else's
mailbox - I would have to make the HTTPWebRequest with that person's
credentials.....     but let's say i don't know the password of that
person ....  is there a workaround ...
date: 31 Oct 2005 14:15:02 -0800   author:   unknown

Re: Error: 400 Bad Request when creating Exchange Task using WebDAV   
there is one more thing -

If I try to create a lot of calendar appointments like in a while loop
- at some point, it gives me the error message - 'The underlying
connection was closed.  Unable to connect to the remote server.'
date: 31 Oct 2005 14:27:35 -0800   author:   unknown

Re: Error: 400 Bad Request when creating Exchange Task using WebDAV   
To add an appointment to a calendar requires that you have at least 
contributors rights to that calendar so the user context your code is 
running under needs to have the applicable rights for it to work 
succesfully. You need to remember if your running the code as an 
administrator then you will be denied access to any mailbox other then your 
own. see http://support.microsoft.com/?kbid=262054

Cheers
Glen
 wrote in message 
news:1130796902.627366.226630@o13g2000cwo.googlegroups.com...
> What you just mentioned in your post lets me add a calendar appointment
> to myself - how do I add a calendar appointment to someone else's
> mailbox - I would have to make the HTTPWebRequest with that person's
> credentials.....     but let's say i don't know the password of that
> person ....  is there a workaround ...
>
date: Tue, 1 Nov 2005 11:14:27 +1100   author:   Glen Scales [MVP]

Re: Error: 400 Bad Request when creating Exchange Task using WebDAV   
Is the server your running this on fully patched there used to be a 
Connection limit this has now been removed 
http://support.microsoft.com/?kbid=305619

Cheers
Glen

 wrote in message 
news:1130797655.460554.229000@g47g2000cwa.googlegroups.com...
> there is one more thing -
>
> If I try to create a lot of calendar appointments like in a while loop
> - at some point, it gives me the error message - 'The underlying
> connection was closed.  Unable to connect to the remote server.'
>
date: Tue, 1 Nov 2005 11:20:50 +1100   author:   Glen Scales [MVP]

Re: Error: 400 Bad Request when creating Exchange Task using WebDAV   
I figured out the connection error - I just had to set the keepalive
property of the httpwebrequest to False.
date: 1 Nov 2005 10:37:34 -0800   author:   unknown

Re: Error: 400 Bad Request when creating Exchange Task using WebDAV   
as far as adding appointment to another person's calendar - the account
who is adding the appointment does have rights to the other person's
mailbox folder in exchange - it however - still requires that person's
password - and that password will not be available if the other person
is not around - i'm trying to figure out if there is a way that the
appointment can be added without having to know the person's password
.....
date: 1 Nov 2005 10:52:46 -0800   author:   unknown

Re: Error: 400 Bad Request when creating Exchange Task using WebDAV   
another thing - is there a way to send invitations to someone for a
Task - like the way it is possible to do for an Appointment...
date: 1 Nov 2005 10:54:11 -0800   author:   unknown

Re: Error: 400 Bad Request when creating Exchange Task using WebDAV   
Task Requests are a lot more complicated then Meeting requests I wouldn't 
say that it was not possible just very hard if you search though the MAPI 
mailing list achieve at http://peach.ease.lsoft.com/archives/mapi-l.html for 
Task Request ,  Daniel Mitchell has posted some information on doing this in 
CDO 1.2

Cheers
Glen

 wrote in message 
news:1130871251.702799.303420@g14g2000cwa.googlegroups.com...
> another thing - is there a way to send invitations to someone for a
> Task - like the way it is possible to do for an Appointment...
>
date: Wed, 2 Nov 2005 11:33:00 +1100   author:   Glen Scales [MVP]

Re: Error: 400 Bad Request when creating Exchange Task using WebDAV   
You have lost me on this one that doesn't sound right to me and that's not 
my experience of using it.

Cheers
Glen

 wrote in message 
news:1130871166.076242.191280@g43g2000cwa.googlegroups.com...
> as far as adding appointment to another person's calendar - the account
> who is adding the appointment does have rights to the other person's
> mailbox folder in exchange - it however - still requires that person's
> password - and that password will not be available if the other person
> is not around - i'm trying to figure out if there is a way that the
> appointment can be added without having to know the person's password
> ....
>
date: Wed, 2 Nov 2005 11:36:49 +1100   author:   Glen Scales [MVP]

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us