473,396 Members | 2,102 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Access to internet with VB Express Edition

I'm new to VB.net and I want to upgrade an application from VB6 to
VB2005.
The VB6 application uses an invisible WebBrowser control to access some
pages and parse the content.
Is there a better way with VB2005?
Nothing wrong with the WebBrowser (besides the memory leaks), but since
I don't need to show any web page content I was wondering if there is a
ligher way.

Thanks,
Stefano

Jan 1 '07 #1
27 1611
I think that this page would help me, but I'm not able to find the
example.
How can I download the mentioned files?

Tosco wrote:
I'm new to VB.net and I want to upgrade an application from VB6 to
VB2005.
The VB6 application uses an invisible WebBrowser control to access some
pages and parse the content.
Is there a better way with VB2005?
Nothing wrong with the WebBrowser (besides the memory leaks), but since
I don't need to show any web page content I was wondering if there is a
ligher way.

Thanks,
Stefano
Jan 1 '07 #2

"Tosco" <st***********@gmail.comwrote in message
news:11**********************@a3g2000cwd.googlegro ups.com...
I think that this page would help me, but I'm not able to find the
example.
How can I download the mentioned files?

Tosco wrote:
I'm new to VB.net and I want to upgrade an application from VB6 to
VB2005.
The VB6 application uses an invisible WebBrowser control to access some
pages and parse the content.
Is there a better way with VB2005?
Nothing wrong with the WebBrowser (besides the memory leaks), but since
I don't need to show any web page content I was wondering if there is a
ligher way.

Thanks,
Stefano
--
<response type="generic" language="VB.Net">
This newsgroup is for users of Visual Basic version 6.0
and earlier and not the misleadingly named VB.Net
or VB 200x. Solutions, and often even the questions,
for one platform will be meaningless in the other.
When VB.Net was released Microsoft created new newsgroups
devoted to the new platform so that neither group of
developers need wade through the clutter of unrelated
topics. Look for newsgroups with the words "dotnet",
"framework", or "vsnet" in their name.

For the news.microsoft.com news server try these:

news://msnews.microsoft.com/
microsoft.public.dotnet.general
microsoft.public.dotnet.languages.vb
microsoft.public.dotnet.languages.vb.upgrade
microsoft.public.dotnet.languages.vb.controls
microsoft.public.dotnet.framework.windowsforms.con trols
microsoft.public.vsnet.general
microsoft.public.vstudio.general
microsoft.public.dotnet.framework.aspnet....
</response>
Jan 1 '07 #3
Ralph,

In VB6 and VB.Net 2002/2003 was the interop AXWebbrowser used.
In VB.Net 2005 is integrated the Net Class Webbrowser.

Be aware that it are still interops to Interenet Explorer. The webbrowser
class has a little bit less events as the AXWebbrowser, however it has more
properties to manipulate the document.

One problem I have is that you cannot do anymore download complete, however
Herfried has put in this newsgroup nice code to overcome that.

Cor

"Ralph" <nt*************@yahoo.comschreef in bericht
news:b9******************************@arkansas.net ...
>
"Tosco" <st***********@gmail.comwrote in message
news:11**********************@a3g2000cwd.googlegro ups.com...
>I think that this page would help me, but I'm not able to find the
example.
How can I download the mentioned files?

Tosco wrote:
I'm new to VB.net and I want to upgrade an application from VB6 to
VB2005.
The VB6 application uses an invisible WebBrowser control to access some
pages and parse the content.
Is there a better way with VB2005?
Nothing wrong with the WebBrowser (besides the memory leaks), but since
I don't need to show any web page content I was wondering if there is a
ligher way.

Thanks,
Stefano

--
<response type="generic" language="VB.Net">
This newsgroup is for users of Visual Basic version 6.0
and earlier and not the misleadingly named VB.Net
or VB 200x. Solutions, and often even the questions,
for one platform will be meaningless in the other.
When VB.Net was released Microsoft created new newsgroups
devoted to the new platform so that neither group of
developers need wade through the clutter of unrelated
topics. Look for newsgroups with the words "dotnet",
"framework", or "vsnet" in their name.

For the news.microsoft.com news server try these:

news://msnews.microsoft.com/
microsoft.public.dotnet.general
microsoft.public.dotnet.languages.vb
microsoft.public.dotnet.languages.vb.upgrade
microsoft.public.dotnet.languages.vb.controls
microsoft.public.dotnet.framework.windowsforms.con trols
microsoft.public.vsnet.general
microsoft.public.vstudio.general
microsoft.public.dotnet.framework.aspnet....
</response>


Jan 1 '07 #4

"Ralph" <nt*************@yahoo.comwrote in message
news:b9******************************@arkansas.net ...
>
"Tosco" <st***********@gmail.comwrote in message
news:11**********************@a3g2000cwd.googlegro ups.com...
>I think that this page would help me, but I'm not able to find the
example.
How can I download the mentioned files?

Tosco wrote:
I'm new to VB.net and I want to upgrade an application from VB6 to
VB2005.
The VB6 application uses an invisible WebBrowser control to access
some
pages and parse the content.
Is there a better way with VB2005?
Nothing wrong with the WebBrowser (besides the memory leaks), but
since
I don't need to show any web page content I was wondering if there
is a
ligher way.

Thanks,
Stefano

--
<response type="generic" language="VB.Net">
This newsgroup is for users of Visual Basic version 6.0
and earlier and not the misleadingly named VB.Net
or VB 200x. Solutions, and often even the questions,
for one platform will be meaningless in the other.
When VB.Net was released Microsoft created new newsgroups
devoted to the new platform so that neither group of
developers need wade through the clutter of unrelated
topics. Look for newsgroups with the words "dotnet",
"framework", or "vsnet" in their name.

For the news.microsoft.com news server try these:

news://msnews.microsoft.com/
microsoft.public.dotnet.general
microsoft.public.dotnet.languages.vb
microsoft.public.dotnet.languages.vb.upgrade
microsoft.public.dotnet.languages.vb.controls
microsoft.public.dotnet.framework.windowsforms.con trols
microsoft.public.vsnet.general
microsoft.public.vstudio.general
microsoft.public.dotnet.framework.aspnet....
</response>

Ralph -- he posted it to both groups -- both .Net and VB6andUnder.

Robin S.
Jan 1 '07 #5
I'm new to VB.net and I want to upgrade an application from VB6 to
VB2005.
The VB6 application uses an invisible WebBrowser control to access some
pages and parse the content.
Is there a better way with VB2005?

You can find a much lighter way here:
http://www.jsware.net/jsware/vbcode.php3#htp

It uses the Windows Winsock library wsock32 to
fetch via http on Win95 and up with no dependencies.
I have no idea whether it works on VB.Net. If you want a
specifically-VB.Net answer then don't post it to
a VB newsgroup.
Nothing wrong with the WebBrowser (besides the memory leaks), but since
I don't need to show any web page content I was wondering if there is a
ligher way.
If you're "upgrading" to VB.Net then why worry
about bloat and "memory leaks"? You're going
to be saddled with 70 MB of runtime being loaded.
You can't do that a "lighter way", so there's not
much point being concerned about relatively minor
sloppiness like loading a whole instance of IE just to
download a webpage.

Jan 1 '07 #6

"RobinS" <Ro****@NoSpam.yah.nonewrote in message
news:0s******************************@comcast.com. ..
Ralph -- he posted it to both groups -- both .Net and VB6andUnder.
Then the proper response would be "please do not crosspost to both .NET and
non-.NET newsgroups."
Jan 1 '07 #7

"Jeff Johnson" <i.***@enough.spamwrote in message
news:uv****************@TK2MSFTNGP04.phx.gbl...
>
"RobinS" <Ro****@NoSpam.yah.nonewrote in message
news:0s******************************@comcast.com. ..
>Ralph -- he posted it to both groups -- both .Net and VB6andUnder.

Then the proper response would be "please do not crosspost to both
.NET and non-.NET newsgroups."
Well, he was talking about moving something from VB6 to VB.Net, so
I could understand why he cross-posted it. He was probably hoping
that someone who had moved from VB6 to .Net could help, although
why he thinks they would be lurking in the VB6 newsgroup is a
mystery. At least he cross-posted it instead of multi-posting it.

Robin S.
Jan 1 '07 #8
"Cor Ligthert [MVP]" <no************@planet.nlschrieb:
In VB6 and VB.Net 2002/2003 was the interop AXWebbrowser used.
Well, as VB6 was actually COM-based, no "interop" was required ;-).
However, you are right, .NET 2.0 comes with a wrapper around the original
classes which simplifies its usage.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Jan 1 '07 #9

"mayayana" <ma**********@mindXXspring.comwrote in message
news:Fu*****************@newsread3.news.pas.earthl ink.net...
I'm new to VB.net and I want to upgrade an application from VB6 to
VB2005.
The VB6 application uses an invisible WebBrowser control to access some
pages and parse the content.
Is there a better way with VB2005?


You can find a much lighter way here:
http://www.jsware.net/jsware/vbcode.php3#htp

It uses the Windows Winsock library wsock32 to
fetch via http on Win95 and up with no dependencies.
I have no idea whether it works on VB.Net. If you want a
specifically-VB.Net answer then don't post it to
a VB newsgroup.
Nothing wrong with the WebBrowser (besides the memory leaks), but since
I don't need to show any web page content I was wondering if there is a
ligher way.

If you're "upgrading" to VB.Net then why worry
about bloat and "memory leaks"? You're going
to be saddled with 70 MB of runtime being loaded.
You can't do that a "lighter way", so there's not
much point being concerned about relatively minor
sloppiness like loading a whole instance of IE just to
download a webpage.
LOL

Jan 1 '07 #10
Robin,

I have tried to avoid these discussions by just removing the link to the
general vb newsgroup.

Maybe is the counterpart that Jeff and others cannot see my answer and the
addition on that from Herfried.

Therefore for those who thinks this question is still open. It is answered
for VB.Net.

Ralph had already given a message about the use of newsgroups, I saw no
reason to repeat that.

Cor
Jan 2 '07 #11
On 2007-01-01, Tosco <st***********@gmail.comwrote:
I'm new to VB.net and I want to upgrade an application from VB6 to
VB2005.
The VB6 application uses an invisible WebBrowser control to access some
pages and parse the content.
Is there a better way with VB2005?
Nothing wrong with the WebBrowser (besides the memory leaks), but since
I don't need to show any web page content I was wondering if there is a
ligher way.

I didn't see it mentioned (but I could be worng), but there most certainly is
a lighter way then using the WebBrowser control. Especially, since I believe
I saw further down the thread that these files were not going to be displayed.
The answer lies in System.Net.WebClient. There is an VB.NET example in the
help files for this class. If you need more specific help, please feel free
to post again.

--
Tom Shelton

Jan 2 '07 #12
Got it. Thanks for clarifying that for me, Cor.

Robin S.
-------------------
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:eU**************@TK2MSFTNGP02.phx.gbl...
Robin,

I have tried to avoid these discussions by just removing the link to
the general vb newsgroup.

Maybe is the counterpart that Jeff and others cannot see my answer and
the addition on that from Herfried.

Therefore for those who thinks this question is still open. It is
answered for VB.Net.

Ralph had already given a message about the use of newsgroups, I saw
no reason to repeat that.

Cor

Jan 2 '07 #13
Tom Shelton wrote:
On 2007-01-01, Tosco <st***********@gmail.comwrote:
>I'm new to VB.net and I want to upgrade an application from VB6 to
VB2005.
The VB6 application uses an invisible WebBrowser control to access some
pages and parse the content.
Is there a better way with VB2005?
Nothing wrong with the WebBrowser (besides the memory leaks), but since
I don't need to show any web page content I was wondering if there is a
ligher way.

I didn't see it mentioned (but I could be worng), but there most certainly is
a lighter way then using the WebBrowser control. Especially, since I believe
I saw further down the thread that these files were not going to be displayed.
The answer lies in System.Net.WebClient. There is an VB.NET example in the
help files for this class. If you need more specific help, please feel free
to post again.

But NOT to the NON-DOTNET newsgroups.

Bob
MS MVP, VB 2000-2006
--
Jan 3 '07 #14
On 2007-01-03, Bob O`Bob <fi*******@yahoogroups.comwrote:
Tom Shelton wrote:
>On 2007-01-01, Tosco <st***********@gmail.comwrote:
>>I'm new to VB.net and I want to upgrade an application from VB6 to
VB2005.
The VB6 application uses an invisible WebBrowser control to access some
pages and parse the content.
Is there a better way with VB2005?
Nothing wrong with the WebBrowser (besides the memory leaks), but since
I don't need to show any web page content I was wondering if there is a
ligher way.

I didn't see it mentioned (but I could be worng), but there most certainly is
a lighter way then using the WebBrowser control. Especially, since I believe
I saw further down the thread that these files were not going to be displayed.
The answer lies in System.Net.WebClient. There is an VB.NET example in the
help files for this class. If you need more specific help, please feel free
to post again.


But NOT to the NON-DOTNET newsgroups.
I apologize - I meant to set the followups to the .net group. I will try not
to let it happen again.

--
Tom Shelton
Jan 3 '07 #15
Tom,

Can you disconnect the Microsoft.public.dotnet.languages.vb group from this
kind of messages.

In my idea does this makes no sense now.

:-)))))))))))))))))))))))

Cor

"Tom Shelton" <to*********@comcastXXXXXXX.netschreef in bericht
news:nN******************************@comcast.com. ..
On 2007-01-03, Bob O`Bob <fi*******@yahoogroups.comwrote:
>Tom Shelton wrote:
>>On 2007-01-01, Tosco <st***********@gmail.comwrote:

I'm new to VB.net and I want to upgrade an application from VB6 to
VB2005.
The VB6 application uses an invisible WebBrowser control to access some
pages and parse the content.
Is there a better way with VB2005?
Nothing wrong with the WebBrowser (besides the memory leaks), but since
I don't need to show any web page content I was wondering if there is a
ligher way.


I didn't see it mentioned (but I could be worng), but there most
certainly is
a lighter way then using the WebBrowser control. Especially, since I
believe
I saw further down the thread that these files were not going to be
displayed.
The answer lies in System.Net.WebClient. There is an VB.NET example in
the
help files for this class. If you need more specific help, please feel
free
to post again.


But NOT to the NON-DOTNET newsgroups.

I apologize - I meant to set the followups to the .net group. I will try
not
to let it happen again.

--
Tom Shelton

Jan 3 '07 #16
On 2007-01-03, Cor Ligthert [MVP] <no************@planet.nlwrote:
Tom,

Can you disconnect the Microsoft.public.dotnet.languages.vb group from this
kind of messages.

In my idea does this makes no sense now.

:-)))))))))))))))))))))))
Cor,

I find this whole VB.CLASSIC vs. VB.NET war very tiresome. It has been going
on for years now - with the same old players on both sides. It's rediculous
to the extream. The OP was, IMHO, correct to post to both groups - his
question was about moving from VB6 to VB.NET. It is likely that people on
both sides of the VB fence would have some experience in that move - yet the
anti-dotnet group can't even read anything with the term VB.NET in it without
begining to froth at the mouth.

I realize that they have a few valid concerns - primarily with migrating
existing projects. But, most of their objections, are IMHO, plain silly.
For better or for worse, VB.CLASSIC is a dead product - and has been for years
now. It is time for some people to grow up and move on.

Anyway, sorry to vent. But this sort of bickering about a post that was,
IMHO, completly on topic and correctly cross-posted just takes away from the
spirt of the community.

--
Tom Shelton
Jan 3 '07 #17
Thankyou for the answer, I will try to use System.Net.WebClient, it
looks my solution.

I'm starting to use VB.Net because:
- I changed job and the new company doesn't have an old copy of VB6 and
wasn't able to buy a new copy, so now I can only use VB6 illegally;
- The memory leaks of the WebBrowser fatten up my old VB6 application,
and if it runs for hours it grows up to 2GB;
- I want to learn one language of the future (I should say present, I
know I'm late);
- I want to use some features not available in VB6 (without APIs) like
multi-thread applications, etc.

I apologize for bothering some sensitive souls, I shall not repeat.

Ciao,
Stefano

Tom Shelton wrote:
On 2007-01-03, Cor Ligthert [MVP] <no************@planet.nlwrote:
Tom,

Can you disconnect the Microsoft.public.dotnet.languages.vb group from this
kind of messages.

In my idea does this makes no sense now.

:-)))))))))))))))))))))))

Cor,

I find this whole VB.CLASSIC vs. VB.NET war very tiresome. It has been going
on for years now - with the same old players on both sides. It's rediculous
to the extream. The OP was, IMHO, correct to post to both groups - his
question was about moving from VB6 to VB.NET. It is likely that people on
both sides of the VB fence would have some experience in that move - yet the
anti-dotnet group can't even read anything with the term VB.NET in it without
begining to froth at the mouth.

I realize that they have a few valid concerns - primarily with migrating
existing projects. But, most of their objections, are IMHO, plain silly.
For better or for worse, VB.CLASSIC is a dead product - and has been for years
now. It is time for some people to grow up and move on.

Anyway, sorry to vent. But this sort of bickering about a post that was,
IMHO, completly on topic and correctly cross-posted just takes away from the
spirt of the community.

--
Tom Shelton
Jan 3 '07 #18
If you're new to VB2005, check out Tim Patrick's book, "Start-to-Finish
VB2005". It has a lot of neat stuff in it, and explains things pretty
well.

Another good book is Francesco Balena's "VB2005: The Language". It only
covers the language, not forms or data, though. But it has info about
Multi-threading and Reflection and some of the more advanced topics.

Robin S.
------------------------------
"Tosco" <st***********@gmail.comwrote in message
news:11**********************@h40g2000cwb.googlegr oups.com...
Thankyou for the answer, I will try to use System.Net.WebClient, it
looks my solution.

I'm starting to use VB.Net because:
- I changed job and the new company doesn't have an old copy of VB6
and
wasn't able to buy a new copy, so now I can only use VB6 illegally;
- The memory leaks of the WebBrowser fatten up my old VB6 application,
and if it runs for hours it grows up to 2GB;
- I want to learn one language of the future (I should say present, I
know I'm late);
- I want to use some features not available in VB6 (without APIs) like
multi-thread applications, etc.

I apologize for bothering some sensitive souls, I shall not repeat.

Ciao,
Stefano

Tom Shelton wrote:
>On 2007-01-03, Cor Ligthert [MVP] <no************@planet.nlwrote:
Tom,

Can you disconnect the Microsoft.public.dotnet.languages.vb group
from this
kind of messages.

In my idea does this makes no sense now.

:-)))))))))))))))))))))))

Cor,

I find this whole VB.CLASSIC vs. VB.NET war very tiresome. It has
been going
on for years now - with the same old players on both sides. It's
rediculous
to the extream. The OP was, IMHO, correct to post to both groups -
his
question was about moving from VB6 to VB.NET. It is likely that
people on
both sides of the VB fence would have some experience in that move -
yet the
anti-dotnet group can't even read anything with the term VB.NET in it
without
begining to froth at the mouth.

I realize that they have a few valid concerns - primarily with
migrating
existing projects. But, most of their objections, are IMHO, plain
silly.
For better or for worse, VB.CLASSIC is a dead product - and has been
for years
now. It is time for some people to grow up and move on.

Anyway, sorry to vent. But this sort of bickering about a post that
was,
IMHO, completly on topic and correctly cross-posted just takes away
from the
spirt of the community.

--
Tom Shelton

Jan 3 '07 #19
Tom,

Are you writting this as reply to me. Tom it seems that I write not enough
in these newsgroups.

Otherwise you would see me smile if I see this kind of childness which we
have seldom in the dotNet newsgroups.

Cor

"Tom Shelton" <to*********@comcastXXXXXXX.netschreef in bericht
news:QP******************************@comcast.com. ..
On 2007-01-03, Cor Ligthert [MVP] <no************@planet.nlwrote:
>Tom,

Can you disconnect the Microsoft.public.dotnet.languages.vb group from
this
kind of messages.

In my idea does this makes no sense now.

:-)))))))))))))))))))))))

Cor,

I find this whole VB.CLASSIC vs. VB.NET war very tiresome. It has been
going
on for years now - with the same old players on both sides. It's
rediculous
to the extream. The OP was, IMHO, correct to post to both groups - his
question was about moving from VB6 to VB.NET. It is likely that people on
both sides of the VB fence would have some experience in that move - yet
the
anti-dotnet group can't even read anything with the term VB.NET in it
without
begining to froth at the mouth.

I realize that they have a few valid concerns - primarily with migrating
existing projects. But, most of their objections, are IMHO, plain silly.
For better or for worse, VB.CLASSIC is a dead product - and has been for
years
now. It is time for some people to grow up and move on.

Anyway, sorry to vent. But this sort of bickering about a post that was,
IMHO, completly on topic and correctly cross-posted just takes away from
the
spirt of the community.

--
Tom Shelton

Jan 3 '07 #20
doh,

This is not a personal attack to you, it can be read that way I see know, of
course I agree with your message completely.

Cor
"Cor Ligthert [MVP]" <no************@planet.nlschreef in bericht
news:eM**************@TK2MSFTNGP06.phx.gbl...
Tom,

Are you writting this as reply to me. Tom it seems that I write not enough
in these newsgroups.

Otherwise you would see me smile if I see this kind of childness which we
have seldom in the dotNet newsgroups.

Cor

"Tom Shelton" <to*********@comcastXXXXXXX.netschreef in bericht
news:QP******************************@comcast.com. ..
>On 2007-01-03, Cor Ligthert [MVP] <no************@planet.nlwrote:
>>Tom,

Can you disconnect the Microsoft.public.dotnet.languages.vb group from
this
kind of messages.

In my idea does this makes no sense now.

:-)))))))))))))))))))))))

Cor,

I find this whole VB.CLASSIC vs. VB.NET war very tiresome. It has been
going
on for years now - with the same old players on both sides. It's
rediculous
to the extream. The OP was, IMHO, correct to post to both groups - his
question was about moving from VB6 to VB.NET. It is likely that people
on
both sides of the VB fence would have some experience in that move - yet
the
anti-dotnet group can't even read anything with the term VB.NET in it
without
begining to froth at the mouth.

I realize that they have a few valid concerns - primarily with migrating
existing projects. But, most of their objections, are IMHO, plain silly.
For better or for worse, VB.CLASSIC is a dead product - and has been for
years
now. It is time for some people to grow up and move on.

Anyway, sorry to vent. But this sort of bickering about a post that was,
IMHO, completly on topic and correctly cross-posted just takes away from
the
spirt of the community.

--
Tom Shelton


Jan 3 '07 #21
vb.net is NOT the language of the future.

Learn C# or C++ or Java or PHP.

VB is for lepers and retards; MS killed the language a LONG time ago

-Aaron
Tosco wrote:
Thankyou for the answer, I will try to use System.Net.WebClient, it
looks my solution.

I'm starting to use VB.Net because:
- I changed job and the new company doesn't have an old copy of VB6 and
wasn't able to buy a new copy, so now I can only use VB6 illegally;
- The memory leaks of the WebBrowser fatten up my old VB6 application,
and if it runs for hours it grows up to 2GB;
- I want to learn one language of the future (I should say present, I
know I'm late);
- I want to use some features not available in VB6 (without APIs) like
multi-thread applications, etc.

I apologize for bothering some sensitive souls, I shall not repeat.

Ciao,
Stefano

Tom Shelton wrote:
On 2007-01-03, Cor Ligthert [MVP] <no************@planet.nlwrote:
Tom,
>
Can you disconnect the Microsoft.public.dotnet.languages.vb group from this
kind of messages.
>
In my idea does this makes no sense now.
>
>:-)))))))))))))))))))))))
Cor,

I find this whole VB.CLASSIC vs. VB.NET war very tiresome. It has been going
on for years now - with the same old players on both sides. It's rediculous
to the extream. The OP was, IMHO, correct to post to both groups - his
question was about moving from VB6 to VB.NET. It is likely that people on
both sides of the VB fence would have some experience in that move - yet the
anti-dotnet group can't even read anything with the term VB.NET in it without
begining to froth at the mouth.

I realize that they have a few valid concerns - primarily with migrating
existing projects. But, most of their objections, are IMHO, plain silly.
For better or for worse, VB.CLASSIC is a dead product - and has been for years
now. It is time for some people to grow up and move on.

Anyway, sorry to vent. But this sort of bickering about a post that was,
IMHO, completly on topic and correctly cross-posted just takes away from the
spirt of the community.

--
Tom Shelton
Jan 3 '07 #22
On 2007-01-03, Tosco <st***********@gmail.comwrote:
Thankyou for the answer, I will try to use System.Net.WebClient, it
looks my solution.
Your welcome.

--
Tom Shelton
Jan 4 '07 #23
On 2007-01-03, Cor Ligthert [MVP] <no************@planet.nlwrote:
Tom,

Are you writting this as reply to me. Tom it seems that I write not enough
in these newsgroups.

Otherwise you would see me smile if I see this kind of childness which we
have seldom in the dotNet newsgroups.

Cor
Cor - while in response to your post, it is in no means aimed at you
personally. It is simply venting. I apologize if it came across as an attack
on you.

--
Tom Shelton
Jan 4 '07 #24
Tom, I don't have any prbolem downloading text or files with the
WebClient when no authentication is required, but when a page requires
authentication it doesn't work.

The old application was just navigating to the URL
"http://www.xyz.com/login.jsp?LoginUsername=name&LoginPassword=pwd"
once, and the session remained alive.

But if I do
WebClient.DownloadString("http://www.xyz.com/login.jsp?LoginUsername=name&LoginPassword=pwd")
I get the page asking me if I forgot the password.

I tried to play with the WebClient.Credentials, but I failed.

Do you understand why?

Thanks,
Stefano

Jan 7 '07 #25
On 2007-01-07, Tosco <st***********@gmail.comwrote:
Tom, I don't have any prbolem downloading text or files with the
WebClient when no authentication is required, but when a page requires
authentication it doesn't work.

The old application was just navigating to the URL
"http://www.xyz.com/login.jsp?LoginUsername=name&LoginPassword=pwd"
once, and the session remained alive.

But if I do
WebClient.DownloadString("http://www.xyz.com/login.jsp?LoginUsername=name&LoginPassword=pwd")
I get the page asking me if I forgot the password.

I tried to play with the WebClient.Credentials, but I failed.

Do you understand why?

Thanks,
Stefano
Can you show your code using the credentials property? I think that should
look something like:

Dim theWebClient As New WebClient
theWebClient.Credentials = New NetworkCredentials (username, password, server)

....

Anyway - post some code, and maybe we can work this out... (obviously, don't
post any sensitive information :)

--
Tom Shelton
Jan 8 '07 #26
Tom, this is an example of code to test the sign in in ebay.com.
Create a form with one WebBrowser and two TextBoxes and paste the code
in the form class. If you have an ebay account you can use your user
name and password to test it.
The function TestWebClient() doesn't work.
The function TestWebBrowser() works, but I would like not to use the
WebBrowser object.

Public Class ebay
Dim UserName As String = "xxx"
Dim Password As String = "yyy"
Dim Server As String = "http://my.ebay.com"
Dim TestPage As String = "http://my.ebay.com/ws/eBayISAPI.dll?MyeBay"

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Me.Show()
TestWebClient()
TestWebBrowser()
End Sub

Sub TestWebClient()
Dim Client1 As New Net.WebClient
TextBox1.Text = Client1.DownloadString(TestPage)
Client1.Credentials = New Net.NetworkCredential(UserName, Password,
Server)
TextBox2.Text = Client1.DownloadString(TestPage)
MsgBox(TextBox1.Text.Contains("Sign out") & " - " &
TextBox2.Text.Contains("Sign out"))
End Sub

Sub TestWebBrowser()
Static n As Int16
n = n + 1

Select Case n
Case 1
WebBrowser1.Navigate(TestPage)

Case 2
TextBox1.Text = WebBrowser1.Document.Body.InnerText

WebBrowser1.Navigate("https://signin.ebay.com/ws/eBayISAPI.dll?MfcISAPICommand=SignInWelcome&siteid =0&co_partnerId=2&UsingSSL=1&ru=&pp=&pa1=&pa2=&pa3 =&i1=-1&pageType=-1&userid="
& UserName & "&pass=" & Password)

Case 3
WebBrowser1.Navigate(TestPage)

Case 4
TextBox2.Text = WebBrowser1.Document.Body.InnerText
MsgBox(TextBox1.Text.Contains("Sign out") & " - " &
TextBox2.Text.Contains("Sign out"))
End Select
End Sub

Private Sub WebBrowser1_DocumentCompleted(ByVal sender As Object,
ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEv entArgs)
Handles WebBrowser1.DocumentCompleted
TestWebBrowser()
End Sub
End Class
Tom Shelton wrote:
On 2007-01-07, Tosco <st***********@gmail.comwrote:
Tom, I don't have any prbolem downloading text or files with the
WebClient when no authentication is required, but when a page requires
authentication it doesn't work.

The old application was just navigating to the URL
"http://www.xyz.com/login.jsp?LoginUsername=name&LoginPassword=pwd"
once, and the session remained alive.

But if I do
WebClient.DownloadString("http://www.xyz.com/login.jsp?LoginUsername=name&LoginPassword=pwd")
I get the page asking me if I forgot the password.

I tried to play with the WebClient.Credentials, but I failed.

Do you understand why?

Thanks,
Stefano

Can you show your code using the credentials property? I think that should
look something like:

Dim theWebClient As New WebClient
theWebClient.Credentials = New NetworkCredentials (username, password, server)

...

Anyway - post some code, and maybe we can work this out... (obviously, don't
post any sensitive information :)

--
Tom Shelton
Jan 22 '07 #27
Mmmh... the navigate line seems to be too long for the post, I'm going
to split it in 5 shorter lines:

WebBrowser1.Navigate("https://signin.ebay.com/ws/
eBayISAPI.dll?MfcISAPICommand=SignInWelcome&
siteid=0&co_partnerId=2&UsingSSL=1&ru=&pp=&
pa1=&pa2=&pa3=&i1=-1&pageType=-1&userid=" &
UserName & "&pass=" & Password)

Thanks,
Stefano

Tosco wrote:
Tom, this is an example of code to test the sign in in ebay.com.
Create a form with one WebBrowser and two TextBoxes and paste the code
in the form class. If you have an ebay account you can use your user
name and password to test it.
The function TestWebClient() doesn't work.
The function TestWebBrowser() works, but I would like not to use the
WebBrowser object.

Public Class ebay
Dim UserName As String = "xxx"
Dim Password As String = "yyy"
Dim Server As String = "http://my.ebay.com"
Dim TestPage As String = "http://my.ebay.com/ws/eBayISAPI.dll?MyeBay"

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Me.Show()
TestWebClient()
TestWebBrowser()
End Sub

Sub TestWebClient()
Dim Client1 As New Net.WebClient
TextBox1.Text = Client1.DownloadString(TestPage)
Client1.Credentials = New Net.NetworkCredential(UserName, Password,
Server)
TextBox2.Text = Client1.DownloadString(TestPage)
MsgBox(TextBox1.Text.Contains("Sign out") & " - " &
TextBox2.Text.Contains("Sign out"))
End Sub

Sub TestWebBrowser()
Static n As Int16
n = n + 1

Select Case n
Case 1
WebBrowser1.Navigate(TestPage)

Case 2
TextBox1.Text = WebBrowser1.Document.Body.InnerText

WebBrowser1.Navigate("https://signin.ebay.com/ws/eBayISAPI.dll?MfcISAPICommand=SignInWelcome&siteid =0&co_partnerId=2&UsingSSL=1&ru=&pp=&pa1=&pa2=&pa3 =&i1=-1&pageType=-1&userid="
& UserName & "&pass=" & Password)

Case 3
WebBrowser1.Navigate(TestPage)

Case 4
TextBox2.Text = WebBrowser1.Document.Body.InnerText
MsgBox(TextBox1.Text.Contains("Sign out") & " - " &
TextBox2.Text.Contains("Sign out"))
End Select
End Sub

Private Sub WebBrowser1_DocumentCompleted(ByVal sender As Object,
ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEv entArgs)
Handles WebBrowser1.DocumentCompleted
TestWebBrowser()
End Sub
End Class
Tom Shelton wrote:
On 2007-01-07, Tosco <st***********@gmail.comwrote:
Tom, I don't have any prbolem downloading text or files with the
WebClient when no authentication is required, but when a page requires
authentication it doesn't work.
>
The old application was just navigating to the URL
"http://www.xyz.com/login.jsp?LoginUsername=name&LoginPassword=pwd"
once, and the session remained alive.
>
But if I do
WebClient.DownloadString("http://www.xyz.com/login.jsp?LoginUsername=name&LoginPassword=pwd")
I get the page asking me if I forgot the password.
>
I tried to play with the WebClient.Credentials, but I failed.
>
Do you understand why?
>
Thanks,
Stefano
>
Can you show your code using the credentials property? I think that should
look something like:

Dim theWebClient As New WebClient
theWebClient.Credentials = New NetworkCredentials (username, password, server)

...

Anyway - post some code, and maybe we can work this out... (obviously, don't
post any sensitive information :)

--
Tom Shelton
Jan 22 '07 #28

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

41
by: Matt Alanzo | last post by:
Our SOHO 2 person compay sells furniture (not programmers). In '98 we paid $,$$$ for a VBA -Access '97 accounting application, including VBA source code .... an huge investment for us then (and...
33
by: Uwe Range | last post by:
Hi to all! A customer of mine told me some days ago that her IT-people told her ACCESS would not be such a good idea for continuing with our project, because Access will not be continued in the...
1
by: Lubomir | last post by:
Hi, I would like to ask, how different are C# 2005 Express Edition and C# within MS Visual Studio 2005. Than as well Visual Web Developer 2005 Express Edition and ASP within MS VS 2005. ...
1
by: Peter | last post by:
I've purchased VS.NET 2005 Standard and have tried to install SQL Server 2005 Express, but get the following error in the error log. Please could someone help me.... Microsoft SQL Server 2005...
4
by: Andrew Robinson | last post by:
My main dev machine has WinXp and VS2005 (pro). 1. I need to install VWD Express Edition so that I can do some instruction on this. Any issues with both on the same machine. Installation order?...
11
by: sumana_m | last post by:
I have downloaded the freely available express edition of Visual Web Developer. If I develop an application using this, will I be able to market my product for commercial purposes without having...
8
by: Greg Strong | last post by:
Hello All, The short questions are 1 Do you know how to make DSN connection close in Access to Oracle 10g Express Edition? &/or 2 Do you know how to make a DSN-less pass-through query...
6
by: LurfysMa | last post by:
I am working on an electronic flashcard application. I have one version up and running using Visual Basic (6.0) and Access 2000. My long-range plans are to put it up on a website and sell...
13
by: Elton Cohen | last post by:
Hi newsgroup! Can anyone tell me where I should put a simple Access database file in order to be accessible for every computer in the network (same workgroup)? There does not need to be any...
8
by: vbDavidC | last post by:
I am wondering if I should use MS Access or SQL server as my database. I have a little experience programming an Access DB with VB6 (DAO/ADO). I am now starting over with VB2005 and will be doing...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.