Window Form App

Topics: Developer Forum, Project Management Forum, User Forum
Dec 15, 2007 at 9:23 AM
Hello All,
I installed the LiveChat on website and it works great!
I love it.
However, I could not get the Window form application to work.
That Operator Console, I built and deployed to install on my window os.
I looked into app.conf, and I only saw the username wspass, I am wondering what is the password? It asked for username and password.
and I got an error when trying to login.
Please advice. Thank you in advance.
Sith
www.netweblinc.com
Coordinator
Dec 19, 2007 at 1:04 PM
Hi,

You have two ways running the back-end application on your server : through memory (server's cache) or through SQL Server. Those options are configured in the web.config of the web application. You have to set the three main application blocks wich are RequestProvider, OperatorProvider and ChatProvider.

If you choose to use the MemoryProvider :

- This provider only supports one operator (for the moment). The username and password for this operator is set in the web.config on the OperatorProvider section.

If you choose the SQL Provider :

- You have to manually create an operator in the SQL table LiveChat_Operators. This providers supports multiple operators.

Regarding the key "wspass". This is just a simple key to validate the communication between the operator console and the web services. You may change this value in the app.config of the operator console (or when starting the console, click on Configuration at the lower left, and you will be able to enter the web service url wich is similar to http://www.yourdomain.com/LiveChat/Operator.asmx and you may enter the web service key. That key should be the same as the one on your web.config file on the web application.

I suggest you change this value to something more specific to you. It will prevent outside call to your web services.

I hope this help, do not hesitate if you have more specific questions.

Dominic
Dec 20, 2007 at 1:40 AM
Thank you Dominic for your helps.
It shed some lights now.
I decided to use the sqlProvider.
I run the scripts to installs all the table to my database, create a username and password for operator.
However, when I try login the operator console it did not let me in, In stread it gave a big white screen of error meesage.
Saying unhandled exception.

My question is: How do we specify which provider to use? Do we have to change something in the webconfig file beside adding
connection string?

I remeber specified the url for web services for the operator console.

Thank you in advance, please help.

Sith
Dec 20, 2007 at 2:21 AM
Hello Domenic,
I have another important question.
How do you set "three main application blocks" which you mentioned earliers?
I am a newbie in web development, I would be helpful if you could show specific example.
Thanks,

Sith

sithkong wrote:
Hello All,
I installed the LiveChat on website and it works great!
I love it.
However, I could not get the Window form application to work.
That Operator Console, I built and deployed to install on my window os.
I looked into app.conf, and I only saw the username wspass, I am wondering what is the password? It asked for username and password.
and I got an error when trying to login.
Please advice. Thank you in advance.
Sith
www.netweblinc.com


Coordinator
Dec 20, 2007 at 12:36 PM
Hi Sith,

Sure here is the needed configuration to enable the SqlProvider :

The first things you need to do is set the defaultProvider value of each Providers on your web.config file of the web application :
I have bolded the value you should set :

<requestService defaultProvider="SqlRequestProvider">
<providers>
<add name="MemoryRequestProvider" type="MemoryRequestProvider" />
<add name="SqlRequestProvider" type="SqlRequestProvider" connectionStringName="LiveChatSK"/>
</providers>
</requestService>
<operatorService defaultProvider="SqlOperatorProvider">
<providers>
<add name="MemoryOpratorProvider" type="MemoryOperatorProvider" opName="operator" opPassword="operator" opEmail="op@company.com" />
<add name="SqlOperatorProvider" type="SqlOperatorProvider" connectionStringName="LiveChatSK"/>
</providers>
</operatorService>
<chatService defaultProvider="SqlChatProvider">
<providers>
<add name="MemoryChatProvider" type="MemoryChatProvider" />
<add name="SqlChatProvider" type="SqlChatProvider" connectionStringName="LiveChatSK"/>
</providers>
</chatService>

The next step is to ensure you have run the SQL scripts to create the SQL tables and stored procedures. The file is included in the Database folder of the source code release.

In the web.config ensure that the connection string is correct for your SQL Server :

<connectionStrings>
<add name="LiveChatSK" connectionString="Your connection string here" />
</connectionStrings>

The last step in the web.config is to change the service key :

<add key="WSUser" value="insert your service key here"/>

Create one or more operator in the SQL table.

On the operator console, make sure the webservice url and the service key are correct. Enter the operator username and password.

You should be able to view online visitor and accept chat requests.

Do not hesitate to post any error messages you get. Regarding your big error message, make sure that the first line is not "Access is denied". This occurs if you are not using the same service key that is present in your web.config file on your website.

Hope this help

Dominic
Dec 21, 2007 at 11:10 PM

sithkong wrote:
Hello All,
I installed the LiveChat on website and it works great!
I love it.
However, I could not get the Window form application to work.
That Operator Console, I built and deployed to install on my window os.
I looked into app.conf, and I only saw the username wspass, I am wondering what is the password? It asked for username and password.
and I got an error when trying to login.
Please advice. Thank you in advance.
Sith
www.netweblinc.com



Thank you Dominic,
It is working perfect now!
http://netweblinc.com/index.aspx
Thank you for developing such a useful application.
Sith