| Author |
Message |
Joey
Guest
|
Posted:
Fri Sep 09, 2005 4:59 pm Post subject:
Using WebDav is SLOW |
|
|
Here is my code. It is simple but seems to be real slow. It is vb.net and
when I query a mailbox with about 6000 emails in it it takes around 10
minutes to bring back the XML results. Can someone tell me how to speed this
up. I want to run my program every hour against several mailboxes to check
for new client emails. Is there a way to bring back just the message-ID in
the scheme instead of all of the email info? If I could do that then I could
just check the DB if the email has been checked by my program and go back and
read them one by one.
Code:
Dim req
Dim domback
req = CreateObject("Microsoft.XMLHTTP")
req.Open("PROPFIND", Me.txturl.Text, False)
req.setRequestHeader("Content-Type", "text/xml; charset=""UTF-8""")
req.setRequestHeader("Depth", "1")
req.Send("")
domback = req.ResponseXML
txtresponse.Text = req.ResponseText
Thanks!
|
|
| Back to top |
|
 |
Joey
Guest
|
Posted:
Fri Sep 09, 2005 10:45 pm Post subject:
Re: Using WebDav is SLOW |
|
|
Michael,
Thanks for the reply. I don't think the new mail search will work just
because if I check the mail before my program on the server reads it then it
won't come back as new mail. Do you have any links to examples of the Search
methods? I have found it difficult to find vb.net examples. I also need to
correct my last post. My code actually took 1.89 hours to return around 6000
emails. I need to filter the search to just the id of the message. The
first time I run the program on the server it will take a long time especaily
since none of the emails will be in my system but after that I should be able
to just grab new mail as it comes in.
Thanks again!
"Michael" wrote:
| Quote: | You have to use SEARCH method. That is very fast and you can create condition to return only "new mails".
Michael
-------------------------------
If you need WebDAV API for Exchange server,
use our component WebDAV .NET for Exchange.
Check out http://www.independentsoft.com
"Joey" <joey@newsgroup.nospam> wrote in message news:48F861EC-4B98-4513-9AC4-9A6950CB1045@microsoft.com...
Here is my code. It is simple but seems to be real slow. It is vb.net and
when I query a mailbox with about 6000 emails in it it takes around 10
minutes to bring back the XML results. Can someone tell me how to speed this
up. I want to run my program every hour against several mailboxes to check
for new client emails. Is there a way to bring back just the message-ID in
the scheme instead of all of the email info? If I could do that then I could
just check the DB if the email has been checked by my program and go back and
read them one by one.
Code:
Dim req
Dim domback
req = CreateObject("Microsoft.XMLHTTP")
req.Open("PROPFIND", Me.txturl.Text, False)
req.setRequestHeader("Content-Type", "text/xml; charset=""UTF-8""")
req.setRequestHeader("Depth", "1")
req.Send("")
domback = req.ResponseXML
txtresponse.Text = req.ResponseText
Thanks!
|
|
|
| Back to top |
|
 |
Joey
Guest
|
Posted:
Fri Sep 09, 2005 11:33 pm Post subject:
Re: Using WebDav is SLOW |
|
|
Ok,
Thanks Michael. I have already written some code which I can narrow the
search down to the message-id. I found an example here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wss/wss/_exch2k_searching_folders_http.asp
I think this will work and your right, I am going to log in the database the
last time a check for new email was performaned and do a search from that
point. Thanks again for your help. I asked this question a few months ago
and no one answered so maybe you know the answer. The post read like this:
When I query the inbox using webdav I get a list of
all the folders and all the emails under and in the inbox. I also get a
description field that has the body of the email in clear text for each
email. When I query the sent items folder I get a list of all the emails but
the description field is null. The only way I can get the description field
for items in the sent items is by querying the email it self. So for example:
http://server/exadmin/admin/server.com/mbx/username/inbox/ ; <-- gets all
emails and descriptions
http://server/exadmin/admin/server.com/mbx/username/sent items/ <-- gets
only emails but no descripition
http://server/exadmin/admin/server.com/mbx/username/sent items/message1.eml
<-- gets single email and description which should of showed up in the last
step like it does on the inbox.
Any idea?
"Michael" wrote:
| Quote: | Depends on your use-case you can identify email as “new” on two ways.
- You can search for all emails where “read” property is FALSE (unread mails).
When you process new mails that set “read” property to TRUE. Next time again search for all unread.
- Search for all mails arrived in last 1 hour, because you said that you will check mails every hour.
We tested these scenarios and both queries will return values in less then 5 seconds with mailbox like your
Michael
-------------------------------
If you need WebDAV API for Exchange server,
use our component WebDAV .NET for Exchange.
Check out http://www.independentsoft.com
"Joey" <joey@newsgroup.nospam> wrote in message news:D2286807-2768-4B7E-82C0-CD706F3D4D09@microsoft.com...
Michael,
Thanks for the reply. I don't think the new mail search will work just
because if I check the mail before my program on the server reads it then it
won't come back as new mail. Do you have any links to examples of the Search
methods? I have found it difficult to find vb.net examples. I also need to
correct my last post. My code actually took 1.89 hours to return around 6000
emails. I need to filter the search to just the id of the message. The
first time I run the program on the server it will take a long time especaily
since none of the emails will be in my system but after that I should be able
to just grab new mail as it comes in.
Thanks again!
"Michael" wrote:
You have to use SEARCH method. That is very fast and you can create condition to return only "new mails".
Michael
-------------------------------
If you need WebDAV API for Exchange server,
use our component WebDAV .NET for Exchange.
Check out http://www.independentsoft.com
"Joey" <joey@newsgroup.nospam> wrote in message news:48F861EC-4B98-4513-9AC4-9A6950CB1045@microsoft.com...
Here is my code. It is simple but seems to be real slow. It is vb.net and
when I query a mailbox with about 6000 emails in it it takes around 10
minutes to bring back the XML results. Can someone tell me how to speed this
up. I want to run my program every hour against several mailboxes to check
for new client emails. Is there a way to bring back just the message-ID in
the scheme instead of all of the email info? If I could do that then I could
just check the DB if the email has been checked by my program and go back and
read them one by one.
Code:
Dim req
Dim domback
req = CreateObject("Microsoft.XMLHTTP")
req.Open("PROPFIND", Me.txturl.Text, False)
req.setRequestHeader("Content-Type", "text/xml; charset=""UTF-8""")
req.setRequestHeader("Depth", "1")
req.Send("")
domback = req.ResponseXML
txtresponse.Text = req.ResponseText
Thanks!
|
|
|
| Back to top |
|
 |
Joey
Guest
|
Posted:
Sat Sep 10, 2005 12:43 am Post subject:
Re: Using WebDav is SLOW |
|
|
e:htmldescripiton
"Michael" wrote:
| Quote: | What are name and namespace of the description?
"Joey" <joey@newsgroup.nospam> wrote in message news:C7F22049-BB79-4058-8E17-A428A73762BF@microsoft.com...
Ok,
Thanks Michael. I have already written some code which I can narrow the
search down to the message-id. I found an example here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wss/wss/_exch2k_searching_folders_http.asp
I think this will work and your right, I am going to log in the database the
last time a check for new email was performaned and do a search from that
point. Thanks again for your help. I asked this question a few months ago
and no one answered so maybe you know the answer. The post read like this:
When I query the inbox using webdav I get a list of
all the folders and all the emails under and in the inbox. I also get a
description field that has the body of the email in clear text for each
email. When I query the sent items folder I get a list of all the emails but
the description field is null. The only way I can get the description field
for items in the sent items is by querying the email it self. So for example:
http://server/exadmin/admin/server.com/mbx/username/inbox/ ; <-- gets all
emails and descriptions
http://server/exadmin/admin/server.com/mbx/username/sent items/ <-- gets
only emails but no descripition
http://server/exadmin/admin/server.com/mbx/username/sent items/message1.eml
-- gets single email and description which should of showed up in the last
step like it does on the inbox.
Any idea?
"Michael" wrote:
Depends on your use-case you can identify email as “new” on two ways.
- You can search for all emails where “read” property is FALSE (unread mails).
When you process new mails that set “read” property to TRUE. Next time again search for all unread.
- Search for all mails arrived in last 1 hour, because you said that you will check mails every hour.
We tested these scenarios and both queries will return values in less then 5 seconds with mailbox like your
Michael
-------------------------------
If you need WebDAV API for Exchange server,
use our component WebDAV .NET for Exchange.
Check out http://www.independentsoft.com
"Joey" <joey@newsgroup.nospam> wrote in message news:D2286807-2768-4B7E-82C0-CD706F3D4D09@microsoft.com...
Michael,
Thanks for the reply. I don't think the new mail search will work just
because if I check the mail before my program on the server reads it then it
won't come back as new mail. Do you have any links to examples of the Search
methods? I have found it difficult to find vb.net examples. I also need to
correct my last post. My code actually took 1.89 hours to return around 6000
emails. I need to filter the search to just the id of the message. The
first time I run the program on the server it will take a long time especaily
since none of the emails will be in my system but after that I should be able
to just grab new mail as it comes in.
Thanks again!
"Michael" wrote:
You have to use SEARCH method. That is very fast and you can create condition to return only "new mails".
Michael
-------------------------------
If you need WebDAV API for Exchange server,
use our component WebDAV .NET for Exchange.
Check out http://www.independentsoft.com
"Joey" <joey@newsgroup.nospam> wrote in message news:48F861EC-4B98-4513-9AC4-9A6950CB1045@microsoft.com...
Here is my code. It is simple but seems to be real slow. It is vb.net and
when I query a mailbox with about 6000 emails in it it takes around 10
minutes to bring back the XML results. Can someone tell me how to speed this
up. I want to run my program every hour against several mailboxes to check
for new client emails. Is there a way to bring back just the message-ID in
the scheme instead of all of the email info? If I could do that then I could
just check the DB if the email has been checked by my program and go back and
read them one by one.
Code:
Dim req
Dim domback
req = CreateObject("Microsoft.XMLHTTP")
req.Open("PROPFIND", Me.txturl.Text, False)
req.setRequestHeader("Content-Type", "text/xml; charset=""UTF-8""")
req.setRequestHeader("Depth", "1")
req.Send("")
domback = req.ResponseXML
txtresponse.Text = req.ResponseText
Thanks!
|
|
|
| Back to top |
|
 |
Joey
Guest
|
Posted:
Sat Sep 10, 2005 12:51 am Post subject:
Re: Using WebDav is SLOW |
|
|
Also,
I am really having a hard time figuring this one out. I have this schema
which I can load using the PROPFIND method:
<?xml version="1.0" ?>
<a:multistatus xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/"
xmlns:e="urn:schemas:httpmail:"
xmlns:d="urn:schemas:mailheader:" xmlns:c="xml:"
xmlns:f="http://schemas.microsoft.com/exchange/"
xmlns:i="urn:schemas-microsoft-com:office:office"
xmlns:j="http://schemas.microsoft.com/repl/"
xmlns:g="urn:schemas:calendar:"
xmlns:h="urn:schemas-microsoft-com:exch-data:" xmlns:a="DAV:">
<a:response>
<a:href></a:href>
<a:propstat>
<a:prop>
<e:textdescription></e:textdescription>
<a:contentclass></a:contentclass>
<e:cc></e:cc>
<e:displayto></e:displayto>
<e:to></e:to>
<e:datereceived></e:datereceived>
<d:received></d:received>
<a:getetag></a:getetag>
<lockdiscovery xmlns="DAV:" />
<f:outlookmessageclass></f:outlookmessageclass>
<a:creationdate></a:creationdate>
<e:sendername></e:sendername>
<d:message-id></d:message-id>
<d:content-type></d:content-type>
<d:subject></d:subject>
<e:htmldescription></e:htmldescription>
<a:parentname></a:parentname>
<e:normalizedsubject></e:normalizedsubject>
<e:importance></e:importance>
<e:content-media-type></e:content-media-type>
<a:displayname></a:displayname>
<a:href></a:href>
<e:from></e:from>
<a:uid></a:uid>
<d:priority></d:priority>
<e:read></e:read>
</a:prop>
</a:propstat>
</a:response>
</a:multistatus>
Which gives me everything about the email. But when I use the search
function using this SQL string:
strQuery = "<?xml version=""1.0""?>" & _
"<D:searchrequest xmlns:D = ""DAV:"" >" & _
"<D:sql>SELECT ""DAV:displayname"" , ""DAV:href"" FROM """ &
strRootURI & """" & _
"WHERE ""DAV:ishidden"" = false AND ""DAV:isfolder"" = false" & _
"</D:sql></D:searchrequest>"
I can't fugure out how to include any of the other properties I have in my
scheme except for the a: DAV props in the SQL string.
What else do I have to include in my sql string? Or do I have to doa
search for the display name and then load the entire url for the email into
my propstat function to get all the properties?
Thanks again for all your help!
"Michael" wrote:
| Quote: | What are name and namespace of the description?
"Joey" <joey@newsgroup.nospam> wrote in message news:C7F22049-BB79-4058-8E17-A428A73762BF@microsoft.com...
Ok,
Thanks Michael. I have already written some code which I can narrow the
search down to the message-id. I found an example here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wss/wss/_exch2k_searching_folders_http.asp
I think this will work and your right, I am going to log in the database the
last time a check for new email was performaned and do a search from that
point. Thanks again for your help. I asked this question a few months ago
and no one answered so maybe you know the answer. The post read like this:
When I query the inbox using webdav I get a list of
all the folders and all the emails under and in the inbox. I also get a
description field that has the body of the email in clear text for each
email. When I query the sent items folder I get a list of all the emails but
the description field is null. The only way I can get the description field
for items in the sent items is by querying the email it self. So for example:
http://server/exadmin/admin/server.com/mbx/username/inbox/ ; <-- gets all
emails and descriptions
http://server/exadmin/admin/server.com/mbx/username/sent items/ <-- gets
only emails but no descripition
http://server/exadmin/admin/server.com/mbx/username/sent items/message1.eml
-- gets single email and description which should of showed up in the last
step like it does on the inbox.
Any idea?
"Michael" wrote:
Depends on your use-case you can identify email as “new” on two ways.
- You can search for all emails where “read” property is FALSE (unread mails).
When you process new mails that set “read” property to TRUE. Next time again search for all unread.
- Search for all mails arrived in last 1 hour, because you said that you will check mails every hour.
We tested these scenarios and both queries will return values in less then 5 seconds with mailbox like your
Michael
-------------------------------
If you need WebDAV API for Exchange server,
use our component WebDAV .NET for Exchange.
Check out http://www.independentsoft.com
"Joey" <joey@newsgroup.nospam> wrote in message news:D2286807-2768-4B7E-82C0-CD706F3D4D09@microsoft.com...
Michael,
Thanks for the reply. I don't think the new mail search will work just
because if I check the mail before my program on the server reads it then it
won't come back as new mail. Do you have any links to examples of the Search
methods? I have found it difficult to find vb.net examples. I also need to
correct my last post. My code actually took 1.89 hours to return around 6000
emails. I need to filter the search to just the id of the message. The
first time I run the program on the server it will take a long time especaily
since none of the emails will be in my system but after that I should be able
to just grab new mail as it comes in.
Thanks again!
"Michael" wrote:
You have to use SEARCH method. That is very fast and you can create condition to return only "new mails".
Michael
-------------------------------
If you need WebDAV API for Exchange server,
use our component WebDAV .NET for Exchange.
Check out http://www.independentsoft.com
"Joey" <joey@newsgroup.nospam> wrote in message news:48F861EC-4B98-4513-9AC4-9A6950CB1045@microsoft.com...
Here is my code. It is simple but seems to be real slow. It is vb.net and
when I query a mailbox with about 6000 emails in it it takes around 10
minutes to bring back the XML results. Can someone tell me how to speed this
up. I want to run my program every hour against several mailboxes to check
for new client emails. Is there a way to bring back just the message-ID in
the scheme instead of all of the email info? If I could do that then I could
just check the DB if the email has been checked by my program and go back and
read them one by one.
Code:
Dim req
Dim domback
req = CreateObject("Microsoft.XMLHTTP")
req.Open("PROPFIND", Me.txturl.Text, False)
req.setRequestHeader("Content-Type", "text/xml; charset=""UTF-8""")
req.setRequestHeader("Depth", "1")
req.Send("")
domback = req.ResponseXML
txtresponse.Text = req.ResponseText
Thanks!
|
|
|
| Back to top |
|
 |
Joey
Guest
|
Posted:
Sat Sep 10, 2005 12:58 am Post subject:
Re: Using WebDav is SLOW |
|
|
Ok, Thanks! I hate to keep doing this but as the day goes on one thing
after the next pops up. When I put urn:schemas:httpmail:cc in my connection
string it doubles all the emails that have a cc in them. All the other
paramanters seem to work fine. Do you know the format for this one?
d:received
Thank You
"Michael" wrote:
| Quote: | Use
SELECT ""DAV:displayname"" , ""DAV:href"", ""urn:schemas:httpmail:to"", .....
"Joey" <joey@newsgroup.nospam> wrote in message news:44F69C14-7166-4C06-AF5B-68BE40D82A04@microsoft.com...
Also,
I am really having a hard time figuring this one out. I have this schema
which I can load using the PROPFIND method:
?xml version="1.0" ?
a:multistatus xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/"
xmlns:e="urn:schemas:httpmail:"
xmlns:d="urn:schemas:mailheader:" xmlns:c="xml:"
xmlns:f="http://schemas.microsoft.com/exchange/"
xmlns:i="urn:schemas-microsoft-com:office:office"
xmlns:j="http://schemas.microsoft.com/repl/"
xmlns:g="urn:schemas:calendar:"
xmlns:h="urn:schemas-microsoft-com:exch-data:" xmlns:a="DAV:"
a:response
a:href></a:href
a:propstat
a:prop
e:textdescription></e:textdescription
a:contentclass></a:contentclass
e:cc></e:cc
e:displayto></e:displayto
e:to></e:to
e:datereceived></e:datereceived
d:received></d:received
a:getetag></a:getetag
lockdiscovery xmlns="DAV:" /
f:outlookmessageclass></f:outlookmessageclass
a:creationdate></a:creationdate
e:sendername></e:sendername
d:message-id></d:message-id
d:content-type></d:content-type
d:subject></d:subject
e:htmldescription></e:htmldescription
a:parentname></a:parentname
e:normalizedsubject></e:normalizedsubject
e:importance></e:importance
e:content-media-type></e:content-media-type
a:displayname></a:displayname
a:href></a:href
e:from></e:from
a:uid></a:uid
d:priority></d:priority
e:read></e:read
/a:prop
/a:propstat
/a:response
/a:multistatus
Which gives me everything about the email. But when I use the search
function using this SQL string:
strQuery = "<?xml version=""1.0""?>" & _
"<D:searchrequest xmlns:D = ""DAV:"" >" & _
"<D:sql>SELECT ""DAV:displayname"" , ""DAV:href"" FROM """ &
strRootURI & """" & _
"WHERE ""DAV:ishidden"" = false AND ""DAV:isfolder"" = false" & _
"</D:sql></D:searchrequest>"
I can't fugure out how to include any of the other properties I have in my
scheme except for the a: DAV props in the SQL string.
What else do I have to include in my sql string? Or do I have to doa
search for the display name and then load the entire url for the email into
my propstat function to get all the properties?
Thanks again for all your help!
"Michael" wrote:
What are name and namespace of the description?
"Joey" <joey@newsgroup.nospam> wrote in message news:C7F22049-BB79-4058-8E17-A428A73762BF@microsoft.com...
Ok,
Thanks Michael. I have already written some code which I can narrow the
search down to the message-id. I found an example here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wss/wss/_exch2k_searching_folders_http.asp
I think this will work and your right, I am going to log in the database the
last time a check for new email was performaned and do a search from that
point. Thanks again for your help. I asked this question a few months ago
and no one answered so maybe you know the answer. The post read like this:
When I query the inbox using webdav I get a list of
all the folders and all the emails under and in the inbox. I also get a
description field that has the body of the email in clear text for each
email. When I query the sent items folder I get a list of all the emails but
the description field is null. The only way I can get the description field
for items in the sent items is by querying the email it self. So for example:
http://server/exadmin/admin/server.com/mbx/username/inbox/ ; <-- gets all
emails and descriptions
http://server/exadmin/admin/server.com/mbx/username/sent items/ <-- gets
only emails but no descripition
http://server/exadmin/admin/server.com/mbx/username/sent items/message1.eml
-- gets single email and description which should of showed up in the last
step like it does on the inbox.
Any idea?
"Michael" wrote:
Depends on your use-case you can identify email as “new” on two ways.
- You can search for all emails where “read” property is FALSE (unread mails).
When you process new mails that set “read” property to TRUE. Next time again search for all unread.
- Search for all mails arrived in last 1 hour, because you said that you will check mails every hour.
We tested these scenarios and both queries will return values in less then 5 seconds with mailbox like your
Michael
-------------------------------
If you need WebDAV API for Exchange server,
use our component WebDAV .NET for Exchange.
Check out http://www.independentsoft.com
"Joey" <joey@newsgroup.nospam> wrote in message news:D2286807-2768-4B7E-82C0-CD706F3D4D09@microsoft.com...
Michael,
Thanks for the reply. I don't think the new mail search will work just
because if I check the mail before my program on the server reads it then it
won't come back as new mail. Do you have any links to examples of the Search
methods? I have found it difficult to find vb.net examples. I also need to
correct my last post. My code actually took 1.89 hours to return around 6000
emails. I need to filter the search to just the id of the message. The
first time I run the program on the server it will take a long time especaily
since none of the emails will be in my system but after that I should be able
to just grab new mail as it comes in.
Thanks again!
"Michael" wrote:
You have to use SEARCH method. That is very fast and you can create condition to return only "new mails".
Michael
-------------------------------
If you need WebDAV API for Exchange server,
use our component WebDAV .NET for Exchange.
Check out http://www.independentsoft.com
"Joey" <joey@newsgroup.nospam> wrote in message news:48F861EC-4B98-4513-9AC4-9A6950CB1045@microsoft.com...
Here is my code. It is simple but seems to be real slow. It is vb.net and
when I query a mailbox with about 6000 emails in it it takes around 10
minutes to bring back the XML results. Can someone tell me how to speed this
up. I want to run my program every hour against several mailboxes to check
for new client emails. Is there a way to bring back just the message-ID in
the scheme instead of all of the email info? If I could do that then I could
just check the DB if the email has been checked by my program and go back and
read them one by one.
Code:
Dim req
Dim domback
req = CreateObject("Microsoft.XMLHTTP")
req.Open("PROPFIND", Me.txturl.Text, False)
req.setRequestHeader("Content-Type", "text/xml; charset=""UTF-8""")
req.setRequestHeader("Depth", "1")
req.Send("")
domback = req.ResponseXML
txtresponse.Text = req.ResponseText
Thanks!
|
|
|
| Back to top |
|
 |
|
|
|
|