TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
forumarbeit
NA
5
0
Query from an internal network
Sep 16 2018 4:58 AM
Dear,
I would like a query on a internal network tool about a internal url like "http://192.168.1.10:5000" and write the result in a RichTextBox or write it in a text-file.
I have mak a sample, but it does not run.
I get in the sample an exeption on line 26. "WebResponse response = request.GetResponse();"
I don't no where ist the problem?
Please, could help me anyone?
I have a form with
-
textBox1.Text
=
http://192.168.1.10:5000
- richTextBox
and a button
using
System;
using
System.Collections.Generic;
using
System.ComponentModel;
using
System.Data;
using
System.Drawing;
using
System.Linq;
using
System.Text;
using
System.Threading.Tasks;
using
System.Windows.Forms;
using
System.Net;
using
System.IO;
namespace
Http_Webabfrage_1
{
public
partial
class
Form1 : Form
{
public
Form1()
{
InitializeComponent();
}
private
void
button1_Click(
object
sender, EventArgs e)
{
string
URL = textBox1.Text;
WebRequest request = WebRequest.Create(URL);
WebResponse response = request.GetResponse();
StreamReader reader =
new
StreamReader(response.GetResponseStream());
string
str = reader.ReadLine();
while
(str !=
null
)
{
richTextBox1.Text = str;
}
}
}
}
Reply
Answers (
2
)
How to use enter key on specific cell on datagridview althou
Uploading a File into NAS