Click here to Skip to main content
15,900,725 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have hosted wcf service on remote server. I can able to get single value or single record from wcf service. But if there is multiple records is there then is gives problem.
After retrieving data in dataset from DB in wcf, I have 1st serialised it and then this serialised data is tranfer to my web app. But if there is mutiple column in datatable then then wcf dose not return any value. As this wcf is hosted on remote server i cant able to debbug it.
I have tested this wcf on iis then its working fine.But issues occured when i host this service on remote server. So any one can plz help me??

My serialization code is as follows...whats wrong with it?? or what may be the problem in my case??
C#
public byte[] DS_Serialize(DataSet ds)
    {
        try
        {
            byte[] binaryDataResult = null;
            using (MemoryStream memStream = new MemoryStream())
            {
                BinaryFormatter brFormatter = new BinaryFormatter();
                ds.RemotingFormat = SerializationFormat.Binary;
                brFormatter.Serialize(memStream, ds);
                binaryDataResult = memStream.ToArray();
            }
            return binaryDataResult;
        }
        catch (Exception er)
        {
            return null;
        }
    }
Posted
Comments
_Asif_ 16-Jan-15 1:57am    
If you have had included logging in your code you could have solve the issue by yourself. This is pretty bad practice in production application, not to log exceptions. Use Log4Net to include logging in your code, this will help you alot! believe me!
Member 11151142 16-Jan-15 2:30am    
yeah...Thank you. Nw i will 1st add the Logg to locate exact error

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900