日期:2014-05-18  浏览次数:21075 次

WebServices返回String类型的字符串出现异常
异常是XML文档错误上【“.”(十六进制值 0x00)是无效的字符】

 byte[] base64 = Convert.FromBase64String(TONSU.DBUtility.DbHelperSQL.GetSingle("select timeStampValue from [TimeStamp] where requstId=" + serialNumber).ToString());

byte[] baseSigna = Convert.FromBase64String(TONSU.DBUtility.DbHelperSQL.GetSingle("select timeStampSigna from [TimeStamp] where requstId=" + serialNumber).ToString());

string result = ASEDecode(base64, "CNchongqingtonsu").Replace("\0", "") + "," + ASEDecode(baseSigna, "CNchongqingtonsu");

return result;

result中的值是:
MD5,FCEA92F7412B5DA7BE0CF42B8C93759,342501199101016031,张三,药,2012-4-12 9:58:09,127.0.0.1,2012-4-12 9:58:09,granted,ggCcG3T6vFdthdvjcA0mlg7TW+4HbrIykQZChdEiPCl3EUxLVf8ZfGyPZOfVwMeS7dPymNzcNN8bWq5Jaegzs9h87FijUyZN7/EOgrSYFUOJO2qf/wNcOyZvVyhO/vRH+aW0on/ArEy62L/qYysYAJV5PaTtFmgmEDBBdOx2o44=eehL/YWlXNVFDt8Svf6z0bRPO7yCt/6xNpiNR9rVdkodYrWQ/t7FbEtmwWzYdi2wM2gipF1mOVVMsCYOaBhGoXRrue8OcETEZoF+4aTogQ+MNi5oBw6ykGT+kwQ9kBvA2l20CI2yc32Pa7lH7HbRagGTSuPCnWlmRvSWG+l/jYA=wxM7pn+Pssn5XL6SDznorqLXamujTlaZH3wTB/mXMUfSZ+H0mRMaEmL7gCepjgkAs8h8RnfDfHp9amGtpUKx0gIiz6itoQfXjoB62XGEoQissf1bLlHY2znh3kZzwgP9/MSpLiE1BodCpTktWBka6XH1WVk2pLAMoUeBDhHbGfw=Mb83CqP/0Aj4ckCnSaFSQ2tjBFZaejyZDqeAL5YNLRVkSrr2iL57ERz2S07gqXd1rkQJKiakNbf4aqBOazLwJ5egH9R+OcxpDVQ/Z+EkkgdC+RT0XSbmtXoIaAmZrqxC/5DBKn0/Or4SO01h3Hn26n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Bczrk4MDWZJCha/X7g64WpBLq6CisTUAjDa13zWRqJAfwtjefWGtAjdLaAVP2hIWEqcOtkbLLPPZBpee+aGidL1zC9Ap4Uusq0DcjwmzBYJKx0lYmTDP5tM7gNWqKOfTOcGUx7zD644ect2kbM5HDII=

如果只要前面一段:MD5,FCEA92F7412B5DA7BE0CF42B8C93759,342501199101016031,张三,药,2012-4-12 9:58:09,127.0.0.1,2012-4-12 9:58:09,granted就没有错误,如果加上后面一大串字符就出现异常了。求解

------解决方案--------------------
都提示你是那个"."点的问题
不然就一段一段的调试一下就缩小范围了,先找到那里引起的问题