2016-03-29 9 views
0

Ich habe einen C# Web Service, der gut in Visual Studio Debuggen funktioniert, aber gibt nicht den bytearray Teil meiner benutzerdefinierten Anrufe in IISC# nicht zurückkehr Byte-Array asmx Webservice

Antwort vom Web-Service in IIS

<Surname>Midlton</Surname><Firstname>Katrin</Firstname><Middlename/><Gender>Female</Gender><MaritalStatus>Separated</MaritalStatus><DateOfBirth>7/1/1965 12:00:00 AM</DateOfBirth><Religion/><PermanentAddress>Oktabrjskaya</PermanentAddress><City>AKURE</City><State>IMO</State><Country>NG</Country><Nationality/><Occupation>ADVERTISING PRACTITIONER</Occupation><IDType/><IDNumber/><MobileNumber>98765432</MobileNumber><EmailAddress>[email protected]</EmailAddress><IssueDebitCard>true</IssueDebitCard><PreferredName>1234567899876543211</PreferredName><EnableUDirect>0</EnableUDirect><UDirectUsername>1234567897</UDirectUsername><EnableEmailAlert>1</EnableEmailAlert><EnableEstatement>1</EnableEstatement><Title>Mrs.</Title><SolID>0280</SolID><CardType>Visa Dual Currency</CardType><EnableSMSAlert>1</EnableSMSAlert><RecordID>51008</RecordID><AccountTypeName>FREEDOM SAVINGS ACCOUNT (BASIC)</AccountTypeName><AccountTypeID>3</AccountTypeID> 

Antwort Debuggen in VS

<Surname>Midlton</Surname><Firstname>Katrin</Firstname><Middlename/><Gender>Female</Gender><MaritalStatus>Separated</MaritalStatus><DateOfBirth>7/1/1965 12:00:00 AM</DateOfBirth><Religion/><PermanentAddress>Oktabrjskaya</PermanentAddress><City>AKURE</City><State>IMO</State><Country>NG</Country><Nationality/><Occupation>ADVERTISING PRACTITIONER</Occupation><IDType/><IDNumber/><MobileNumber>98765432</MobileNumber><EmailAddress>[email protected]</EmailAddress><IssueDebitCard>true</IssueDebitCard><PreferredName>1234567899876543211</PreferredName><EnableUDirect>0</EnableUDirect><UDirectUsername>1234567897</UDirectUsername><EnableEmailAlert>1</EnableEmailAlert><EnableEstatement>1</EnableEstatement><Title>Mrs.</Title><SolID>0280</SolID><CardType>Visa Dual Currency</CardType><EnableSMSAlert>1</EnableSMSAlert><RecordID>51008</RecordID><AccountTypeName>FREEDOM SAVINGS ACCOUNT (BASIC)</AccountTypeName><AccountTypeID>3</AccountTypeID><UploadFile>dfdfEWESD345SDSDssDfdsf</UploadFile> 

ich würde wirklich gerne wissen, warum der bytearray Teil der Antwort gestrippt in IIS heraus.

AOData accountOpeningData = new AOData();   


       SqlCommand command = new SqlCommand(commandText); 
       command.Connection = connection; 



       reader = command.ExecuteReader(); 

       if (reader.Read()) 
       { 
        recordID = reader["RecordID"].ToString(); 
        accountOpeningData.RecordID = recordID; 
        accountOpeningData.AccountTypeID = reader["AccountTypeID"].ToString(); 
        accountOpeningData.AccountTypeName = reader["AccountTypeName"].ToString(); 
        accountOpeningData.Surname = reader["LastName"].ToString(); 
        accountOpeningData.Firstname = reader["FirstName"].ToString(); 
        accountOpeningData.EmailAddress = reader["Email"].ToString(); 
        accountOpeningData.Middlename = reader["MiddleName"].ToString(); 
        accountOpeningData.Gender = reader["Gender"].ToString(); 
        accountOpeningData.MaritalStatus = reader["MaritalStatus"].ToString(); 


        accountOpeningData.DateOfBirth = reader["DOB"].ToString(); 
        accountOpeningData.Religion = String.Empty; //reader["Religion"].ToString(); 
        accountOpeningData.PermanentAddress = reader["Address"].ToString(); 
        accountOpeningData.City = reader["City"].ToString(); 
        accountOpeningData.State = reader["State"].ToString(); 
        accountOpeningData.Country = reader["Country"].ToString(); 
        accountOpeningData.Nationality = String.Empty; //reader["Nationality"].ToString(); 
        accountOpeningData.Occupation = reader["Occupation"].ToString(); 
        accountOpeningData.IDType = String.Empty; //reader["IdentificationForm"].ToString(); 
        accountOpeningData.IDNumber = String.Empty; //reader["INumber"].ToString(); 
        accountOpeningData.MobileNumber = reader["Tel1"].ToString(); 
        accountOpeningData.IssueDebitCard = true; //Convert.ToBoolean(reader["SDebitcard"].ToString()); 
        accountOpeningData.CardType = reader["CardType"].ToString(); 
        accountOpeningData.PreferredName = reader["PreferedName"].ToString(); 
        accountOpeningData.Title = reader["Title"].ToString(); 
        accountOpeningData.SolID = reader["NewCode"].ToString(); 
        accountOpeningData.EnableUDirect = reader["Udirect"].ToString(); 
        accountOpeningData.UDirectUsername = reader["Uname"].ToString(); 
        accountOpeningData.EnableEmailAlert = reader["EmailAlert"].ToString(); 
        accountOpeningData.EnableSMSAlert = reader["SmsAlert"].ToString(); 
        accountOpeningData.EnableEstatement = reader["eStatement"].ToString(); 

        string code = reader["Code"].ToString(); 

        accountOpeningData.UploadFile = GetUploadedFiles(code); 


       } 


      } 
      catch (Exception ex) 
      { 
       // Print error message 
       MessageBox.Show(ex.Message); 
      } 
      finally 
      { 
       if (reader != null) 
        reader.Close(); 

       if (connection.State == ConnectionState.Open) 
        connection.Close(); 
      } 

      return accountOpeningData; 
     } 
+0

haben Sie Ihre Byte-Array-Eigenschaft auf Ihre Art hinzufügen Sie zurückgeben? – Eminem

+0

Fügen Sie einen Code hinzu, den Sie verwenden, um das Objekt zu senden – Eminem

+0

@Eminem Der Code hinzugefügt, der das Objekt – kolexinfos

Antwort

0

Ich löste das Problem schließlich durch die Implementierung von WSE 3.0. Ich stelle es nach oben, wie angewiesen here

und folgte der Anweisung here es zu meinem Projekt hinzuzufügen