473,396 Members | 1,724 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.

using WebClient, how??

ASP.NET 2.0

I'm working on a asp.net 2.0 website which needs to access a database on
another server via an request. This database is placed on another server
which is not based on ASP.NET, but traditional ASP. The ASP.NET may access
the database on the other server by requesting a .asp page with some
parameters - and hte output on the .asp page was the result from the
database query... So I need to access a asp page on this other server via an
request as from using an object of the WebClient class. The output from the
..asp page will be returned back to the ASP.NET 2.0 website for processing...

For example like this:
http://www.test.com\index.asp?user=n...pword=insecure
How can I access this page from my ASP.NET 2.0 website by using WebClient?

Or is it a much better approach to install .NET 2.0 on this server and
implement a web service instead (the server is a windows server) so my
ASP.NET 2.9 website can access it by using a webservice instead?

Any suggestions???

Jeff
Apr 25 '07 #1
2 2068
asp has simple webservice support. webclient is simple, but you will
need to parse the response data.
-- bruce (sqlwork.com)
Jeff wrote:
ASP.NET 2.0

I'm working on a asp.net 2.0 website which needs to access a database on
another server via an request. This database is placed on another server
which is not based on ASP.NET, but traditional ASP. The ASP.NET may access
the database on the other server by requesting a .asp page with some
parameters - and hte output on the .asp page was the result from the
database query... So I need to access a asp page on this other server via an
request as from using an object of the WebClient class. The output from the
.asp page will be returned back to the ASP.NET 2.0 website for processing...

For example like this:
http://www.test.com\index.asp?user=n...pword=insecure
How can I access this page from my ASP.NET 2.0 website by using WebClient?

Or is it a much better approach to install .NET 2.0 on this server and
implement a web service instead (the server is a windows server) so my
ASP.NET 2.9 website can access it by using a webservice instead?

Any suggestions???

Jeff

Apr 25 '07 #2
On Apr 25, 8:39 pm, "Jeff" <it_consulta...@hotmail.com.NOSPAMwrote:
ASP.NET 2.0

I'm working on a asp.net 2.0 website which needs to access a database on
another server via an request. This database is placed on another server
which is not based on ASP.NET, but traditional ASP. The ASP.NET may access
the database on the other server by requesting a .asp page with some
parameters - and hte output on the .asp page was the result from the
database query... So I need to access a asp page on this other server via an
request as from using an object of the WebClient class. The output from the
.asp page will be returned back to the ASP.NET 2.0 website for processing...

For example like this:http://www.test.com\index.asp?user=n...pword=insecure
How can I access this page from my ASP.NET 2.0 website by using WebClient?

Or is it a much better approach to install .NET 2.0 on this server and
implement a web service instead (the server is a windows server) so my
ASP.NET 2.9 website can access it by using a webservice instead?

Any suggestions???

Jeff

I think you can use System.Net.HttpWebRequest

for example:

HttpWebRequest request =
(HttpWebRequest)HttpWebRequest.Create("http://...page.asp");
request.Method = "GET";
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
StreamReader reader = new StreamReader(response.GetResponseStream());
string asp = reader.ReadToEnd();

Using xml as an output you can easily parse it as per

XmlDocument xml = new XmlDocument();
ResponseXmlDoc.LoadXml(asp);

Apr 26 '07 #3

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

Similar topics

4
by: brianinbox | last post by:
Hi, I've been trying to upload file using webclient.uploadfile method from my IIS webserver to an Apache webserver without any success. On the Apache server (server that receives the incoming...
0
by: AlanF | last post by:
Here is my perplexing issue and I've looked EVERYWHERE for help (well almost everywhere.... probably should have started here :)) I am using a Webclient to successfully retrieve a "downloadata"...
3
by: Ram Baruch | last post by:
Hi, I'm trying to use WebClient class to upload data. In order to upload it, I need to use my username and password. Does somebody know how can I set it in the WebClient class? Regards, Ram.
6
by: genc ymeri | last post by:
Hi, We are struggeling to upload a file through a C# webClient into JBoss web server. Meanwhile we are able to upload a file from the webserver itself. The problem is only with C# webClient . The...
2
by: Ole Hanson | last post by:
Hi It seems to be virtually impossible to perform a download of more than 2 files at the time from any website? The same limitation seems to be put on IE, if I'm using that as Client. I want...
1
by: Scampi | last post by:
Hi, I've been working on an application to do some 'scraping' of web content, using the WebClient class. I'm using code rather like the following.. Dim objWebClient As New WebClient Dim...
6
by: Giovanni | last post by:
Hi Guys, Really strange problem I am experiencing... I have setup a virtual directory with Read Only permissions on an ISA/IIS server (SBS 2003). In that virt. dir., I placed 1 file...
1
by: Mad Scientist Jr | last post by:
For some reason I can't get a WebClient to access an outside URL from behind our firewall. The code works when it runs outside the firewall. I turned on windows authentication in the web.config...
2
by: MichaelSchoeler | last post by:
Hi, I'm having problems with the WebClient class regarding UTF-8 encoded data. When I access a specific webservice directly I can see the data arrives in corretly formatted UTF-8. But when I...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.