=================================================================
   ZChat (Web Forms edition) Install Verification Checklist
=================================================================

Use this checklist after installing the Web Forms edition. It proves
the installer, database, agent web console, and visitor chat widget
are all actually working -- not just that pages return HTTP 200.

The examples below assume you published Web\ at:
  http://localhost:5050

Replace that with your own site URL.

=================================================================
   0. Try It Locally First (optional)
=================================================================

You do not need a full IIS site to evaluate this package. IIS Express
can serve the Web folder directly:

  "C:\Program Files\IIS Express\iisexpress.exe" ^
     /path:"<full path to>\zchat_install_webform\Web" /port:5050 /clr:v4.0

Notes:
  - IIS Express registers "localhost" only. http://127.0.0.1:5050
    returns HTTP 400 (host header mismatch) -- use localhost.
  - Ports below 1024 and a handful of others are blocked by browsers.
    5050 is known to work.

=================================================================
   1. Run The Installer
=================================================================

Create a blank database on your SQL Server first, then open:

  http://localhost:5050/

Expected result:
  - The site reports "Requires Installation" and offers "Install ZChat".
  - The installer page (install/init.aspx) loads with a connection
    string box and admin username/password fields.
  - "Test Connection" reports "ConnectionString Test Succeed!".
  - Submitting creates the schema and the admin account, then lands on
    install/done.aspx: "Installation Completed!".

The installer writes the connection string into Web.config for you.
A shipped Web.config must NOT already contain a ConnectionString key.

After it completes, delete the Web\install folder.

=================================================================
   2. Sign In To The Dashboard
=================================================================

Open:

  http://localhost:5050/dashboard

Sign in with the admin account you created in step 1.

Expected result:
  - login.aspx accepts the credentials and redirects to
    dashboard/Home.aspx.
  - The Account Console loads with the Chat Agents, Deployment and
    General Settings sections in the left navigation.

=================================================================
   3. Check The Agent Web Console  <-- the one that catches gutted packages
=================================================================

Open:

  http://localhost:5050/webconsole/

Expected result:
  - The loader runs to 100% AND THEN the console UI appears:
    a "Departments/Agents" tree, a "Request Queue" panel reading
    "Request Queue is Empty.", and a "Current Visitors" grid.

If it sticks at "Loading ZChat Agent Console ... 100%" forever, open
the browser console. Errors like:

    TEXT_CS_TITLE_DEPARTMENTS is not defined
    TEXT_CS_LABEL_JTABLEEMPTY is not defined

mean the localization string table is empty. Check:

  http://localhost:5050/webconsole/settings.aspx

If its __cc_strings object contains only "__end", then
Web\livechat2\Languages is empty or missing. That folder is where
ChatSystem.CombineApplicationPath("Languages") resolves to, and the
console cannot start without it. Restore the .xml files.

=================================================================
   4. Check The Visitor Widget
=================================================================

Open the bundled visitor demo page:

  http://localhost:5050/demo/demo1.htm

Expected result:
  - The page loads AND the chat widget renders in the corner. With no
    agent signed in you should see the offline "Leave a message" form;
    with an agent online in the web console you get the chat prompt.

If nothing renders, check the network tab for:

  livechat2/resources2.aspx?HCCID=...  -> 500 Internal Server Error

Opening that URL directly shows the underlying error. A
FileNotFoundException for livechat2\script\newlib2.js means
Web\livechat2\script is empty or missing -- restore the .js files.

=================================================================
   5. End-To-End Chat
=================================================================

With the web console open and the agent online, start a chat from the
demo page.

Expected result:
  - The visitor appears in the console's Request Queue.
  - Accepting it opens a chat tab.
  - Messages arrive in both directions.

=================================================================
   6. Production Readiness Checks
=================================================================

Before production:

  - Delete the Web\install folder.
  - Serve the site over HTTPS, or uncheck "Use secure connection for
    chat (https)" in the desktop Agent Console's Options before
    signing in (see READ_ME.txt).
  - Keep Web\App_Data\zchat.lic in place.
  - Confirm Web.config's ConnectionString points at your real database.
