Unable to Integrate

Last post 12-02-2005, 11:11 AM by jptomlinson. 5 replies.
Sort Posts: Previous Next
  •  05-11-2005, 4:26 PM 6603

    Unable to Integrate

    I am trying to use CuteChat in a custom web app. I got the stand alone sample up and running, but the integration into my app has been unsuccessful.

    The following code bombs:

                CuteSoft.Chat.Chat_Lobby[] lobbies = ChatWebUtility.Api.GetLobbies();

     The exception details are:

                 System.Xml.XmlException: hexadecimal value 0x12 is an invalid character. Line 1, position 2. 

    When I debug, ChatWebUtility.Api is null.

     I think I’ve created all of the required integration classes in my solution:

    • ConnectionStringProvider
    • DataProvider
    • UserAdapter

    I’ve also got the following records in my Chat_Config table:

    • DataProviderType
    • UserAdapterType
    • Announcement
    • ChannelSkins
    • Description
     In my web.config, I have the following CuteChat key:
    • CuteChat.SqlClient.ConnectionString

    I bought CuteChat but can't currently use it.

     

  •  05-12-2005, 10:54 AM 6618 in reply to 6603

    Re: Unable to Integrate

    Could you post more details about the error :
     
    System.Xml.XmlException: hexadecimal value 0x12 is an invalid character. Line 1, position 2. 
     
    ? The stack trace ?
    Thanks.
     
    Regards , Terry .
  •  05-12-2005, 4:50 PM 6630 in reply to 6618

    Re: Unable to Integrate

    Terry,

    Here are the details of my exception, and a piece of the code that raises the error. Please help me solve the problem.

    Thanks,
    -Conrad


    *****************************
    Code from ChatLinkModule.ascx.cs
    *****************************
      /// <summary>
      /// Populates the controls, sets the links, etc.
      /// </summary>
      private void bindData()
      {
       CuteSoft.Chat.Chat_Lobby[] lobbies = null;
       try
       {
        // Setup the dropdownlist of all rooms for ESOC users
        lobbies = ChatWebUtility.Api.GetLobbies();  //CuteSoft.Chat.ChatApi.Current.GetLobbies();
       }
       catch(Exception ex)
       {
        string error = ex.ToString();
        throw ex;
       }

       .......

    *****************************
    Caught Exception
    *****************************
    ex
    {"'&#x12;', hexadecimal value 0x12, is an invalid character. Line 1, position 2." }
        [System.Xml.XmlException]: {System.Xml.XmlException}
        System.Object: {System.Xml.XmlException}
        _className: "System.Xml.XmlException"
        _COMPlusExceptionCode: -532459699
        _exceptionMethod: {System.Reflection.RuntimeMethodInfo}
        _exceptionMethodString: null
        _helpURL: null
        _HResult: -2146232000
        _innerException: { }
        _message: "System error."
        _remoteStackIndex: 0
        _remoteStackTraceString: null
        _source: "System.Xml"
        _stackTrace: {System.Array}
        _stackTraceString: "   at System.Xml.XmlScanner.ScanContent()\r\n   at System.Xml.XmlTextReader.ParseRoot()\r\n   at System.Xml.XmlTextReader.Read()\r\n   at System.Xml.XmlValidatingReader.ReadWithCollectTextToken()\r\n   at System.Xml.XmlValidatingReader.Read()\r\n   at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)\r\n   at System.Xml.XmlDocument.Load(XmlReader reader)\r\n   at System.Xml.XmlDocument.Load(String filename)\r\n   at n.a(UserIdentity A_0)\r\n   at CuteSoft.Chat.Impl.ServiceLayerChatApiDecorator.BeforeInvoke()\r\n   at CuteSoft.Chat.DynamicAssembly.ServiceLayerChatApiDecoratorProxy.GetConfig_InterceptedCall(String configname)\r\n   at CuteSoft.Chat.DynamicAssembly.WebLayerChatApiDecoratorProxy.GetConfig_InterceptedCall(String configname)\r\n   at CuteSoft.Chat.ChatWebUtility.GetUserAdapter()\r\n   at CuteSoft.Chat.ChatWebUtility.get_CurrentIdentity()\r\n   at CuteSoft.Chat.Impl.WebLayerChatApiDecorator.BeforeInvoke()\r\n   at CuteSoft.Chat.DynamicAss
    embly.WebLayerChatApiDecoratorProxy.GetLobbies_InterceptedCall()\r\n   at Mfs.EsocCeis.Presentation.Web.Chat.ChatLinkModule.bindData() in c:\\inetpub\\wwwroot\\esocdb\\chat\\chatlinkmodule.ascx.cs:line 76"
        _xcode: -532459699
        _xptrs: 0
        HelpLink: null
        HResult: -2146232000
        InnerException: { }
        Message: "'&#x12;', hexadecimal value 0x12, is an invalid character. Line 1, position 2."
        Source: "System.Xml"
        StackTrace: "   at System.Xml.XmlScanner.ScanContent()\r\n   at System.Xml.XmlTextReader.ParseRoot()\r\n   at System.Xml.XmlTextReader.Read()\r\n   at System.Xml.XmlValidatingReader.ReadWithCollectTextToken()\r\n   at System.Xml.XmlValidatingReader.Read()\r\n   at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)\r\n   at System.Xml.XmlDocument.Load(XmlReader reader)\r\n   at System.Xml.XmlDocument.Load(String filename)\r\n   at n.a(UserIdentity A_0)\r\n   at CuteSoft.Chat.Impl.ServiceLayerChatApiDecorator.BeforeInvoke()\r\n   at CuteSoft.Chat.DynamicAssembly.ServiceLayerChatApiDecoratorProxy.GetConfig_InterceptedCall(String configname)\r\n   at CuteSoft.Chat.DynamicAssembly.WebLayerChatApiDecoratorProxy.GetConfig_InterceptedCall(String configname)\r\n   at CuteSoft.Chat.ChatWebUtility.GetUserAdapter()\r\n   at CuteSoft.Chat.ChatWebUtility.get_CurrentIdentity()\r\n   at CuteSoft.Chat.Impl.WebLayerChatApiDecorator.BeforeInvoke()\r\n   at CuteSoft.Chat.DynamicAssembly.W
    ebLayerChatApiDecoratorProxy.GetLobbies_InterceptedCall()\r\n   at Mfs.EsocCeis.Presentation.Web.Chat.ChatLinkModule.bindData() in c:\\inetpub\\wwwroot\\esocdb\\chat\\chatlinkmodule.ascx.cs:line 76"
        TargetSite: {System.Reflection.RuntimeMethodInfo}

  •  05-13-2005, 11:35 AM 6660 in reply to 6630

    Re: Unable to Integrate

    Conrad:
     
    OK .

    Please check the directory CuteSoft_Server/CuteChat/CDQ/

    make sure there only has *.config files , and please check whether the files are xml well formatted .
     
    Regards , Terry .
  •  05-13-2005, 12:08 PM 6663 in reply to 6660

    Re: Unable to Integrate

    Terry,
     
    Ok, now we're getting somewhere.

    We use Visual Source Safe in our dev environment. Source Safe puts a file named vssver.scc in each and every directory in a solution. When I remove this file from my /CuteSoft_Server/CuteChat/CDQ directory, the error goes away.
     
    I suggest that you modify your code so that you don't attempt to parse .SCC files as XML documents.
     
    Thank you,
    -Conrad
  •  12-02-2005, 11:11 AM 13320 in reply to 6663

    Re: Unable to Integrate

    The issue can be somewhat annoyingly addressed by moving the .scc files to a temporary folder while testing your app. Obviously this only an issue in a development environment as source safe files do not get published into production. It would still be nice not to have to "work around" this problem.
     
    Let me rephrase Conrad's statement, '...I suggest that you modify your code so that you don't attempt to parse .SCC files as XML documents... ' if I may...
     
    Will there be any plans to modify your code so that you don't attempt to parse .SCC files?
View as RSS news feed in XML