webservice部署问题
写的silverlight调用webservice访问数据库,在本地debug的时候正常,发布之后总是程序运行不起来,取不了数据,请问什么问题? webservice
[解决办法]
什么异常呢?
[解决办法]
是webservice部署的有问题吧?或者配置有误?
[解决办法]
webservice如下所示方式编写
[WebMethod(Description = "上传文件")]
public bool UploadFile(byte[] FileByte, string FolderPath, string FileName)
{
return new Doe.Business.Common.FileUpload().Upload(FileByte, FolderPath, FileName);
}
public static APIServiceSoapClient GetApiService()
{
string uri = CommonProperties.DoeSettings["MYService"];
EndpointAddress addr = new System.ServiceModel.EndpointAddress(uri);
OKServiceSoapClient client = new OKServiceSoapClient(DefaultBinding, addr);
var binding = client.Endpoint.Binding as BasicHttpBinding;
binding.MaxReceivedMessageSize = int.MaxValue;
binding.MaxBufferSize = int.MaxValue;
binding.SendTimeout = TimeSpan.MaxValue;
binding.ReceiveTimeout = TimeSpan.MaxValue;
return client;
}