我是C#的新手,这是我的第一个程序。我正在尝试集成来自OVH.IE的SOAPI(更多信息在这里:www.ovh.ie/products/soapi.xml),但每当我启动程序并单击登录按钮时程序崩溃(VS2012的内存使用量增加然后崩溃)。
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.Web.Services;
namespace Server_Manager
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button2_Click(object sender, EventArgs e)
{
textBox1.Clear();
textBox2.Clear();
}
void login(string uid, string pwd, string dc)
{
if (dc == "OVH")
{
managerService soapi = new managerService();
string session = soapi.login(uid, pwd, "ie", false);
if (String.IsNullOrWhiteSpace(session))
{
MessageBox.Show("Not Logged");
}
else
{
MessageBox.Show("Logged In");
}
}
}
private void button1_Click(object sender, EventArgs e)
{
if (String.IsNullOrWhiteSpace(textBox1.Text) || String.IsNullOrWhiteSpace(textBox1.Text))
{
MessageBox.Show("Please Fill all the Details");
}
else
{
string uid, pwd, dc;
uid = textBox1.Text;
pwd = textBox2.Text;
dc = comboBox1.Text;
login(uid,pwd,dc);
}
MessageBox.Show(comboBox1.Text);
}
}
}
答案 0 :(得分:0)
这些说明用于在WinDBG中进行诊断,WinDBG是一个来自microsoft的基于命令行的调试器,但我被告知他们可以在Visual Studio中工作。