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: Wed, 7 Jun 2006 16:43:01 -0700,    group: microsoft.public.exchange.development        back       


Webdav method "PUT" does not work   
Can anyone tell me what I'm doing wrong because this code is not working?

I'm running SBS 2003 and ISA 2004.

<% @language="VBScript"%>
<%

    on error resume next

    strHTMLContent = "Testing send mail"
    
    Set objXMLPoster = CreateObject("MSXML2.XMLHTTP.3.0")

	strWebDavXMLRequest = ""
	strWebDavXMLRequest = strWebDavXMLRequest & "From: user1@test.com.br" & 
chr(13) & chr(10)
	strWebDavXMLRequest = strWebDavXMLRequest & "To: user2@test.com.br" & 
chr(13) & chr(10)
	strWebDavXMLRequest = strWebDavXMLRequest & "Subject: Teste" & chr(13) & 
chr(10)
        strWebDavXMLRequest = strWebDavXMLRequest & "Date: " & Now & chr(13) 
& chr(10)
	strWebDavXMLRequest = strWebDavXMLRequest & "X-Mailer: Syscorp" & chr(13) & 
chr(10)
	strWebDavXMLRequest = strWebDavXMLRequest & "MIME-Version: 1.0" & chr(13) & 
chr(10)
	strWebDavXMLRequest = strWebDavXMLRequest & "Content-Type: text/html;" & 
chr(13) & chr(10)
	strWebDavXMLRequest = strWebDavXMLRequest & "Charset = ""ISO-8859-1""" & 
chr(13) & chr(10)
	strWebDavXMLRequest = strWebDavXMLRequest & "Encoding = ""ISO-8859-1""" & 
chr(13) & chr(10)
	strWebDavXMLRequest = strWebDavXMLRequest & "Content-Transfer-Encoding: 
7bit" & chr(13) & chr(10) & chr(13) & chr(10)
	strWebDavXMLRequest = strWebDavXMLRequest & strHTMLContent

    objXMLPoster.open "PUT", "https://www.test.com.br/exchange/user1", 
False, "user1", "password"
    objXMLPoster.setRequestHeader "Content-Type", "message/rfc822"
    objXMLPoster.send strWebDavXMLRequest
        
    if err <> 0 then 
	response.write 
"**************************************************************"
	response.write "<BR>"
	response.write time() & ": [" & cstr(err.number) & "] " & err.description 
	response.write "<BR>"
	response.write objXMLPoster.responseText
	response.write "<BR>"
	response.write 
"**************************************************************"
	response.end
    end if


	response.write 
"**************************************************************"
	response.write "<BR>"
	response.write time() & ": " & cstr(objXMLPoster.Status)
	response.write "<BR>"
	response.write objXMLPoster.status
	response.write "<BR>"
	response.write 
"**************************************************************"

%>

Error message was "Cannot locate the resource" or something like that.

Last ISA error: SSL-tunnel - Failed connection attempt

Is there any problem with the code or an ISA misconfiguration?

Please help me!!!

Jorge
date: Wed, 7 Jun 2006 16:43:01 -0700   author:   Jorge Luis Ribeiro Jorge Luis

Re: Webdav method "PUT" does not work   
"Jorge Luis Ribeiro" <Jorge Luis Ribeiro@discussions.microsoft.com> wrote in 
message news:AF81A018-817F-4250-BBF1-5449DE46DAC6@microsoft.com...
> Can anyone tell me what I'm doing wrong because this code is not working?
>
> I'm running SBS 2003 and ISA 2004.
>
> <% @language="VBScript"%>
> <%
>
>    on error resume next
>
>    strHTMLContent = "Testing send mail"
>
>    Set objXMLPoster = CreateObject("MSXML2.XMLHTTP.3.0")

I'm not an ISA expert, but an IIS expert, and PUT, might be turned of. By 
Default IIS 6 allows only GET/POST/HEAD/TRACE so you need to add PUT to the 
allowed list.

See attached image
date: Thu, 8 Jun 2006 09:31:43 +0200   author:   Egbert Nierop \(MVP for IIS\) lid

Re: Webdav method "PUT" does not work   
I think the error may have been 409-Resource Conflict.  You have to supply 
the full URL to the item, not just the mailbox name.

https://www.test.com.br/exchange/user1/folder/message.eml/item.ext

or

https://www.test.com.br/exchange/user1/folder/item.ext

Lee.

-- 
___________________________________

Outlook Web Access for PDA and WAP:
www.leederbyshire.com
___________________________________

"Jorge Luis Ribeiro" <Jorge Luis Ribeiro@discussions.microsoft.com> wrote in 
message news:AF81A018-817F-4250-BBF1-5449DE46DAC6@microsoft.com...
> Can anyone tell me what I'm doing wrong because this code is not working?
>
> I'm running SBS 2003 and ISA 2004.
>
> <% @language="VBScript"%>
> <%
>
>    on error resume next
>
>    strHTMLContent = "Testing send mail"
>
>    Set objXMLPoster = CreateObject("MSXML2.XMLHTTP.3.0")
>
> strWebDavXMLRequest = ""
> strWebDavXMLRequest = strWebDavXMLRequest & "From: user1@test.com.br" &
> chr(13) & chr(10)
> strWebDavXMLRequest = strWebDavXMLRequest & "To: user2@test.com.br" &
> chr(13) & chr(10)
> strWebDavXMLRequest = strWebDavXMLRequest & "Subject: Teste" & chr(13) &
> chr(10)
>        strWebDavXMLRequest = strWebDavXMLRequest & "Date: " & Now & 
> chr(13)
> & chr(10)
> strWebDavXMLRequest = strWebDavXMLRequest & "X-Mailer: Syscorp" & chr(13) 
> &
> chr(10)
> strWebDavXMLRequest = strWebDavXMLRequest & "MIME-Version: 1.0" & chr(13) 
> &
> chr(10)
> strWebDavXMLRequest = strWebDavXMLRequest & "Content-Type: text/html;" &
> chr(13) & chr(10)
> strWebDavXMLRequest = strWebDavXMLRequest & "Charset = ""ISO-8859-1""" &
> chr(13) & chr(10)
> strWebDavXMLRequest = strWebDavXMLRequest & "Encoding = ""ISO-8859-1""" &
> chr(13) & chr(10)
> strWebDavXMLRequest = strWebDavXMLRequest & "Content-Transfer-Encoding:
> 7bit" & chr(13) & chr(10) & chr(13) & chr(10)
> strWebDavXMLRequest = strWebDavXMLRequest & strHTMLContent
>
>    objXMLPoster.open "PUT", "https://www.test.com.br/exchange/user1",
> False, "user1", "password"
>    objXMLPoster.setRequestHeader "Content-Type", "message/rfc822"
>    objXMLPoster.send strWebDavXMLRequest
>
>    if err <> 0 then
> response.write
> "**************************************************************"
> response.write "<BR>"
> response.write time() & ": [" & cstr(err.number) & "] " & err.description
> response.write "<BR>"
> response.write objXMLPoster.responseText
> response.write "<BR>"
> response.write
> "**************************************************************"
> response.end
>    end if
>
>
> response.write
> "**************************************************************"
> response.write "<BR>"
> response.write time() & ": " & cstr(objXMLPoster.Status)
> response.write "<BR>"
> response.write objXMLPoster.status
> response.write "<BR>"
> response.write
> "**************************************************************"
>
> %>
>
> Error message was "Cannot locate the resource" or something like that.
>
> Last ISA error: SSL-tunnel - Failed connection attempt
>
> Is there any problem with the code or an ISA misconfiguration?
>
> Please help me!!!
>
> Jorge
date: Thu, 8 Jun 2006 09:25:05 +0100   author:   Lee Derbyshire email a@t leederbyshire d.0.t c.0.m

Google
 
Web ureader.com


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