473,385 Members | 1,445 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

HTTP 400 Bad Request inside get_DeclaringMethod() in mscorlib?

Is there any way to debug into the web service proxy in asp.net 2.x?
You used to be able to do this in asp.net 1.1 and you could fix the proxy
if need be. This seems like a bug in the proxy generator :-P

This API works fine most of the time, but occasionally get stuck where it
always gives an HTTP 400 Bad Request error for a certain data structure
that looks fine to me (they're all serializable objects of null, integer,
string, and datetime).

Stack dump is fairly useless:
at System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse
(SoapClientMessage message, WebResponse response, Stream responseStream,
Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)
at Mycode.ReplicationService.addObject(ReplicationTab le tableName,
ReplObj obj) in F:\work\ASSEMBLYSRC\Site\Web References\Replication
\Reference.vb:line 354

ReplObj is a simple array of name/value pairs.

When I look at the exception in the debugger, the targetsite exception
states:

Method may only be called on a Type for which Type.IsGenericParameter is
true.
at System.RuntimeType.get_DeclaringMethod()

Well..that's not too useful w/o me knowing what it's trying to parse and
what method and type it's having problems with :-(

Any other suggestions on what to do with this short of sticking a network
analyzer on it and making sure the soap/xml packets look ok? It's the
latest version of asp.net 2.0 if that matters...
ken
Jun 4 '07 #1
3 3998
"Ken Yee" <ke*****@yahoo.com.SPAMGUARDwrote in message
news:Xn**********************************@207.46.2 48.16...
Is there any way to debug into the web service proxy in asp.net 2.x?
You used to be able to do this in asp.net 1.1 and you could fix the proxy
if need be. This seems like a bug in the proxy generator :-P

This API works fine most of the time, but occasionally get stuck where it
always gives an HTTP 400 Bad Request error for a certain data structure
that looks fine to me (they're all serializable objects of null, integer,
string, and datetime).

Stack dump is fairly useless:
at System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse
(SoapClientMessage message, WebResponse response, Stream responseStream,
Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)
at Mycode.ReplicationService.addObject(ReplicationTab le tableName,
ReplObj obj) in F:\work\ASSEMBLYSRC\Site\Web References\Replication
\Reference.vb:line 354

ReplObj is a simple array of name/value pairs.

When I look at the exception in the debugger, the targetsite exception
states:

Method may only be called on a Type for which Type.IsGenericParameter is
true.
at System.RuntimeType.get_DeclaringMethod()

Well..that's not too useful w/o me knowing what it's trying to parse and
what method and type it's having problems with :-(

Any other suggestions on what to do with this short of sticking a network
analyzer on it and making sure the soap/xml packets look ok? It's the
latest version of asp.net 2.0 if that matters...
Exceptions like this often have a nice chain of InnerException's. Check the
InnerException of this exception, etc. In fact, just try
Console.WriteLine(ex.ToString()), which will print the entire chain of
exceptions.
--
John Saunders [MVP]
Jun 5 '07 #2
"John Saunders [MVP]" <john.saunders at trizetto.comwrote in
news:Ol**************@TK2MSFTNGP05.phx.gbl:
Exceptions like this often have a nice chain of InnerException's.
Check the InnerException of this exception, etc. In fact, just try
Console.WriteLine(ex.ToString()), which will print the entire chain of
exceptions.
There was nothing...I rummaged through the exception object in the
debugger w/o luck.

I did find the actual cause of this...<drumroll>....trying to send a
string w/ null characters in it. The null characters weren't displayed
in the debugger; the debugger only displayed the string as a truncated
string (C# lets you include nulls in a string whereas C++ doesn't). I
had to packet capture the web service call/response to figure this
out...what a PITA because MS doesn't let you capture packets to localhost
:-P

So anyways, the solution was to strip all null characters from strings
before sending them via the web service calls. Otherwise, the receive
side would blow up claiming it was an invalid XML document, which it is.
MS needs to figure out a way to encode null characters or give a better
message about what character in what field of the parameter is causing
the issue... :-(
ken
Jun 5 '07 #3
had similar issue, I was trying to pass strings constructed from bytes, which
caused http 400 error. So better to send directly bytes.
Jun 12 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Armin Braunstein | last post by:
Hi! I have a curious problem in my C# ASP .Net application (Visual Studio 2002, .Net Framework 1.0 SP3 (previously SP2 with the same error - following), Crystal Reports (shipped with Visual...
3
by: DJTN | last post by:
I'm getting the following error when I try to compile my setup project in VS 2002. I have re-installed the .net framework 1.1 and it didnt solve the problem. WARNING: Unable to find dependency...
0
by: Kirk | last post by:
I'm trying to use a Web Service to be a Remoting client of an existing ..NET 2.0 server. But I get the following error when I try to use System.Runtime.Remoting.Channels.Http in my WebService. ...
2
by: AnalogKid17 | last post by:
Keywords: ASP.NET app with VS2005 running on Win2003 with IIS6, and SQL2000 on a WinXP Box I've betting the following for days... it's driving me insane: Server Error in '/' Application. ...
6
by: thomson | last post by:
Hi All, i do hae a solution in which i do have mulitple projects including Web Projects,, Depending on the functionality it gets redirected to different web projects and it is working fine, ...
0
by: Shree | last post by:
While invoking the web service from client, I am setting the credentitals using the following code... ReportingService.Credentials = System.Net.CredentialCache.DefaultCredentials; But in...
0
by: paulodonnell99 | last post by:
Hi, I am trying to build an installer application to run on the compact framework, I want to produce a netmodule using CSC.exe, then use AL.exe to embed resouce files and produce an exe. My...
5
by: Jimmy | last post by:
How can I do that? Is it possible to send a server request (i.e. GET) without refreshing the web page? Using Javascript? Or Ajax (i.e. AjaxAnywhere)? Or if there's a way (i.e. using...
3
by: Mike | last post by:
Hi I have problem as folow: Caught Exception: System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Request for the permission of type...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.