Bug 656082

Summary: System.Web.HttpException
Product: [Mono] Mono: Class Libraries Reporter: Juriy Mironchuk <bladeroot>
Component: WCFAssignee: Atsushi Enomoto <atsushieno>
Status: NEW --- QA Contact: Mono Bugs <mono-bugs>
Severity: Normal    
Priority: P5 - None    
Version: 2.8.x   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 11.2   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: a small, self-contained and ready to run test case which demonstrates the issue

Description Juriy Mironchuk 2010-11-26 12:00:26 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.12) Gecko/20101026 SUSE/3.6.12-0.7.1 Firefox/3.6.12

serverside:
XSP4
System.Web.HttpException:
System.Web.HttpException: The request body is incomplete.

clienside:
Disco failed for the url 'http://bsd-gate.xtl:8000/CoreService.svc' with exception :
 The HTML document does not contain Web service discovery information

Attempting to download metadata from http://bsd-gate.xtl:8000/CoreService.svc using WS-MetadataExchange..
WS-MetadataExchange query failed for the url 'http://bsd-gate.xtl:8000/CoreService.svc' with exception :
 System.TimeoutException: The operation has timed-out.

if we connect to IIS server, and connect:
Unhandled Exception: System.ArgumentNullException: Argument cannot be null.                                       
Parameter name: collection

Reproducible: Always

Steps to Reproduce:
1. deploy CoreService to xsp4 server
/usr/bin/mono /usr/lib/mono/4.0/xsp4.exe --port 8000 (can use different port) --address 0.0.0.0 --verbose --nonstop
2. deploy CoreService to IIS7 server as NetworkService
3. use svcutil:
svcutil http://<sever.name>:<port>/CoreService.svc
Actual Results:  
at clientside:
Attempting to download metadata from 'http://bsd-gate.xtl:8000/CoreService.svc' using DISCO..
Disco failed for the url 'http://bsd-gate.xtl:8000/CoreService.svc' with exception :
 The HTML document does not contain Web service discovery information

Attempting to download metadata from http://bsd-gate.xtl:8000/CoreService.svc using WS-MetadataExchange..
WS-MetadataExchange query failed for the url 'http://bsd-gate.xtl:8000/CoreService.svc' with exception :
 System.TimeoutException: The operation has timed-out.
  at System.ServiceModel.Channels.HttpRequestChannel+HttpChannelRequestAsyncResult.WaitEnd () [0x00000] in <filename unknown>:0 
  at System.ServiceModel.Channels.HttpRequestChannel.EndRequest (IAsyncResult result) [0x00000] in <filename unknown>:0 
  at System.ServiceModel.Channels.HttpRequestChannel.Request (System.ServiceModel.Channels.Message message, TimeSpan timeout) [0x00000] in <filename unknown>:0 
  at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Request (System.ServiceModel.Channels.Message msg, TimeSpan timeout) [0x00000] in <filename unknown>:0 
  at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Request (System.ServiceModel.Description.OperationDescription od, System.Object[] parameters) [0x00000] in <filename unknown>:0 
  at System.ServiceModel.MonoInternal.ClientRuntimeChannel.DoProcess (System.Reflection.MethodBase method, System.String operationName, System.Object[] parameters) [0x00000] in <filename unknown>:0 
  at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Process (System.Reflection.MethodBase method, System.String operationName, System.Object[] parameters) [0x00000] in <filename unknown>:0

serverside:
Handling exception type HttpException
Message is The request body is incomplete.
IsTerminating is set to True
System.Web.HttpException: The request body is incomplete.
  at System.Web.HttpRequest.MakeInputStream () [0x00000] in <filename unknown>:0 
  at System.Web.HttpRequest.get_InputStream () [0x00000] in <filename unknown>:0 
  at System.ServiceModel.Channels.Http.AspNetHttpRequestInfo.get_InputStream () [0x00000] in <filename unknown>:0 
  at System.ServiceModel.Channels.Http.HttpReplyChannel.CreatePostMessage (System.ServiceModel.Channels.Http.HttpContextInfo ctxi) [0x00000] in <filename unknown>:0 
  at System.ServiceModel.Channels.Http.HttpReplyChannel.TryReceiveRequest (TimeSpan timeout, System.ServiceModel.Channels.RequestContext& context) [0x00000] in <filename unknown>:0 
  at System.ServiceModel.Channels.Security.SecurityReplyChannel.TryReceiveRequest (TimeSpan timeout, System.ServiceModel.Channels.RequestContext& context) [0x00000] in <filename unknown>:0 
  at System.ServiceModel.Channels.ReplyChannelBase.<BeginTryReceiveRequest>m__16 (TimeSpan tout, System.ServiceModel.Channels.RequestContext& ctx) [0x00000] in <filename unknown>:0

when we connect to IIS:
nhandled Exception: System.ArgumentNullException: Argument cannot be null.                                       
Parameter name: collection                                                                                        
  at System.Collections.Generic.List`1[System.CodeDom.CodeExpression].AddRange (IEnumerable`1 collection) [0x00000] in <filename unknown>:0                                                                                         
  at System.ServiceModel.Description.ServiceContractGenerator.GenerateImplementationClientMethod (System.CodeDom.CodeTypeDeclaration type, System.ServiceModel.Description.ContractDescription cd, System.ServiceModel.Description.OperationDescription od, Boolean async, System.CodeDom.CodeTypeReference& returnTypeFromMessageContract) [0x00000] in <filename unknown>:0 
  at System.ServiceModel.Description.ServiceContractGenerator.AddImplementationClientMethods (System.CodeDom.CodeTypeDeclaration type, System.ServiceModel.Description.ContractDescription cd) [0x00000] in <filename unknown>:0 
  at System.ServiceModel.Description.ServiceContractGenerator.GenerateProxyClass (System.ServiceModel.Description.ContractDescription cd, System.CodeDom.CodeNamespace cns) [0x00000] in <filename unknown>:0 
  at System.ServiceModel.Description.ServiceContractGenerator.GenerateServiceContractType (System.ServiceModel.Description.ContractDescription contractDescription) [0x00000] in <filename unknown>:0 
  at Mono.ServiceContractTool.Driver.Run (System.String[] args) [0x00000] in <filename unknown>:0 
  at Mono.ServiceContractTool.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0

Expected Results:  
Mono service contract conversion tool  0.1.0.0 - Copyright (C) 2006 Novell, Inc.                                  
                                                                                                                  
Attempting to download metadata from 'http://192.168.0.203:8000/CoreService.svc' using DISCO..                    
Disco found documents at the following URLs:                                                                      
- Xml Schema at    http://192.168.0.203:8000/CoreService.svc?xsd=xsd1                                             
- WSDL document at  http://192.168.0.203:8000/CoreService.svc?wsdl                                                
- DISCO document at http://192.168.0.203:8000/CoreService.svc?disco                                               
- Xml Schema at    http://192.168.0.203:8000/CoreService.svc?xsd=xsd0                                             
Generating files..
Comment 1 Marek Habersack 2010-11-26 14:17:03 UTC
Please provide a small, self-contained and ready to run test case which demonstrates the issue. A test case works much better to fix a bug than bumping the priority to Major. After attaching the test case please reopen the bug.
Comment 2 Juriy Mironchuk 2010-12-03 12:06:18 UTC
Created attachment 403324 [details]
a small, self-contained and ready to run test case which demonstrates the issue
Comment 3 Juriy Mironchuk 2010-12-06 10:27:25 UTC
This bug could be also reproduce at Linux OpenSuse 11.3 x86, x86-64. I think that bug don't depends on OS version, it depends on mono