HTTP:请求失败,HTTP状态为400:错误请求. [英] HTTP: The request failed with HTTP status 400: Bad Request.

查看:953
本文介绍了HTTP:请求失败,HTTP状态为400:错误请求.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想将字节数组传递给插入查询,但是我没有使用该参数.我直接将值传递给插入查询.
我收到以下错误:

Hi,

I want to pass the byte array into insert query but I am not using the parameter. I am directly passing values into insert query.
I am getting the following error:

at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

from 
System.Web.Services
The request failed with HTTP status 400: Bad Request.


我的代码


my code

object str;
System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding();
str = enc.GetString(image);

objGL.GetSelectByQuery("update empmast set photo=convert(varbinary(MAX),'" + str + "') where srno='" + txtSRNO.Text + "'");


非常感谢您的帮助.


Any help is greatly appreciated.

推荐答案

检查这些

使用.NET的WebService出现400错误 [错误:请求失败,HTTP状态为400 :错误请求 [ ^ ](可能情况下的旧CP线程)
System.Net.WebException:请求失败,HTTP状态为400:错误请求 [
Check these

400 Error from WebService using .NET[^]
Error:The request failed with HTTP status 400: Bad Request[^](Old CP thread with possible cases)
System.Net.WebException: The request failed with HTTP status 400: Bad Request[^](One more possible case)


这篇关于HTTP:请求失败,HTTP状态为400:错误请求.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆