bassegryn
Guest
|
Posted:
Wed Jan 19, 2005 9:29 am Post subject:
WebDAV 502 Bad Gateway |
|
|
A service is monitoring emails arriving at a specific Exchange inbox. From
there each email should be moved to another destination. As long as the
destination is an existing Exchange folder everything is fine, but I need to
move each email to a very specific location outside Exchange (ie ordinary
disk files). But I can't seem to escape the 502.
As long as strTarget is internal to Exchange the following is working ok:
Function moveEmailToDest(ByVal strSource, ByVal strTarget)
Dim rc As Integer
rc = 0
Dim req As New MSXML2.XMLHTTP50
req.open("MOVE", strSource, False)
req.setRequestHeader("Content-type", "text/xml")
req.setRequestHeader("Allow-rename", "t")
req.setRequestHeader("Overwrite", "t")
req.setRequestHeader("Destination", strTarget)
Try
req.send("") 'fails with 0x800c0008 if dest-folder not exist
Console.WriteLine("moveEmailToDest(): Moving: " & vbCrLf &
"readyState:" & req.readyState & _
" status:" & req.status & " " & req.statusText)
Catch
Console.WriteLine("moveEmailToDest(): Error: " & req.status)
Console.WriteLine("moveEmailToDest(): Errortext: " &
req.statusText)
rc = req.status
Finally
req = Nothing
End Try
Return rc
End Function
strSource is the href value retrieved through a previous webdav request.
strTarget is the target (neither including or omitting file name is working)
Client: XP sp2
Server: w2k sp4
Exchange: 2k (v6.0 6249.4 sp3)
|
|
Michael
Guest
|
Posted:
Wed Jan 19, 2005 11:24 am Post subject:
Re: WebDAV 502 Bad Gateway |
|
|
You can move items only inside mailbox but not between mailbox and other
location (like public folder)
You can move items only inside same security context.
Michael
-------------------------------
If you need WebDAV API for Exchange server,
use our component WebDAV .NET for Exchange.
Check out http://www.independentsoft.com
"bassegryn" <bassegryn@discussions.microsoft.com> wrote in message
news:85A0F517-1E88-43A5-A13E-51BE78D4F79D@microsoft.com...
| Quote: | A service is monitoring emails arriving at a specific Exchange inbox. From
there each email should be moved to another destination. As long as the
destination is an existing Exchange folder everything is fine, but I need
to
move each email to a very specific location outside Exchange (ie ordinary
disk files). But I can't seem to escape the 502.
As long as strTarget is internal to Exchange the following is working ok:
Function moveEmailToDest(ByVal strSource, ByVal strTarget)
Dim rc As Integer
rc = 0
Dim req As New MSXML2.XMLHTTP50
req.open("MOVE", strSource, False)
req.setRequestHeader("Content-type", "text/xml")
req.setRequestHeader("Allow-rename", "t")
req.setRequestHeader("Overwrite", "t")
req.setRequestHeader("Destination", strTarget)
Try
req.send("") 'fails with 0x800c0008 if dest-folder not
exist
Console.WriteLine("moveEmailToDest(): Moving: " & vbCrLf &
"readyState:" & req.readyState & _
" status:" & req.status & " " & req.statusText)
Catch
Console.WriteLine("moveEmailToDest(): Error: " &
req.status)
Console.WriteLine("moveEmailToDest(): Errortext: " &
req.statusText)
rc = req.status
Finally
req = Nothing
End Try
Return rc
End Function
strSource is the href value retrieved through a previous webdav request.
strTarget is the target (neither including or omitting file name is
working)
Client: XP sp2
Server: w2k sp4
Exchange: 2k (v6.0 6249.4 sp3)
|
|
|