WebDAV 502 Bad Gateway
Exchange Server Forum Index Exchange Server
Discussion forums for Microsoft Exchange Server users.
Microsoft Outlook
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web ExchangeServerHelp.com
WebDAV 502 Bad Gateway

 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development
Author Message
bassegryn
Guest





Posted: Wed Jan 19, 2005 9:29 am    Post subject: WebDAV 502 Bad Gateway Reply with 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)

Back to top
Michael
Guest





Posted: Wed Jan 19, 2005 11:24 am    Post subject: Re: WebDAV 502 Bad Gateway Reply with quote

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)

Back to top
 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development All times are GMT
Page 1 of 1

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




Windows Server Dedicated Servers
Contact Us
New Topics Powered by phpBB