FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


OMG! vb.net without connection to server option?





cr3ativ3
Ok, well as I said in the title I am trying to get vb.net to connect to a server sounds easy right well apparently not I have searched the web for the last 4 hours with stuff from proxy servers to like stuff to xmlhttp requests non of which work in vb.net even though it says it does.

I hope someone here is familiar with VB.NET so what I am trying to do is have a program in vb.net connect to a script via port 80 on a server so like connect to this address: http://www.domain.com/scriptname.php?datatosend=thedata and then get the returned string from the server. I had saw a script that it said worked in vb.net which was similar to ajax or xmlhttp but the function didn't exist in vb.net I am assuming it was asp.net or something.

I last tried using a web browser tool and then getting it to connect to the script and then extracting the data from the web browser, which works only thing is that when you do that vb.net prepends and appends crap to the returned variable like "<html><head></head><body>" and "</body></html>" even if this is not there I tried connecting to a empty .txt file that only had this in it: "success oh ya" and I got returned:

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY><PRE>success oh ya</PRE></BODY></HTML>


I have tried replacing that excess using the string.replace() function with empty space but it does not seem to be working.

Now I wouldn't expect that microsoft would forget to add support for this to the wonderful vb.net language but I am at a loss to figure out how to do this if anyone can please help please help me!
eznet
What is the script?. Where is it? Can it be viewed? Are you sure that it is not the server script adding that unwanted markup? How are you making the connection in vb.net?
ashok
Try the Webservices concept of .NET. Microsoft implemented the Webservices to communicate with scripts/services running on remote servers using SOAP/XML/XMLHTTP Requests. May be webservices can help you in this matter...
cr3ativ3
ashok I searched for vb.net webservices and it was not what I was looking for at least not that I could tell. Although I had tried a script before posting topic using xmlhttp but none of the functions or objects were available in vb.net 2008...

Below is my program in vb.net 2008:

my form:





my code:




and this is what happens after the button is pressed:




So the web browser's url property is set to: "http://www.oysolutions.com/connecttest.txt" as you can see if you go to that url and view the source it is not:

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY><PRE>success oh ya</PRE></BODY></HTML>


so everything is working as I hoped except when I extract the source of the web script it adds that stuff onto it.

I wanna extract stuff from it without all that crap being prepended and appended. If there is a easier way of doing this just connection to a script via a url then getting the response from it then I would rather do that. Then have to use a web browser to connect to the page.
Related topics
mIRC for begginers.
php without server
visual basic.net
VB.NET school
VB 6 and vb.net tutorials
PHP VS ASP
VB.NET and SQL Server
VB.NET learning
Need vb.net or Flash ActionScript Help!
VB.Net Or C#
A confusion with C# and VB.NET...
Running PHP Script without PHP Server?
What is your recommended free VB.net decompiler?
vb.net class as property of another class - FIXED
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.