
Nguyên bản được gửi bởi
VNFox
Rất khó nói bạn phải upload cái webservice lên và bạn process web service như thế nào, bạn post code bạn lên đi
webservice của em như thế này
Code:
[WebMethod(enableSession: true)]
public DataSet GetDataSet(string tenthutuc, string[] thamso, object[] giatri)
{
try
{
LayerAccData ac = new LayerAccData();
SqlDataAdapter dt = new SqlDataAdapter();
dt = ac.getDataAdapter(tenthutuc, thamso, giatri);
DataSet ds = new DataSet();
dt.Fill(ds);
return ds;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
return null;
}
}
Đây là trên phần mềm em gọi tới và sử dụng cái Method trong webservice mà lúc nó chạy được lúc nó báo lỗi
Code:
public DataTable SelectLike(string CongTyID)
{
BasicHttpBinding binding = new BasicHttpBinding();
binding.MaxReceivedMessageSize = 2147483647;
binding.MaxBufferSize = 2147483647;
binding.OpenTimeout = new TimeSpan(0, 10, 0);
binding.SendTimeout = new TimeSpan(0, 10, 0);
binding.CloseTimeout = new TimeSpan(0, 10, 2);
binding.ReceiveTimeout = new TimeSpan(0, 10, 0);
EndpointAddress endpoint = new EndpointAddress("http://localhost:10724/ServiceQLBH.asmx");
ServiceReference.ServiceQLBHSoapClient service = new ServiceReference.ServiceQLBHSoapClient(binding, endpoint);
DataTable data = new DataTable();
try
{
string TenThuTuc = "P_DMNhaCC";
string[] thamso = { "@action", "@CongTyID" };
object[] giatri = { "Select", CongTyID };
DataSet ds = service.GetDataSet(TenThuTuc, thamso, giatri);
data = ds.Tables[0];
return data;
}
catch (Exception ex)
{
MessageBox.Show("Lỗi: " + ex.Message);
return null;
}
}
Không biết có liên quan gì tới hosting không nữa.
Lỗi cụ thể nó như này
