using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.IO;
namespace CallCRMAuth
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string url = "http://192.168.1.1/CheckUser.aspx?Account=test001&Password=123456";
string getdata = "";
HttpWebRequest MyHttpWebRequest = (HttpWebRequest)WebRequest.Create(url);
HttpWebResponse MyHttpWebResponse = (HttpWebResponse)MyHttpWebRequest.GetResponse();
Stream MyStream = MyHttpWebResponse.GetResponseStream();
StreamReader MyStreamReader = new StreamReader(MyStream, Encoding.GetEncoding("UTF-8"));
getdata = MyStreamReader.ReadToEnd();
MyStreamReader.Close();
MyStream.Close();
MessageBox.Show(getdata.ToString());
}
}
}
留言列表