<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://techwiki.neosys.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Steve</id>
	<title>NEOSYS Technical Support Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://techwiki.neosys.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Steve"/>
	<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php/Special:Contributions/Steve"/>
	<updated>2026-05-29T18:12:53Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.3</generator>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=EXODUS_Knowledge&amp;diff=3969</id>
		<title>EXODUS Knowledge</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=EXODUS_Knowledge&amp;diff=3969"/>
		<updated>2022-03-16T15:41:33Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Single Patches */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==TMUX Screens==&lt;br /&gt;
&lt;br /&gt;
To create the EXODUS maintenance/programming environment&lt;br /&gt;
 exodus#: ./tmux.exodus&lt;br /&gt;
&lt;br /&gt;
===Screens===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0: /&lt;br /&gt;
    Work regarding exodus server. i.e /etc/nagios or general networking or /var/log/mail.log&lt;br /&gt;
&lt;br /&gt;
1: /root/exodus/&lt;br /&gt;
    Exodus core is installed Contains build and make libraries here ./libexodus&lt;br /&gt;
&lt;br /&gt;
2: /root/exodus/libexodus/exodus&lt;br /&gt;
    Core exodus (libraries that emulate the AREV system e.g mv.h )&lt;br /&gt;
    &lt;br /&gt;
3: /root/exodus/cli/src&lt;br /&gt;
    Exodus Command Line Interface e.g edir, edic, list, listfiles, delete, createdb&lt;br /&gt;
    &lt;br /&gt;
4: root/exodus/service&lt;br /&gt;
    EXODUS core default host directory but also contains scripts that create/manage requirements of a service (create_service, create_db, create_site, backup_db, restore_db, start, stop, status)&lt;br /&gt;
    One exception is NEOSYS www files are in ./www, which pulled from NEOSYS www git.&lt;br /&gt;
&lt;br /&gt;
5: /root/exodus/service/src&lt;br /&gt;
    Exodus core service programs (programs that are not related to NEOSYS agency operations and can be used to support other non-NEOSYS services) eg listen, usersubs, sendmail, openfile, select, sort, list,.&lt;br /&gt;
&lt;br /&gt;
    Extra info:    &lt;br /&gt;
    sql directory contains basic dictiorary files converted to sql instructions used when creating a EXODUS psql database&lt;br /&gt;
    e.g dict_voc.sql is a file that describes what to expect in certain fields of the voc file.&lt;br /&gt;
    TODO: compall currently throws few warnings. Read them and familiarise. In case new warnings appear, notify Steve.    &lt;br /&gt;
        &lt;br /&gt;
6: /root/neosys&lt;br /&gt;
    NEOSYS specific client installation management scripts e.g .doall, import_db and import_files (from AREV), ./run ./test (see below for these two commands)&lt;br /&gt;
    &lt;br /&gt;
7: /root/neosys/src&lt;br /&gt;
    NEOSYS Agency programs (see section How AREV programs are distributed in EXODUS src/*.cpp&lt;br /&gt;
    ../ has .git&lt;br /&gt;
&lt;br /&gt;
8: /root/hosts&lt;br /&gt;
    client specific files  e.g logs, images, (shared ./www -&amp;gt; root/exodus/service/www&lt;br /&gt;
&lt;br /&gt;
9: /root/exodus/test/src&lt;br /&gt;
    series of programs that test whether subroutines (specifically Exodus core libraries) work as they should eg for the var lib - &amp;quot;assert( var(&amp;quot;11111&amp;quot;).isnum());&amp;quot;&lt;br /&gt;
&lt;br /&gt;
10: bash /bin/top&lt;br /&gt;
    Monitor for NEOSYS client processes&lt;br /&gt;
    Displays customised format: sorted by total time spend and by processor time.&lt;br /&gt;
     Press &amp;quot;=&amp;quot; : to change to standard top format&lt;br /&gt;
     Press shift + w : to save format settings, replacing the old customised top format&lt;br /&gt;
     To go back to the customised format do:&lt;br /&gt;
        Press &amp;quot;o&amp;quot;&lt;br /&gt;
        Type &amp;quot;COMMAND=serve_agy&amp;quot;&lt;br /&gt;
        shift + t : this sorts by total time spent&lt;br /&gt;
        shift + p : this sorts by processor time&lt;br /&gt;
        shift + w : to save this setting and enter  &#039;y&#039; to confirm&lt;br /&gt;
&lt;br /&gt;
11: /var/log/syslog&lt;br /&gt;
     Log of NEOSYS client requests&lt;br /&gt;
&lt;br /&gt;
12: /root/exodus/service/quick&lt;br /&gt;
     Displays the last time the svr file (in /root/hosts/&amp;lt;client&amp;gt;/data/&amp;lt;dbname&amp;gt;) was updated.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Object Code/Libraries==&lt;br /&gt;
LIVE and TEST processes use different sets of object code.&lt;br /&gt;
TEST processes use libraries in ~/lib/, whereas LIVE processes use object code in ~/neo/lib&lt;br /&gt;
&lt;br /&gt;
This means development &amp;amp; testing can be done stress free on TEST database, as opposed to testing on production databases.&lt;br /&gt;
&lt;br /&gt;
When compiling using edic, the TEST object code is updated if the compilation is successful. (~/lib)&lt;br /&gt;
In order to apply a tested patch to LIVE see [[Update LIVE programs]].&lt;br /&gt;
&lt;br /&gt;
==Dictionaries==&lt;br /&gt;
Dictionaries, the files used to describe the fields of a file&#039;s record.&lt;br /&gt;
Unlike in AREV, there is a copy of all dictionaries in each pgsql database (In AREV, updating a dictionary would affect all the databases).&lt;br /&gt;
&lt;br /&gt;
==Processes==&lt;br /&gt;
The TEST process for all database use the same object code stored in /root/lib, whereas all LIVE process use the object code in /root/neo/.&lt;br /&gt;
&lt;br /&gt;
==Postgres==&lt;br /&gt;
Connect into postgres shell:&lt;br /&gt;
 alias psql=&#039;sudo -u postgres psql&#039;&lt;br /&gt;
&lt;br /&gt;
Delete a database:&lt;br /&gt;
 sudo -u postgres dropdb &amp;lt;dbcode&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Debugging Exodus==&lt;br /&gt;
&lt;br /&gt;
===Debugging Live/Test services===&lt;br /&gt;
&lt;br /&gt;
./test &amp;lt;dbname&amp;gt; - execute test programs on _test database.&lt;br /&gt;
&lt;br /&gt;
./run &amp;lt;dbname&amp;gt;  - execute test programs on live database.&lt;br /&gt;
&lt;br /&gt;
===Debugging var values===&lt;br /&gt;
&lt;br /&gt;
Explanation of var flag value in gdb debug mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(gdb) p varx                                                           &lt;br /&gt;
$2 = {var_str = &amp;quot;&amp;quot;, var_int = 0, var_dbl = 0, var_typ = {flags_ = 2}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each exodus var object contains 3 variables of type string, int and double.&lt;br /&gt;
&lt;br /&gt;
All 3 may be unassigned or only the string be assigned or just the int and double e.t.&lt;br /&gt;
&lt;br /&gt;
You can tell which variable type of a var object are set based on the var&#039;s flag value.&lt;br /&gt;
&lt;br /&gt;
1 = Means the string is assigned&lt;br /&gt;
2 = Means the int is assigned&lt;br /&gt;
4 = Means the double is assigned&lt;br /&gt;
&lt;br /&gt;
Example: If the flag is 7 (1+2+4), then all types are assigned.&lt;br /&gt;
&lt;br /&gt;
===Process Hung or consuming +100% CPU===&lt;br /&gt;
If process is consuming +100% CPU then it is likely stuck in an infinite loop.&lt;br /&gt;
&lt;br /&gt;
 ./doall &amp;lt;CLIENT&amp;gt; stop&lt;br /&gt;
&lt;br /&gt;
 ./run &amp;lt;CLIENT&amp;gt; &lt;br /&gt;
&lt;br /&gt;
 ./test &amp;lt;CLIENT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Search through recent logs for &amp;lt;CLIENT&amp;gt; looking for requests that didn&#039;t return OK at the time nagios alerted of Hung process.&lt;br /&gt;
&lt;br /&gt;
A user may also instigate the error again, so monitor the CLIENT&#039;s service CPU usage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If cause found recreate it in test and once test process hit +100% break in test debugger.&lt;br /&gt;
&lt;br /&gt;
If cause not found, you will have to continue checking logs for the request that caused it or hope a user recreates the issue in live debugged service.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you&#039;ve broken in the debugged with the error, enter &amp;quot;n&amp;quot; and hold the enter key until you just seeing line repeat.&lt;br /&gt;
&lt;br /&gt;
Pay attention to start of loops code. E.g WHILE or FOR. (there is likely an error is there)&lt;br /&gt;
&lt;br /&gt;
==./doall==&lt;br /&gt;
====General====&lt;br /&gt;
&lt;br /&gt;
~/neosys/doall [LIVE|TEST] &amp;lt;DBCODE|ALL&amp;gt; &amp;lt; ACTION [OPTIONS,..]  | bash -- COMMAND ]&lt;br /&gt;
&lt;br /&gt;
Example: &lt;br /&gt;
 ./doall TEST ALL create_site t-&lt;br /&gt;
Result:&lt;br /&gt;
Create site for ALL TEST databases, using domain name prefix option &amp;quot;t-&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Screen 6: ./doall script contains all the necessary information(codes) to setup an installation.&lt;br /&gt;
It includes scripts to backup, restore, create an Apache site, create/start/stop/status a service, import an AREV database into postgres and more.&lt;br /&gt;
&lt;br /&gt;
====backup_db====&lt;br /&gt;
&lt;br /&gt;
*Does a backup &amp;amp; restore of a LIVE database into the corresponding TEST database.&lt;br /&gt;
*Backup &amp;lt;dbcode&amp;gt;.sql file is written to /root/backups/sql; which is rsynced to nl19:/backups/current/exodus/&lt;br /&gt;
*Unlike AREV, postgres can perform a &amp;quot;backup&amp;quot; of a database whilst the system is in use.&lt;br /&gt;
&lt;br /&gt;
==Git==&lt;br /&gt;
&lt;br /&gt;
There are two repositories, one for EXODUS and the other for NEOSYS.&lt;br /&gt;
&lt;br /&gt;
===Using git to make changes===&lt;br /&gt;
&lt;br /&gt;
Before following steps you must have a tested updated to a program/file/script. Do not commit untested changes to avoid a messy git history of reverts.&lt;br /&gt;
&lt;br /&gt;
Update your local repo before committing to local repo using the g alias for &amp;quot;git pull --ff-only ; git push &amp;amp;&amp;amp; git status&#039;&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;g&amp;lt;/pre&amp;gt;&lt;br /&gt;
Check which updates/files have not yet been staged and/or committed:&lt;br /&gt;
Add your updates to the staged area:&lt;br /&gt;
&amp;lt;pre&amp;gt;git add &amp;lt;filename&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
or if all the changes made need to be staged:&lt;br /&gt;
&amp;lt;pre&amp;gt;git add -a&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make a commit with a descriptive message on purpose of updates:&lt;br /&gt;
&amp;lt;pre&amp;gt;git commit -m &amp;lt;description n purpose of changes&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Again use g alias:&lt;br /&gt;
&amp;lt;pre&amp;gt;g&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Other useful git cmds===&lt;br /&gt;
&lt;br /&gt;
Do not use this commands unless you know what WILL happen. &lt;br /&gt;
*git pull - Instead use the safe &amp;quot;git pull --ff-only&amp;quot;&lt;br /&gt;
Stick to the alias &amp;quot;g&amp;quot; which does &amp;quot;git pull --ff-only ; git push &amp;amp;&amp;amp; git status&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*git log - display history of commits to master branch&lt;br /&gt;
*git diff - display the differences in files between working files and files in local repo.&lt;br /&gt;
*git status - display: which updated files are staged/not staged(tracked)&lt;br /&gt;
*git stash - &lt;br /&gt;
*git branch - switch to a new branch&lt;br /&gt;
*git branch &amp;lt;branchname&amp;gt; - will switch to this branch only if it exists&lt;br /&gt;
*git checkout - DESTROYS/Updates the state of local working directory with the state of the files in the local repo. (YOU WILL LOSE non staged updates)&lt;br /&gt;
*git restore &amp;lt;filename&amp;gt; - DESTROYS/Updates the file with the version in the local repo. (like with git checkout but for a specific file)&lt;br /&gt;
*git checkin - &lt;br /&gt;
*git revert &amp;lt;commitHash&amp;gt; - reverses a specific commit (use git log to get the chosen commit hash)&lt;br /&gt;
*git ..&lt;br /&gt;
&lt;br /&gt;
==Converting AREV programs to EXODUS==&lt;br /&gt;
===Decompile AREV to C++===&lt;br /&gt;
&lt;br /&gt;
Do in Master AREV Installation Maintenance mode: (win7)&lt;br /&gt;
&lt;br /&gt;
#ATTACH ADECOMC &lt;br /&gt;
#*ADECOM &amp;lt;programname&amp;gt;   *single program&lt;br /&gt;
#*ADECOM &amp;lt;prog1&amp;gt; &amp;lt;prog2&amp;gt; &lt;br /&gt;
#*ADECOMALL              *all programs   (CHECK FIRST)&lt;br /&gt;
&lt;br /&gt;
Include the option &amp;quot;(V)&amp;quot; in the command to print the C++ to a notepad, which can easily be copy and pasted.&lt;br /&gt;
&lt;br /&gt;
===Getting C++ program to Exodus Installation===&lt;br /&gt;
&lt;br /&gt;
Two methods: (use the first for one off programs)&lt;br /&gt;
&lt;br /&gt;
====Copy &amp;amp; Paste====&lt;br /&gt;
&lt;br /&gt;
Compile program and open source code in notepad&lt;br /&gt;
&lt;br /&gt;
 ADECOM &amp;lt;programname&amp;gt; (V)&lt;br /&gt;
&lt;br /&gt;
Find which directory the program belongs. e.g fin/med/job/sys e.t&lt;br /&gt;
&lt;br /&gt;
 find /cygdrive/d/exodus/pickos | grep &amp;lt;program name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If cpp in SYS, the program belongs in ~/exodus/service/src OR if in MED JOB FIN GEN AGY the program belongs in ~/neosys/src&lt;br /&gt;
&lt;br /&gt;
Copy the source code in the text file from the first command.&lt;br /&gt;
&lt;br /&gt;
In Exodus, create a new .cpp (in correct directory) and paste the source code.&lt;br /&gt;
&lt;br /&gt;
Compile &amp;amp; Test&lt;br /&gt;
&lt;br /&gt;
====Rsync====&lt;br /&gt;
&lt;br /&gt;
 /d/exodus/arev/syncup.sh&lt;br /&gt;
&lt;br /&gt;
If cpp in SYS then: ~/exodus/service/src ./getpickos&lt;br /&gt;
&lt;br /&gt;
If cpp in MED JOB FIN GEN AGY then: *~/neosys/src&lt;br /&gt;
&lt;br /&gt;
===Compile C++ files to TEST system===&lt;br /&gt;
&lt;br /&gt;
#*./test &amp;lt;DBNAME&amp;gt;&lt;br /&gt;
#*~/neosys ./doall TEST &amp;lt;DBNAME&amp;gt; restart    #to get one service to start start using the new lib files&lt;br /&gt;
#*~/neosys ./doall TEST all restart         #to get all the services to start start using the new lib files&lt;br /&gt;
&lt;br /&gt;
===Install C++ files to LIVE System===&lt;br /&gt;
&lt;br /&gt;
#~/exodus/service/ ./copyall            #to copy all the ~/lib and bin files to ~/live/lib and bin ... which is used by all exodus/live services&lt;br /&gt;
&lt;br /&gt;
==Writing Standard Exodus Core Function/Method Testing==&lt;br /&gt;
Screen 9: ~/exodus/test/src/&lt;br /&gt;
There are a series of test programs that check whether methods/functions behave as intended.&lt;br /&gt;
They do this using the function, assert.. a 1 or more argument values produce one and only one output)&lt;br /&gt;
&lt;br /&gt;
e.g test_multilang.cpp or test_sort.cpp&lt;br /&gt;
&lt;br /&gt;
Two methods of running test programs:&lt;br /&gt;
*Screen 9: make test&lt;br /&gt;
*after compiling using edic/compile/c, enter test_prog_name. (Since compile has moved it to ~/bin)&lt;br /&gt;
&lt;br /&gt;
Difference between the two methods is make calls gdb directly;&lt;br /&gt;
whereas ~/bin/test_prog_name uses exodus compile program&lt;br /&gt;
#~/neosys ./doall LIVE all restart&lt;br /&gt;
&lt;br /&gt;
==Updating a pgsql function in an exodus dictionary==&lt;br /&gt;
&lt;br /&gt;
PENDING&lt;br /&gt;
&lt;br /&gt;
==Development and deployment using &#039;dat&#039; files==&lt;br /&gt;
&lt;br /&gt;
===Rationale===&lt;br /&gt;
&lt;br /&gt;
Part of system development is the creation of various data that is neither programs nor layout i.e. not cpp, h, html, js, php files etc.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
*Dictionaries are data about data.&lt;br /&gt;
*Language files are data about text to use for various languages.&lt;br /&gt;
*“Change logs” are data about changes in the system.&lt;br /&gt;
&lt;br /&gt;
Historically, in EXODUS and NEOSYS, the above data has been deployed in exodus database files using SQL text files. However SQL files are not convenient for development.&lt;br /&gt;
&lt;br /&gt;
Therefore, &#039;dat&#039; text files will be used now so that standard development tools including editors and git can be fully exploited.&lt;br /&gt;
&lt;br /&gt;
===&#039;dat&#039; files===&lt;br /&gt;
&lt;br /&gt;
Each database file is represented by an os directory of the same name.&lt;br /&gt;
&lt;br /&gt;
Each record in the database file is represented by an os text file where filename is the primary key.&lt;br /&gt;
&lt;br /&gt;
For example a record with key &#039;&#039;&#039;DEADLINE&#039;&#039;&#039; in a dat file &#039;&#039;&#039;dict.materials&#039;&#039;&#039; would be represented as an os text file &#039;&#039;&#039;dat/dict.materials/DEADLINE&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Each line in the os text file represents one field in the db record. In other words, db record FM characters are represented by new line characters in &#039;dat&#039; files. Any actual new line characters required in the record, and any backslashes, are escaped and appear as &#039;\n&#039; and &#039;\\&#039; in &#039;dat&#039; files. Other database field separator characters such as VM, SM, TM and STM are stored without any conversion.&lt;br /&gt;
&lt;br /&gt;
===Location of dat files===&lt;br /&gt;
&lt;br /&gt;
The development versions are stored in exodus and neosys src/dat dirs. They form part of the standard git repositories in parallel with cpp files.&lt;br /&gt;
&lt;br /&gt;
The operational versions are stored in ~/dat and ~/live/dat alongside bin and lib dirs and are automatically installed into databases as database files on service startup. Any database functions embedded in the text files (pgsql) are also automatically installed at the same time.&lt;br /&gt;
&lt;br /&gt;
===Editing and deploying a &#039;dat&#039; file===&lt;br /&gt;
&lt;br /&gt;
It is currently a three step process to edit and deploy such &#039;dat&#039; files. &lt;br /&gt;
&lt;br /&gt;
====Edit the &#039;dat&#039; file====&lt;br /&gt;
&lt;br /&gt;
Note that EXODUS service and NEOSYS service have different src/dat folders.&lt;br /&gt;
&lt;br /&gt;
Editing language items:&lt;br /&gt;
&lt;br /&gt;
 edir dat/alanguage/SCHEDULES*ARABIC&lt;br /&gt;
&lt;br /&gt;
Editing a dictionary item:&lt;br /&gt;
&lt;br /&gt;
 edir dat/dict.materials/DEADLINE&lt;br /&gt;
&lt;br /&gt;
Editing a pgsql function in a dictionary:&lt;br /&gt;
&lt;br /&gt;
 edir dat/dict.materials/DEADLINE 8&lt;br /&gt;
&lt;br /&gt;
====Copy all &#039;dat&#039; files to ~/dat ====&lt;br /&gt;
&lt;br /&gt;
This step might be removed at a later date.&lt;br /&gt;
&lt;br /&gt;
This will cause all test databases to immediately restart and load any &#039;dat&#039; file changes into dictionaries and data files and also create any new or modified pgsql functions.&lt;br /&gt;
&lt;br /&gt;
If any ~/neosys/src/dat files were edited:&lt;br /&gt;
&lt;br /&gt;
 cd ~/neosys/src&lt;br /&gt;
 &lt;br /&gt;
 ./compall dat&lt;br /&gt;
&lt;br /&gt;
and/or, if exodus/service/dat files were edited&lt;br /&gt;
&lt;br /&gt;
 cd ~/exodus/service/src&lt;br /&gt;
 &lt;br /&gt;
 ./compall dat&lt;br /&gt;
&lt;br /&gt;
====Copy all programs and &#039;dat&#039; files to ~/live/bin|lib|dat====&lt;br /&gt;
&lt;br /&gt;
This should only be run after testing. It will cause all live databases to automatically restart and do the same as the test databases mentioned above.&lt;br /&gt;
&lt;br /&gt;
 cd ~/exodus/service&lt;br /&gt;
 &lt;br /&gt;
 ./copyall CONFIRM&lt;br /&gt;
​&lt;br /&gt;
&lt;br /&gt;
==Upgrading Exodus==&lt;br /&gt;
&lt;br /&gt;
#Develop patch in Dev system &lt;br /&gt;
&lt;br /&gt;
===Single Patches===&lt;br /&gt;
&lt;br /&gt;
#Insert patches into various files and compile if necessary&lt;br /&gt;
#If patch dat files then run neosys compall to get dat files into ~/dat&lt;br /&gt;
*If Patsalides:&lt;br /&gt;
*#SITE_DIR=ptcy ./test basic  #requires /etc/systemd/system/agy_test@.service to have been patched like agy_live@.service&lt;br /&gt;
*#web login to BASIC_TEST to test&lt;br /&gt;
*If not patsalides&lt;br /&gt;
*#./test DBCODE&lt;br /&gt;
*#login to DBCODE and test&lt;br /&gt;
#If all ok&lt;br /&gt;
#./copyall &lt;br /&gt;
#CHECK what WILL be copied!&lt;br /&gt;
#Judge if really need to get people off (unlikely for typical patch) and request users to logout for 10 mins&lt;br /&gt;
#./copyall CONFIRM and CHECK what was copied is as per exceptions same as previous step&lt;br /&gt;
#./copyone could be used instead of copyall but it has no test mode and does not copy dat files&lt;br /&gt;
&lt;br /&gt;
===Upgrading to new version===&lt;br /&gt;
&lt;br /&gt;
Use when there are too many changes to do individually patches.&lt;br /&gt;
&lt;br /&gt;
#Inform clients.&lt;br /&gt;
#*Client hosted - Schedule a planned upgrade with client.&lt;br /&gt;
#*NEOSYS hosted - Inform all clients/users of planned morning upgrade, 24hours in advanced.      (TODO: &#039;What&#039;s New in NEOSYS&#039;) AND (emailallusers.cpp)&lt;br /&gt;
#If the morning&#039;s USB backup failed, do NOT continue upgrade procedure because if upgrade fails, we need a way to roll back system to last working state.&lt;br /&gt;
#Check upgrade works on test service using:/root/neosys/upgrade.all.sh test&lt;br /&gt;
#Check the latest patch is working.&lt;br /&gt;
#Run/root/neosys/upgrade.all.sh live&lt;br /&gt;
#Inform users their system has been upgraded and they can login.&lt;br /&gt;
&lt;br /&gt;
===Roll Back Upgrade===&lt;br /&gt;
&lt;br /&gt;
If for any reason the entire upgrade needs to be reverted (excludes clients database), follow steps below:&lt;br /&gt;
&lt;br /&gt;
#Inform users that there is a problem and services need to be stopped.&lt;br /&gt;
#Stop all exodus processes.&lt;br /&gt;
#Restore the morning&#039;s USB backup by: (Note this backup contains:  source/obj code, /etc, neosys scripts but not client data)&lt;br /&gt;
##Login into container&#039;s host and rsync the morning&#039;s usb backup to the container&#039;s /:&lt;br /&gt;
#*&amp;lt;pre&amp;gt;rsync --dry-run -avz -e &#039;ssh -p &amp;lt;C_SSHPORT&amp;gt;&#039; /backups/usb/&amp;lt;C_CODE&amp;gt; &amp;lt;C_CODE&amp;gt;:/      (Example: rsync --dry-run -avz -e &#039;ssh -p 19582&#039; /backups/usb/ad1 ad1:/&amp;lt;/pre&amp;gt;)&lt;br /&gt;
#Quick sane check, the latest git commit is not the latest git commit in the remote repo.&lt;br /&gt;
#Inform users they can login.&lt;br /&gt;
&lt;br /&gt;
==Configuring services to autostart during login==&lt;br /&gt;
For Ptcy.&lt;br /&gt;
&lt;br /&gt;
#Create a file &#039;autostart.cfg&#039; in the data folder &lt;br /&gt;
&lt;br /&gt;
 touch /root/hosts/&amp;lt;dbname&amp;gt;/data/autostart.cfg&lt;br /&gt;
&lt;br /&gt;
This will autostart a database service as long as at least one database service in that directory is running.&lt;br /&gt;
&lt;br /&gt;
For example, demo service will autostart during login if,&lt;br /&gt;
#/root/hosts/demo/data/autostart.cfg exists and&lt;br /&gt;
#demo_test service is running&lt;br /&gt;
&lt;br /&gt;
==Speedup postgresql importing databases==&lt;br /&gt;
&lt;br /&gt;
Can be sped up by a factor of 10 BUT may result in corrupt files in case of hard OS crash where the dirty memory is not flushed to storage.&lt;br /&gt;
&lt;br /&gt;
Therefore it is advisable to use this feature only briefly and REMEMBER TO REMOVE IT! &lt;br /&gt;
&lt;br /&gt;
Email to support@neosys.com whenever using it or use personal notes not memory.&lt;br /&gt;
&lt;br /&gt;
nano /etc/postgresql/12/main/postgresql.conf&lt;br /&gt;
&lt;br /&gt;
Uncomment or add a line&lt;br /&gt;
 fsync = off&lt;br /&gt;
Restart postgres … will break any neosys/exodus running processes.&lt;br /&gt;
 r postgresql&lt;br /&gt;
or reload postgres may also work&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=EXODUS_Knowledge&amp;diff=3919</id>
		<title>EXODUS Knowledge</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=EXODUS_Knowledge&amp;diff=3919"/>
		<updated>2021-12-22T10:49:15Z</updated>

		<summary type="html">&lt;p&gt;Steve: compall gets new option to skip compilation and only copy dat files&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==TMUX Screens==&lt;br /&gt;
&lt;br /&gt;
To create the EXODUS maintenance/programming environment&lt;br /&gt;
 exodus#: ./tmux.exodus&lt;br /&gt;
&lt;br /&gt;
===Screens===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0: /&lt;br /&gt;
    Work regarding exodus server. i.e /etc/nagios or general networking or /var/log/mail.log&lt;br /&gt;
&lt;br /&gt;
1: /root/exodus/&lt;br /&gt;
    Exodus core is installed Contains build and make libraries here ./libexodus&lt;br /&gt;
&lt;br /&gt;
2: /root/exodus/libexodus/exodus&lt;br /&gt;
    Core exodus (libraries that emulate the AREV system e.g mv.h )&lt;br /&gt;
    &lt;br /&gt;
3: /root/exodus/cli/src&lt;br /&gt;
    Exodus Command Line Interface e.g edir, edic, list, listfiles, delete, createdb&lt;br /&gt;
    &lt;br /&gt;
4: root/exodus/service&lt;br /&gt;
    EXODUS core default host directory but also contains scripts that create/manage requirements of a service (create_service, create_db, create_site, backup_db, restore_db, start, stop, status)&lt;br /&gt;
    One exception is NEOSYS www files are in ./www, which pulled from NEOSYS www git.&lt;br /&gt;
&lt;br /&gt;
5: /root/exodus/service/src&lt;br /&gt;
    Exodus core service programs (programs that are not related to NEOSYS agency operations and can be used to support other non-NEOSYS services) eg listen, usersubs, sendmail, openfile, select, sort, list,.&lt;br /&gt;
&lt;br /&gt;
    Extra info:    &lt;br /&gt;
    sql directory contains basic dictiorary files converted to sql instructions used when creating a EXODUS psql database&lt;br /&gt;
    e.g dict_voc.sql is a file that describes what to expect in certain fields of the voc file.&lt;br /&gt;
    TODO: compall currently throws few warnings. Read them and familiarise. In case new warnings appear, notify Steve.    &lt;br /&gt;
        &lt;br /&gt;
6: /root/neosys&lt;br /&gt;
    NEOSYS specific client installation management scripts e.g .doall, import_db and import_files (from AREV), ./run ./test (see below for these two commands)&lt;br /&gt;
    &lt;br /&gt;
7: /root/neosys/src&lt;br /&gt;
    NEOSYS Agency programs (see section How AREV programs are distributed in EXODUS src/*.cpp&lt;br /&gt;
    ../ has .git&lt;br /&gt;
&lt;br /&gt;
8: /root/hosts&lt;br /&gt;
    client specific files  e.g logs, images, (shared ./www -&amp;gt; root/exodus/service/www&lt;br /&gt;
&lt;br /&gt;
9: /root/exodus/test/src&lt;br /&gt;
    series of programs that test whether subroutines (specifically Exodus core libraries) work as they should eg for the var lib - &amp;quot;assert( var(&amp;quot;11111&amp;quot;).isnum());&amp;quot;&lt;br /&gt;
&lt;br /&gt;
10: bash /bin/top&lt;br /&gt;
    Monitor for NEOSYS client processes&lt;br /&gt;
    Displays customised format: sorted by total time spend and by processor time.&lt;br /&gt;
     Press &amp;quot;=&amp;quot; : to change to standard top format&lt;br /&gt;
     Press shift + w : to save format settings, replacing the old customised top format&lt;br /&gt;
     To go back to the customised format do:&lt;br /&gt;
        Press &amp;quot;o&amp;quot;&lt;br /&gt;
        Type &amp;quot;COMMAND=serve_agy&amp;quot;&lt;br /&gt;
        shift + t : this sorts by total time spent&lt;br /&gt;
        shift + p : this sorts by processor time&lt;br /&gt;
        shift + w : to save this setting and enter  &#039;y&#039; to confirm&lt;br /&gt;
&lt;br /&gt;
11: /var/log/syslog&lt;br /&gt;
     Log of NEOSYS client requests&lt;br /&gt;
&lt;br /&gt;
12: /root/exodus/service/quick&lt;br /&gt;
     Displays the last time the svr file (in /root/hosts/&amp;lt;client&amp;gt;/data/&amp;lt;dbname&amp;gt;) was updated.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Object Code/Libraries===&lt;br /&gt;
LIVE and TEST processes use different sets of object code.&lt;br /&gt;
TEST processes use libraries in ~/lib/, whereas LIVE processes use object code in ~/neo/lib&lt;br /&gt;
&lt;br /&gt;
This means development &amp;amp; testing can be done stress free on TEST database, as opposed to testing on production databases.&lt;br /&gt;
&lt;br /&gt;
When compiling using edic, the TEST object code is updated if the compilation is successful. (~/lib)&lt;br /&gt;
In order to apply a tested patch to LIVE see [[Update LIVE programs]].&lt;br /&gt;
&lt;br /&gt;
===Dictionaries===&lt;br /&gt;
Dictionaries, the files used to describe the fields of a file&#039;s record.&lt;br /&gt;
Unlike in AREV, there is a copy of all dictionaries in each pgsql database (In AREV, updating a dictionary would affect all the databases).&lt;br /&gt;
&lt;br /&gt;
===Processes===&lt;br /&gt;
The TEST process for all database use the same object code stored in /root/lib, whereas all LIVE process use the object code in /root/neo/.&lt;br /&gt;
&lt;br /&gt;
===Postgres===&lt;br /&gt;
Connect into postgres shell:&lt;br /&gt;
 sudo -u postgres psql&lt;br /&gt;
&lt;br /&gt;
List databases once in postgres shell:&lt;br /&gt;
 \l&lt;br /&gt;
&lt;br /&gt;
Delete a database:&lt;br /&gt;
 sudo -u postgres dropdb &amp;lt;dbcode&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===./doall===&lt;br /&gt;
&lt;br /&gt;
====General====&lt;br /&gt;
Screen 6: ./doall script contains all the necessary information(codes) to setup an installation.&lt;br /&gt;
It includes scripts to backup, restore, create an Apache site, create/start/stop/status a service, import an AREV database into postgres and more.&lt;br /&gt;
&lt;br /&gt;
====backup_db====&lt;br /&gt;
&lt;br /&gt;
*Does a backup &amp;amp; restore of a LIVE database into the corresponding TEST database.&lt;br /&gt;
*Backup &amp;lt;dbcode&amp;gt;.sql file is written to /root/backups/sql; which is rsynced to nl19:/backups/current/exodus/&lt;br /&gt;
*Unlike AREV, postgres can perform a &amp;quot;backup&amp;quot; of a database whilst the system is in use.&lt;br /&gt;
&lt;br /&gt;
==Git==&lt;br /&gt;
&lt;br /&gt;
There are two repositories, one for EXODUS and the other for NEOSYS.&lt;br /&gt;
&lt;br /&gt;
===Using git to make changes===&lt;br /&gt;
&lt;br /&gt;
Before following steps you must have a tested updated to a program/file/script. Do not commit untested changes to avoid a messy git history of reverts.&lt;br /&gt;
&lt;br /&gt;
Update your local repo before committing to local repo using the g alias for &amp;quot;git pull --ff-only ; git push &amp;amp;&amp;amp; git status&#039;&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;g&amp;lt;/pre&amp;gt;&lt;br /&gt;
Check which updates/files have not yet been staged and/or committed:&lt;br /&gt;
Add your updates to the staged area:&lt;br /&gt;
&amp;lt;pre&amp;gt;git add &amp;lt;filename&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
or if all the changes made need to be staged:&lt;br /&gt;
&amp;lt;pre&amp;gt;git add -a&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make a commit with a descriptive message on purpose of updates:&lt;br /&gt;
&amp;lt;pre&amp;gt;git commit -m &amp;lt;description n purpose of changes&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Again use g alias:&lt;br /&gt;
&amp;lt;pre&amp;gt;g&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Other useful git cmds===&lt;br /&gt;
&lt;br /&gt;
Do not use this commands unless you know what WILL happen. &lt;br /&gt;
*git pull - Instead use the safe &amp;quot;git pull --ff-only&amp;quot;&lt;br /&gt;
Stick to the alias &amp;quot;g&amp;quot; which does &amp;quot;git pull --ff-only ; git push &amp;amp;&amp;amp; git status&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*git log - display history of commits to master branch&lt;br /&gt;
*git diff - display the differences in files between working files and files in local repo.&lt;br /&gt;
*git status - display: which updated files are staged/not staged(tracked)&lt;br /&gt;
*git stash - &lt;br /&gt;
*git branch - switch to a new branch&lt;br /&gt;
*git branch &amp;lt;branchname&amp;gt; - will switch to this branch only if it exists&lt;br /&gt;
*git checkout - DESTROYS/Updates the state of local working directory with the state of the files in the local repo. (YOU WILL LOSE non staged updates)&lt;br /&gt;
*git restore &amp;lt;filename&amp;gt; - DESTROYS/Updates the file with the version in the local repo. (like with git checkout but for a specific file)&lt;br /&gt;
*git checkin - &lt;br /&gt;
*git revert &amp;lt;commitHash&amp;gt; - reverses a specific commit (use git log to get the chosen commit hash)&lt;br /&gt;
*git ..&lt;br /&gt;
&lt;br /&gt;
==Converting AREV to EXODUS==&lt;br /&gt;
===Decompile AREV to C++===&lt;br /&gt;
(Do in win10a Maintenance mode)&lt;br /&gt;
&lt;br /&gt;
#Apply tested patch to win10a (master AREV Dev system)&lt;br /&gt;
#ATTACH ADECOMC &lt;br /&gt;
#*ADECOM &amp;lt;programname&amp;gt;   *single program&lt;br /&gt;
#*ADECOMALL                          *all programs   (CHECK THIS FIRST)&lt;br /&gt;
#*ADECOM &amp;lt;prog1&amp;gt; &amp;lt;prog2&amp;gt; *(CHECK IF THIS WORKS)&lt;br /&gt;
&lt;br /&gt;
===Send c++ files from win10a to nl19===&lt;br /&gt;
(Do in win10a Cygwin)&lt;br /&gt;
&lt;br /&gt;
#/d/exodus/arev/syncup.sh&lt;br /&gt;
&lt;br /&gt;
===Get c++ files from nl19 to exodus===&lt;br /&gt;
(Do in Exodus system)&lt;br /&gt;
&lt;br /&gt;
#If cpp in SYS then: ~/exodus/service/src ./getpickos&lt;br /&gt;
#If cpp in MED JOB FIN GEN AGY then: *~/neosys/src ./getpickos&lt;br /&gt;
#Compile single cpp then: c &amp;lt;programname&amp;gt; e.g &amp;quot;c monitor2&amp;quot;&lt;br /&gt;
#Compile all cpp then: ./compall (PENDING WHICH/WHERE? many compall)&lt;br /&gt;
&lt;br /&gt;
===Compile C++ files to TEST system===&lt;br /&gt;
&lt;br /&gt;
#*./test &amp;lt;DBNAME&amp;gt;&lt;br /&gt;
#*~/neosys ./doall TEST &amp;lt;DBNAME&amp;gt; restart    #to get one service to start start using the new lib files&lt;br /&gt;
#*~/neosys ./doall TEST all restart                    #to get all the services to start start using the new lib files&lt;br /&gt;
&lt;br /&gt;
===Install C++ files to LIVE System===&lt;br /&gt;
WARNING&lt;br /&gt;
&lt;br /&gt;
#~/exodus/service/ ./copyall            #to copy all the ~/lib and bin files to ~/live/lib and bin ... which is used by all exodus/live services&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Writing Standard Exodus Core Function/Method Testing==&lt;br /&gt;
Screen 9: ~/exodus/test/src/&lt;br /&gt;
There are a series of test programs that check whether methods/functions behave as intended.&lt;br /&gt;
They do this using the function, assert.. a 1 or more argument values produce one and only one output)&lt;br /&gt;
&lt;br /&gt;
e.g test_multilang.cpp or test_sort.cpp&lt;br /&gt;
&lt;br /&gt;
Two methods of running test programs:&lt;br /&gt;
*Screen 9: make test&lt;br /&gt;
*after compiling using edic/compile/c, enter test_prog_name. (Since compile has moved it to ~/bin)&lt;br /&gt;
&lt;br /&gt;
Difference between the two methods is make calls gdb directly;&lt;br /&gt;
whereas ~/bin/test_prog_name uses exodus compile program&lt;br /&gt;
#~/neosys ./doall LIVE all restart&lt;br /&gt;
&lt;br /&gt;
==Updating a pgsql function in an exodus dictionary==&lt;br /&gt;
&lt;br /&gt;
PENDING&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting postfix emailing issues==&lt;br /&gt;
&lt;br /&gt;
To view current configuration in main.cf&lt;br /&gt;
 postconf -n&lt;br /&gt;
&lt;br /&gt;
To update the value of a parameter&lt;br /&gt;
 postconf relayhost=mailout.neosys.com:2500&lt;br /&gt;
&lt;br /&gt;
To restart postfix service&lt;br /&gt;
 service postfix restart&lt;br /&gt;
&lt;br /&gt;
Send a test email using &amp;quot;mail&amp;quot; and watch the logs to verify&lt;br /&gt;
 mail &amp;lt;email&amp;gt;&lt;br /&gt;
 journalctl -f&lt;br /&gt;
&lt;br /&gt;
==Development and deployment using &#039;dat&#039; files==&lt;br /&gt;
&lt;br /&gt;
===Rationale===&lt;br /&gt;
&lt;br /&gt;
Part of system development is the creation of various data that is neither programs nor layout i.e. not cpp, h, html, js, php files etc.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
*Dictionaries are data about data.&lt;br /&gt;
*Language files are data about text to use for various languages.&lt;br /&gt;
*“Change logs” are data about changes in the system.&lt;br /&gt;
&lt;br /&gt;
Historically, in EXODUS and NEOSYS, the above data has been deployed in exodus database files using SQL text files. However SQL files are not convenient for development.&lt;br /&gt;
&lt;br /&gt;
Therefore, &#039;dat&#039; text files will be used now so that standard development tools including editors and git can be fully exploited.&lt;br /&gt;
&lt;br /&gt;
===&#039;dat&#039; files===&lt;br /&gt;
&lt;br /&gt;
Each database file is represented by an os directory of the same name.&lt;br /&gt;
&lt;br /&gt;
Each record in the database file is represented by an os text file where filename is the primary key.&lt;br /&gt;
&lt;br /&gt;
For example a record with key &#039;&#039;&#039;DEADLINE&#039;&#039;&#039; in a dat file &#039;&#039;&#039;dict.materials&#039;&#039;&#039; would be represented as an os text file &#039;&#039;&#039;dat/dict.materials/DEADLINE&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Each line in the os text file represents one field in the db record. In other words, db record FM characters are represented by new line characters in &#039;dat&#039; files. Any actual new line characters required in the record, and any backslashes, are escaped and appear as &#039;\n&#039; and &#039;\\&#039; in &#039;dat&#039; files. Other database field separator characters such as VM, SM, TM and STM are stored without any conversion.&lt;br /&gt;
&lt;br /&gt;
===Location of dat files===&lt;br /&gt;
&lt;br /&gt;
The development versions are stored in exodus and neosys src/dat dirs. They form part of the standard git repositories in parallel with cpp files.&lt;br /&gt;
&lt;br /&gt;
The operational versions are stored in ~/dat and ~/live/dat alongside bin and lib dirs and are automatically installed into databases as database files on service startup. Any database functions embedded in the text files (pgsql) are also automatically installed at the same time.&lt;br /&gt;
&lt;br /&gt;
===Editing and deploying a &#039;dat&#039; file===&lt;br /&gt;
&lt;br /&gt;
It is currently a three step process to edit and deploy such &#039;dat&#039; files. &lt;br /&gt;
&lt;br /&gt;
====Edit the &#039;dat&#039; file====&lt;br /&gt;
&lt;br /&gt;
Note that EXODUS service and NEOSYS service have different src/dat folders.&lt;br /&gt;
&lt;br /&gt;
Editing language items:&lt;br /&gt;
&lt;br /&gt;
 edir dat/alanguage/SCHEDULES*ARABIC&lt;br /&gt;
&lt;br /&gt;
Editing a dictionary item:&lt;br /&gt;
&lt;br /&gt;
 edir dat/dict.materials/DEADLINE&lt;br /&gt;
&lt;br /&gt;
Editing a pgsql function in a dictionary:&lt;br /&gt;
&lt;br /&gt;
 edir dat/dict.materials/DEADLINE 8&lt;br /&gt;
&lt;br /&gt;
====Copy all &#039;dat&#039; files to ~/dat ====&lt;br /&gt;
&lt;br /&gt;
This step might be removed at a later date.&lt;br /&gt;
&lt;br /&gt;
This will cause all test databases to immediately restart and load any &#039;dat&#039; file changes into dictionaries and data files and also create any new or modified pgsql functions.&lt;br /&gt;
&lt;br /&gt;
If any ~/neosys/src/dat files were edited:&lt;br /&gt;
&lt;br /&gt;
 cd ~/neosys/src&lt;br /&gt;
 &lt;br /&gt;
 ./compall dat&lt;br /&gt;
&lt;br /&gt;
and/or, if exodus/service/dat files were edited&lt;br /&gt;
&lt;br /&gt;
 cd ~/exodus/service/src&lt;br /&gt;
 &lt;br /&gt;
 ./compall dat&lt;br /&gt;
&lt;br /&gt;
====Copy all programs and &#039;dat&#039; files to ~/live/bin|lib|dat====&lt;br /&gt;
&lt;br /&gt;
This should only be run after testing. It will cause all live databases to automatically restart and do the same as the test databases mentioned above.&lt;br /&gt;
&lt;br /&gt;
 cd ~/exodus/service&lt;br /&gt;
 &lt;br /&gt;
 ./copyall CONFIRM&lt;br /&gt;
​&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=EXODUS_Knowledge&amp;diff=3904</id>
		<title>EXODUS Knowledge</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=EXODUS_Knowledge&amp;diff=3904"/>
		<updated>2021-12-06T10:06:18Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Install all &amp;#039;dat&amp;#039; files in ~/dat */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==TMUX Screens==&lt;br /&gt;
&lt;br /&gt;
To create the EXODUS maintenance/programming environment&lt;br /&gt;
 exodus#: ./tmux.exodus&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SCREEN NAME      STANDARD PATH                            PURPOSE&lt;br /&gt;
#ex1_root        - /root                                  - general usage &lt;br /&gt;
#exodus          - /root/exodus                           - &lt;br /&gt;
#exodus src      - /root/exodus/exodus/libexodus/exodus   - LibExodus is the core EXODUS library source files (emulating AREV CRUD)&lt;br /&gt;
#exo cli         - /root/exodus/cli/src                   - Core EXODUS program which can be executed from bash (clearfile, edir, edic, compile)&lt;br /&gt;
#service         - /root/exodus/service                   - Default working environment for EXODUS only service, including EXODUS core www and data directories. Also used to keep NEOSYS database installation scripts.&lt;br /&gt;
#ser src         - /root/exodus/service/src               -&lt;br /&gt;
#neosys          - /root/neosys                           - ./doall&lt;br /&gt;
#neo src         - /root/neosys/src                       -&lt;br /&gt;
#hosts           - /root/hosts                            -   &lt;br /&gt;
#test src        - /root/exodus/test/src                  - &lt;br /&gt;
#t10             - ~/                                     - &lt;br /&gt;
#t11             - ~/                                     - &lt;br /&gt;
#t12             - ~/                                     - &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Object Code/Libraries===&lt;br /&gt;
LIVE and TEST processes use different sets of object code.&lt;br /&gt;
TEST processes use libraries in ~/lib/, whereas LIVE processes use object code in ~/neo/lib&lt;br /&gt;
&lt;br /&gt;
This means development &amp;amp; testing can be done stress free on TEST database, as opposed to testing on production databases.&lt;br /&gt;
&lt;br /&gt;
When compiling using edic, the TEST object code is updated if the compilation is successful. (~/lib)&lt;br /&gt;
In order to apply a tested patch to LIVE see [[Update LIVE programs]].&lt;br /&gt;
&lt;br /&gt;
===Dictionaries===&lt;br /&gt;
Dictionaries, the files used to describe the fields of a file&#039;s record.&lt;br /&gt;
Unlike in AREV, there is a copy of all dictionaries in each pgsql database (In AREV, updating a dictionary would affect all the databases).&lt;br /&gt;
&lt;br /&gt;
===Processes===&lt;br /&gt;
The TEST process for all database use the same object code stored in /root/lib, whereas all LIVE process use the object code in /root/neo/.&lt;br /&gt;
&lt;br /&gt;
===Postgres===&lt;br /&gt;
Connect into postgres shell:&lt;br /&gt;
 sudo -u postgres psql&lt;br /&gt;
&lt;br /&gt;
List databases once in postgres shell:&lt;br /&gt;
 \l&lt;br /&gt;
&lt;br /&gt;
Delete a database:&lt;br /&gt;
 sudo -u postgres dropdb &amp;lt;dbcode&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===./doall===&lt;br /&gt;
&lt;br /&gt;
====General====&lt;br /&gt;
Screen 6: ./doall script contains all the necessary information(codes) to setup an installation.&lt;br /&gt;
It includes scripts to backup, restore, create an Apache site, create/start/stop/status a service, import an AREV database into postgres and more.&lt;br /&gt;
&lt;br /&gt;
====backup_db====&lt;br /&gt;
&lt;br /&gt;
*Does a backup &amp;amp; restore of a LIVE database into the corresponding TEST database.&lt;br /&gt;
*Backup &amp;lt;dbcode&amp;gt;.sql file is written to /root/backups/sql; which is rsynced to nl19:/backups/current/exodus/&lt;br /&gt;
*Unlike AREV, postgres can perform a &amp;quot;backup&amp;quot; of a database whilst the system is in use.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Git==&lt;br /&gt;
&lt;br /&gt;
There are two repositories, one for EXODUS and the other for NEOSYS.&lt;br /&gt;
&lt;br /&gt;
===Using git to make changes===&lt;br /&gt;
&lt;br /&gt;
Before following steps you must have a tested updated to a program/file/script. Do not commit untested changes to avoid a messy git history of reverts.&lt;br /&gt;
&lt;br /&gt;
Update your local repo before committing to local repo using the g alias for &amp;quot;git pull --ff-only ; git push &amp;amp;&amp;amp; git status&#039;&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;g&amp;lt;/pre&amp;gt;&lt;br /&gt;
Check which updates/files have not yet been staged and/or committed:&lt;br /&gt;
Add your updates to the staged area:&lt;br /&gt;
&amp;lt;pre&amp;gt;git add &amp;lt;filename&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
or if all the changes made need to be staged:&lt;br /&gt;
&amp;lt;pre&amp;gt;git add -a&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make a commit with a descriptive message on purpose of updates:&lt;br /&gt;
&amp;lt;pre&amp;gt;git commit -m &amp;lt;description n purpose of changes&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Again use g alias:&lt;br /&gt;
&amp;lt;pre&amp;gt;g&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Other useful git cmds===&lt;br /&gt;
&lt;br /&gt;
Do not use this commands unless you know what WILL happen. &lt;br /&gt;
*git pull - Instead use the safe &amp;quot;git pull --ff-only&amp;quot;&lt;br /&gt;
Stick to the alias &amp;quot;g&amp;quot; which does &amp;quot;git pull --ff-only ; git push &amp;amp;&amp;amp; git status&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*git log - display history of commits to master branch&lt;br /&gt;
*git diff - display the differences in files between working files and files in local repo.&lt;br /&gt;
*git status - display: which updated files are staged/not staged(tracked)&lt;br /&gt;
*git stash - &lt;br /&gt;
*git branch - switch to a new branch&lt;br /&gt;
*git branch &amp;lt;branchname&amp;gt; - will switch to this branch only if it exists&lt;br /&gt;
*git checkout - DESTROYS/Updates the state of local working directory with the state of the files in the local repo. (YOU WILL LOSE non staged updates)&lt;br /&gt;
*git restore &amp;lt;filename&amp;gt; - DESTROYS/Updates the file with the version in the local repo. (like with git checkout but for a specific file)&lt;br /&gt;
*git checkin - &lt;br /&gt;
*git revert &amp;lt;commitHash&amp;gt; - reverses a specific commit (use git log to get the chosen commit hash)&lt;br /&gt;
&lt;br /&gt;
==Converting AREV to EXODUS==&lt;br /&gt;
===Decompile AREV to C++===&lt;br /&gt;
(Do in win10a Maintenance mode)&lt;br /&gt;
&lt;br /&gt;
#Apply tested patch to win10a (master AREV Dev system)&lt;br /&gt;
#ATTACH ADECOMC &lt;br /&gt;
#*ADECOM &amp;lt;programname&amp;gt;   *single program&lt;br /&gt;
#*ADECOMALL                          *all programs   (CHECK THIS FIRST)&lt;br /&gt;
#*ADECOM &amp;lt;prog1&amp;gt; &amp;lt;prog2&amp;gt; *(CHECK IF THIS WORKS)&lt;br /&gt;
&lt;br /&gt;
===Send c++ files from win10a to nl19===&lt;br /&gt;
(Do in win10a Cygwin)&lt;br /&gt;
&lt;br /&gt;
#/d/exodus/arev/syncup.sh&lt;br /&gt;
&lt;br /&gt;
===Get c++ files from nl19 to exodus===&lt;br /&gt;
(Do in Exodus system)&lt;br /&gt;
&lt;br /&gt;
#If cpp in SYS then: ~/exodus/service/src ./getpickos&lt;br /&gt;
#If cpp in MED JOB FIN GEN AGY then: *~/neosys/src ./getpickos&lt;br /&gt;
#Compile single cpp then: c &amp;lt;programname&amp;gt; e.g &amp;quot;c monitor2&amp;quot;&lt;br /&gt;
#Compile all cpp then: ./compall (PENDING WHICH/WHERE? many compall)&lt;br /&gt;
&lt;br /&gt;
===Compile C++ files to TEST system===&lt;br /&gt;
&lt;br /&gt;
#*./test &amp;lt;DBNAME&amp;gt;&lt;br /&gt;
#*~/neosys ./doall TEST &amp;lt;DBNAME&amp;gt; restart    #to get one service to start start using the new lib files&lt;br /&gt;
#*~/neosys ./doall TEST all restart                    #to get all the services to start start using the new lib files&lt;br /&gt;
&lt;br /&gt;
===Install C++ files to LIVE System===&lt;br /&gt;
WARNING&lt;br /&gt;
&lt;br /&gt;
#~/exodus/service/ ./copyall            #to copy all the ~/lib and bin files to ~/live/lib and bin ... which is used by all exodus/live services&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Writing Standard Exodus Core Function/Method Testing==&lt;br /&gt;
Screen 9: ~/exodus/test/src/&lt;br /&gt;
There are a series of test programs that check whether methods/functions behave as intended.&lt;br /&gt;
They do this using the function, assert.. a 1 or more argument values produce one and only one output)&lt;br /&gt;
&lt;br /&gt;
e.g test_multilang.cpp or test_sort.cpp&lt;br /&gt;
&lt;br /&gt;
Two methods of running test programs:&lt;br /&gt;
*Screen 9: make test&lt;br /&gt;
*after compiling using edic/compile/c, enter test_prog_name. (Since compile has moved it to ~/bin)&lt;br /&gt;
&lt;br /&gt;
Difference between the two methods is make calls gdb directly;&lt;br /&gt;
whereas ~/bin/test_prog_name uses exodus compile program&lt;br /&gt;
#~/neosys ./doall LIVE all restart&lt;br /&gt;
&lt;br /&gt;
==Updating a pgsql function in an exodus dictionary==&lt;br /&gt;
&lt;br /&gt;
PENDING&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting postfix emailing issues==&lt;br /&gt;
&lt;br /&gt;
To view current configuration in main.cf&lt;br /&gt;
 postconf -n&lt;br /&gt;
&lt;br /&gt;
To update the value of a parameter&lt;br /&gt;
 postconf relayhost=mailout.neosys.com:2500&lt;br /&gt;
&lt;br /&gt;
To restart postfix service&lt;br /&gt;
 service postfix restart&lt;br /&gt;
&lt;br /&gt;
Send a test email using &amp;quot;mail&amp;quot; and watch the logs to verify&lt;br /&gt;
 mail &amp;lt;email&amp;gt;&lt;br /&gt;
 journalctl -f&lt;br /&gt;
&lt;br /&gt;
==Development and deployment using &#039;dat&#039; files==&lt;br /&gt;
&lt;br /&gt;
===Rationale===&lt;br /&gt;
&lt;br /&gt;
Part of system development is the creation of various data that is neither programs nor layout i.e. not cpp, h, html, js, php files etc.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
*Dictionaries are data about data.&lt;br /&gt;
*Language files are data about text to use for various languages.&lt;br /&gt;
*“Change logs” are data about changes in the system.&lt;br /&gt;
&lt;br /&gt;
Historically, in EXODUS and NEOSYS, the above data has been deployed in exodus database files using SQL text files. However SQL files are not convenient for development.&lt;br /&gt;
&lt;br /&gt;
Therefore, &#039;dat&#039; text files will be used now so that standard development tools including editors and git can be fully exploited.&lt;br /&gt;
&lt;br /&gt;
===&#039;dat&#039; files===&lt;br /&gt;
&lt;br /&gt;
Each database file is represented by an os directory of the same name.&lt;br /&gt;
&lt;br /&gt;
Each record in the database file is represented by an os text file where filename is the primary key.&lt;br /&gt;
&lt;br /&gt;
For example a record with key &#039;&#039;&#039;DEADLINE&#039;&#039;&#039; in a dat file &#039;&#039;&#039;dict.materials&#039;&#039;&#039; would be represented as an os text file &#039;&#039;&#039;dat/dict.materials/DEADLINE&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Each line in the os text file represents one field in the db record. In other words, db record FM characters are represented by new line characters in &#039;dat&#039; files. Any actual new line characters required in the record, and any backslashes, are escaped and appear as &#039;\n&#039; and &#039;\\&#039; in &#039;dat&#039; files. Other database field separator characters such as VM, SM, TM and STM are stored without any conversion.&lt;br /&gt;
&lt;br /&gt;
===Location of dat files===&lt;br /&gt;
&lt;br /&gt;
The development versions are stored in exodus and neosys src/dat dirs. They form part of the standard git repositories in parallel with cpp files.&lt;br /&gt;
&lt;br /&gt;
The operational versions are stored in ~/dat and ~/live/dat alongside bin and lib dirs and are automatically installed into databases as database files on service startup. Any database functions embedded in the text files (pgsql) are also automatically installed at the same time.&lt;br /&gt;
&lt;br /&gt;
===Editing and deploying a &#039;dat&#039; file===&lt;br /&gt;
&lt;br /&gt;
It is currently a three step process to edit and deploy such &#039;dat&#039; files. &lt;br /&gt;
&lt;br /&gt;
====Edit the &#039;dat&#039; file====&lt;br /&gt;
&lt;br /&gt;
Note that EXODUS service and NEOSYS have different src/dat folders.&lt;br /&gt;
&lt;br /&gt;
Editing language items:&lt;br /&gt;
&lt;br /&gt;
 edir dat/alanguage/SCHEDULES*ARABIC&lt;br /&gt;
&lt;br /&gt;
Editing a dictionary item:&lt;br /&gt;
&lt;br /&gt;
 edir dat/dict.materials/DEADLINE&lt;br /&gt;
&lt;br /&gt;
Editing a pgsql function in a dictionary:&lt;br /&gt;
&lt;br /&gt;
 edir dat/dict.materials/DEADLINE 8&lt;br /&gt;
&lt;br /&gt;
====Copy all programs and &#039;dat&#039; files to ~/bin|lib|dat ====&lt;br /&gt;
&lt;br /&gt;
This step might be removed at a later date.&lt;br /&gt;
&lt;br /&gt;
This will cause all test databases to immediately restart and load any &#039;dat&#039; file changes into dictionaries and data files and also create any new or modified pgsql functions.&lt;br /&gt;
&lt;br /&gt;
If any ~/neosys/src/dat files were edited:&lt;br /&gt;
&lt;br /&gt;
 cd ~/neosys/src &amp;amp;&amp;amp; ./compall&lt;br /&gt;
&lt;br /&gt;
and/or, if exodus/service/dat files were edited&lt;br /&gt;
&lt;br /&gt;
 cd ~/exodus/service/src &amp;amp;&amp;amp; ./compall&lt;br /&gt;
&lt;br /&gt;
====Copy all programs and &#039;dat&#039; files to ~/live/bin|lib|dat====&lt;br /&gt;
&lt;br /&gt;
This will cause all live databases to automatically restart and do the same as the test databases mentioned above.&lt;br /&gt;
&lt;br /&gt;
 cd ~/exodus/service &amp;amp;&amp;amp; ./copyall CONFIRM&lt;br /&gt;
​&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=EXODUS_Knowledge&amp;diff=3903</id>
		<title>EXODUS Knowledge</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=EXODUS_Knowledge&amp;diff=3903"/>
		<updated>2021-12-06T10:05:41Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Copy all programs and &amp;#039;dat&amp;#039; files to live */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==TMUX Screens==&lt;br /&gt;
&lt;br /&gt;
To create the EXODUS maintenance/programming environment&lt;br /&gt;
 exodus#: ./tmux.exodus&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SCREEN NAME      STANDARD PATH                            PURPOSE&lt;br /&gt;
#ex1_root        - /root                                  - general usage &lt;br /&gt;
#exodus          - /root/exodus                           - &lt;br /&gt;
#exodus src      - /root/exodus/exodus/libexodus/exodus   - LibExodus is the core EXODUS library source files (emulating AREV CRUD)&lt;br /&gt;
#exo cli         - /root/exodus/cli/src                   - Core EXODUS program which can be executed from bash (clearfile, edir, edic, compile)&lt;br /&gt;
#service         - /root/exodus/service                   - Default working environment for EXODUS only service, including EXODUS core www and data directories. Also used to keep NEOSYS database installation scripts.&lt;br /&gt;
#ser src         - /root/exodus/service/src               -&lt;br /&gt;
#neosys          - /root/neosys                           - ./doall&lt;br /&gt;
#neo src         - /root/neosys/src                       -&lt;br /&gt;
#hosts           - /root/hosts                            -   &lt;br /&gt;
#test src        - /root/exodus/test/src                  - &lt;br /&gt;
#t10             - ~/                                     - &lt;br /&gt;
#t11             - ~/                                     - &lt;br /&gt;
#t12             - ~/                                     - &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Object Code/Libraries===&lt;br /&gt;
LIVE and TEST processes use different sets of object code.&lt;br /&gt;
TEST processes use libraries in ~/lib/, whereas LIVE processes use object code in ~/neo/lib&lt;br /&gt;
&lt;br /&gt;
This means development &amp;amp; testing can be done stress free on TEST database, as opposed to testing on production databases.&lt;br /&gt;
&lt;br /&gt;
When compiling using edic, the TEST object code is updated if the compilation is successful. (~/lib)&lt;br /&gt;
In order to apply a tested patch to LIVE see [[Update LIVE programs]].&lt;br /&gt;
&lt;br /&gt;
===Dictionaries===&lt;br /&gt;
Dictionaries, the files used to describe the fields of a file&#039;s record.&lt;br /&gt;
Unlike in AREV, there is a copy of all dictionaries in each pgsql database (In AREV, updating a dictionary would affect all the databases).&lt;br /&gt;
&lt;br /&gt;
===Processes===&lt;br /&gt;
The TEST process for all database use the same object code stored in /root/lib, whereas all LIVE process use the object code in /root/neo/.&lt;br /&gt;
&lt;br /&gt;
===Postgres===&lt;br /&gt;
Connect into postgres shell:&lt;br /&gt;
 sudo -u postgres psql&lt;br /&gt;
&lt;br /&gt;
List databases once in postgres shell:&lt;br /&gt;
 \l&lt;br /&gt;
&lt;br /&gt;
Delete a database:&lt;br /&gt;
 sudo -u postgres dropdb &amp;lt;dbcode&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===./doall===&lt;br /&gt;
&lt;br /&gt;
====General====&lt;br /&gt;
Screen 6: ./doall script contains all the necessary information(codes) to setup an installation.&lt;br /&gt;
It includes scripts to backup, restore, create an Apache site, create/start/stop/status a service, import an AREV database into postgres and more.&lt;br /&gt;
&lt;br /&gt;
====backup_db====&lt;br /&gt;
&lt;br /&gt;
*Does a backup &amp;amp; restore of a LIVE database into the corresponding TEST database.&lt;br /&gt;
*Backup &amp;lt;dbcode&amp;gt;.sql file is written to /root/backups/sql; which is rsynced to nl19:/backups/current/exodus/&lt;br /&gt;
*Unlike AREV, postgres can perform a &amp;quot;backup&amp;quot; of a database whilst the system is in use.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Git==&lt;br /&gt;
&lt;br /&gt;
There are two repositories, one for EXODUS and the other for NEOSYS.&lt;br /&gt;
&lt;br /&gt;
===Using git to make changes===&lt;br /&gt;
&lt;br /&gt;
Before following steps you must have a tested updated to a program/file/script. Do not commit untested changes to avoid a messy git history of reverts.&lt;br /&gt;
&lt;br /&gt;
Update your local repo before committing to local repo using the g alias for &amp;quot;git pull --ff-only ; git push &amp;amp;&amp;amp; git status&#039;&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;g&amp;lt;/pre&amp;gt;&lt;br /&gt;
Check which updates/files have not yet been staged and/or committed:&lt;br /&gt;
Add your updates to the staged area:&lt;br /&gt;
&amp;lt;pre&amp;gt;git add &amp;lt;filename&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
or if all the changes made need to be staged:&lt;br /&gt;
&amp;lt;pre&amp;gt;git add -a&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make a commit with a descriptive message on purpose of updates:&lt;br /&gt;
&amp;lt;pre&amp;gt;git commit -m &amp;lt;description n purpose of changes&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Again use g alias:&lt;br /&gt;
&amp;lt;pre&amp;gt;g&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Other useful git cmds===&lt;br /&gt;
&lt;br /&gt;
Do not use this commands unless you know what WILL happen. &lt;br /&gt;
*git pull - Instead use the safe &amp;quot;git pull --ff-only&amp;quot;&lt;br /&gt;
Stick to the alias &amp;quot;g&amp;quot; which does &amp;quot;git pull --ff-only ; git push &amp;amp;&amp;amp; git status&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*git log - display history of commits to master branch&lt;br /&gt;
*git diff - display the differences in files between working files and files in local repo.&lt;br /&gt;
*git status - display: which updated files are staged/not staged(tracked)&lt;br /&gt;
*git stash - &lt;br /&gt;
*git branch - switch to a new branch&lt;br /&gt;
*git branch &amp;lt;branchname&amp;gt; - will switch to this branch only if it exists&lt;br /&gt;
*git checkout - DESTROYS/Updates the state of local working directory with the state of the files in the local repo. (YOU WILL LOSE non staged updates)&lt;br /&gt;
*git restore &amp;lt;filename&amp;gt; - DESTROYS/Updates the file with the version in the local repo. (like with git checkout but for a specific file)&lt;br /&gt;
*git checkin - &lt;br /&gt;
*git revert &amp;lt;commitHash&amp;gt; - reverses a specific commit (use git log to get the chosen commit hash)&lt;br /&gt;
&lt;br /&gt;
==Converting AREV to EXODUS==&lt;br /&gt;
===Decompile AREV to C++===&lt;br /&gt;
(Do in win10a Maintenance mode)&lt;br /&gt;
&lt;br /&gt;
#Apply tested patch to win10a (master AREV Dev system)&lt;br /&gt;
#ATTACH ADECOMC &lt;br /&gt;
#*ADECOM &amp;lt;programname&amp;gt;   *single program&lt;br /&gt;
#*ADECOMALL                          *all programs   (CHECK THIS FIRST)&lt;br /&gt;
#*ADECOM &amp;lt;prog1&amp;gt; &amp;lt;prog2&amp;gt; *(CHECK IF THIS WORKS)&lt;br /&gt;
&lt;br /&gt;
===Send c++ files from win10a to nl19===&lt;br /&gt;
(Do in win10a Cygwin)&lt;br /&gt;
&lt;br /&gt;
#/d/exodus/arev/syncup.sh&lt;br /&gt;
&lt;br /&gt;
===Get c++ files from nl19 to exodus===&lt;br /&gt;
(Do in Exodus system)&lt;br /&gt;
&lt;br /&gt;
#If cpp in SYS then: ~/exodus/service/src ./getpickos&lt;br /&gt;
#If cpp in MED JOB FIN GEN AGY then: *~/neosys/src ./getpickos&lt;br /&gt;
#Compile single cpp then: c &amp;lt;programname&amp;gt; e.g &amp;quot;c monitor2&amp;quot;&lt;br /&gt;
#Compile all cpp then: ./compall (PENDING WHICH/WHERE? many compall)&lt;br /&gt;
&lt;br /&gt;
===Compile C++ files to TEST system===&lt;br /&gt;
&lt;br /&gt;
#*./test &amp;lt;DBNAME&amp;gt;&lt;br /&gt;
#*~/neosys ./doall TEST &amp;lt;DBNAME&amp;gt; restart    #to get one service to start start using the new lib files&lt;br /&gt;
#*~/neosys ./doall TEST all restart                    #to get all the services to start start using the new lib files&lt;br /&gt;
&lt;br /&gt;
===Install C++ files to LIVE System===&lt;br /&gt;
WARNING&lt;br /&gt;
&lt;br /&gt;
#~/exodus/service/ ./copyall            #to copy all the ~/lib and bin files to ~/live/lib and bin ... which is used by all exodus/live services&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Writing Standard Exodus Core Function/Method Testing==&lt;br /&gt;
Screen 9: ~/exodus/test/src/&lt;br /&gt;
There are a series of test programs that check whether methods/functions behave as intended.&lt;br /&gt;
They do this using the function, assert.. a 1 or more argument values produce one and only one output)&lt;br /&gt;
&lt;br /&gt;
e.g test_multilang.cpp or test_sort.cpp&lt;br /&gt;
&lt;br /&gt;
Two methods of running test programs:&lt;br /&gt;
*Screen 9: make test&lt;br /&gt;
*after compiling using edic/compile/c, enter test_prog_name. (Since compile has moved it to ~/bin)&lt;br /&gt;
&lt;br /&gt;
Difference between the two methods is make calls gdb directly;&lt;br /&gt;
whereas ~/bin/test_prog_name uses exodus compile program&lt;br /&gt;
#~/neosys ./doall LIVE all restart&lt;br /&gt;
&lt;br /&gt;
==Updating a pgsql function in an exodus dictionary==&lt;br /&gt;
&lt;br /&gt;
PENDING&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting postfix emailing issues==&lt;br /&gt;
&lt;br /&gt;
To view current configuration in main.cf&lt;br /&gt;
 postconf -n&lt;br /&gt;
&lt;br /&gt;
To update the value of a parameter&lt;br /&gt;
 postconf relayhost=mailout.neosys.com:2500&lt;br /&gt;
&lt;br /&gt;
To restart postfix service&lt;br /&gt;
 service postfix restart&lt;br /&gt;
&lt;br /&gt;
Send a test email using &amp;quot;mail&amp;quot; and watch the logs to verify&lt;br /&gt;
 mail &amp;lt;email&amp;gt;&lt;br /&gt;
 journalctl -f&lt;br /&gt;
&lt;br /&gt;
==Development and deployment using &#039;dat&#039; files==&lt;br /&gt;
&lt;br /&gt;
===Rationale===&lt;br /&gt;
&lt;br /&gt;
Part of system development is the creation of various data that is neither programs nor layout i.e. not cpp, h, html, js, php files etc.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
*Dictionaries are data about data.&lt;br /&gt;
*Language files are data about text to use for various languages.&lt;br /&gt;
*“Change logs” are data about changes in the system.&lt;br /&gt;
&lt;br /&gt;
Historically, in EXODUS and NEOSYS, the above data has been deployed in exodus database files using SQL text files. However SQL files are not convenient for development.&lt;br /&gt;
&lt;br /&gt;
Therefore, &#039;dat&#039; text files will be used now so that standard development tools including editors and git can be fully exploited.&lt;br /&gt;
&lt;br /&gt;
===&#039;dat&#039; files===&lt;br /&gt;
&lt;br /&gt;
Each database file is represented by an os directory of the same name.&lt;br /&gt;
&lt;br /&gt;
Each record in the database file is represented by an os text file where filename is the primary key.&lt;br /&gt;
&lt;br /&gt;
For example a record with key &#039;&#039;&#039;DEADLINE&#039;&#039;&#039; in a dat file &#039;&#039;&#039;dict.materials&#039;&#039;&#039; would be represented as an os text file &#039;&#039;&#039;dat/dict.materials/DEADLINE&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Each line in the os text file represents one field in the db record. In other words, db record FM characters are represented by new line characters in &#039;dat&#039; files. Any actual new line characters required in the record, and any backslashes, are escaped and appear as &#039;\n&#039; and &#039;\\&#039; in &#039;dat&#039; files. Other database field separator characters such as VM, SM, TM and STM are stored without any conversion.&lt;br /&gt;
&lt;br /&gt;
===Location of dat files===&lt;br /&gt;
&lt;br /&gt;
The development versions are stored in exodus and neosys src/dat dirs. They form part of the standard git repositories in parallel with cpp files.&lt;br /&gt;
&lt;br /&gt;
The operational versions are stored in ~/dat and ~/live/dat alongside bin and lib dirs and are automatically installed into databases as database files on service startup. Any database functions embedded in the text files (pgsql) are also automatically installed at the same time.&lt;br /&gt;
&lt;br /&gt;
===Editing and deploying a &#039;dat&#039; file===&lt;br /&gt;
&lt;br /&gt;
It is currently a three step process to edit and deploy such &#039;dat&#039; files. &lt;br /&gt;
&lt;br /&gt;
====Edit the &#039;dat&#039; file====&lt;br /&gt;
&lt;br /&gt;
Note that EXODUS service and NEOSYS have different src/dat folders.&lt;br /&gt;
&lt;br /&gt;
Editing language items:&lt;br /&gt;
&lt;br /&gt;
 edir dat/alanguage/SCHEDULES*ARABIC&lt;br /&gt;
&lt;br /&gt;
Editing a dictionary item:&lt;br /&gt;
&lt;br /&gt;
 edir dat/dict.materials/DEADLINE&lt;br /&gt;
&lt;br /&gt;
Editing a pgsql function in a dictionary:&lt;br /&gt;
&lt;br /&gt;
 edir dat/dict.materials/DEADLINE 8&lt;br /&gt;
&lt;br /&gt;
====Install all &#039;dat&#039; files in ~/dat ====&lt;br /&gt;
&lt;br /&gt;
This step might be removed at a later date.&lt;br /&gt;
&lt;br /&gt;
This will cause all test databases to immediately restart and load any &#039;dat&#039; file changes into dictionaries and data files and also create any new or modified pgsql functions.&lt;br /&gt;
&lt;br /&gt;
If any ~/neosys/src/dat files were edited:&lt;br /&gt;
&lt;br /&gt;
 cd ~/neosys/src &amp;amp;&amp;amp; ./compall&lt;br /&gt;
&lt;br /&gt;
and/or, if exodus/service/dat files were edited&lt;br /&gt;
&lt;br /&gt;
 cd ~/exodus/service/src &amp;amp;&amp;amp; ./compall&lt;br /&gt;
&lt;br /&gt;
====Copy all programs and &#039;dat&#039; files to ~/live/bin|lib|dat====&lt;br /&gt;
&lt;br /&gt;
This will cause all live databases to automatically restart and do the same as the test databases mentioned above.&lt;br /&gt;
&lt;br /&gt;
 cd ~/exodus/service &amp;amp;&amp;amp; ./copyall CONFIRM&lt;br /&gt;
​&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=EXODUS_Knowledge&amp;diff=3902</id>
		<title>EXODUS Knowledge</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=EXODUS_Knowledge&amp;diff=3902"/>
		<updated>2021-12-06T10:04:39Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Install all &amp;#039;dat&amp;#039; files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==TMUX Screens==&lt;br /&gt;
&lt;br /&gt;
To create the EXODUS maintenance/programming environment&lt;br /&gt;
 exodus#: ./tmux.exodus&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SCREEN NAME      STANDARD PATH                            PURPOSE&lt;br /&gt;
#ex1_root        - /root                                  - general usage &lt;br /&gt;
#exodus          - /root/exodus                           - &lt;br /&gt;
#exodus src      - /root/exodus/exodus/libexodus/exodus   - LibExodus is the core EXODUS library source files (emulating AREV CRUD)&lt;br /&gt;
#exo cli         - /root/exodus/cli/src                   - Core EXODUS program which can be executed from bash (clearfile, edir, edic, compile)&lt;br /&gt;
#service         - /root/exodus/service                   - Default working environment for EXODUS only service, including EXODUS core www and data directories. Also used to keep NEOSYS database installation scripts.&lt;br /&gt;
#ser src         - /root/exodus/service/src               -&lt;br /&gt;
#neosys          - /root/neosys                           - ./doall&lt;br /&gt;
#neo src         - /root/neosys/src                       -&lt;br /&gt;
#hosts           - /root/hosts                            -   &lt;br /&gt;
#test src        - /root/exodus/test/src                  - &lt;br /&gt;
#t10             - ~/                                     - &lt;br /&gt;
#t11             - ~/                                     - &lt;br /&gt;
#t12             - ~/                                     - &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Object Code/Libraries===&lt;br /&gt;
LIVE and TEST processes use different sets of object code.&lt;br /&gt;
TEST processes use libraries in ~/lib/, whereas LIVE processes use object code in ~/neo/lib&lt;br /&gt;
&lt;br /&gt;
This means development &amp;amp; testing can be done stress free on TEST database, as opposed to testing on production databases.&lt;br /&gt;
&lt;br /&gt;
When compiling using edic, the TEST object code is updated if the compilation is successful. (~/lib)&lt;br /&gt;
In order to apply a tested patch to LIVE see [[Update LIVE programs]].&lt;br /&gt;
&lt;br /&gt;
===Dictionaries===&lt;br /&gt;
Dictionaries, the files used to describe the fields of a file&#039;s record.&lt;br /&gt;
Unlike in AREV, there is a copy of all dictionaries in each pgsql database (In AREV, updating a dictionary would affect all the databases).&lt;br /&gt;
&lt;br /&gt;
===Processes===&lt;br /&gt;
The TEST process for all database use the same object code stored in /root/lib, whereas all LIVE process use the object code in /root/neo/.&lt;br /&gt;
&lt;br /&gt;
===Postgres===&lt;br /&gt;
Connect into postgres shell:&lt;br /&gt;
 sudo -u postgres psql&lt;br /&gt;
&lt;br /&gt;
List databases once in postgres shell:&lt;br /&gt;
 \l&lt;br /&gt;
&lt;br /&gt;
Delete a database:&lt;br /&gt;
 sudo -u postgres dropdb &amp;lt;dbcode&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===./doall===&lt;br /&gt;
&lt;br /&gt;
====General====&lt;br /&gt;
Screen 6: ./doall script contains all the necessary information(codes) to setup an installation.&lt;br /&gt;
It includes scripts to backup, restore, create an Apache site, create/start/stop/status a service, import an AREV database into postgres and more.&lt;br /&gt;
&lt;br /&gt;
====backup_db====&lt;br /&gt;
&lt;br /&gt;
*Does a backup &amp;amp; restore of a LIVE database into the corresponding TEST database.&lt;br /&gt;
*Backup &amp;lt;dbcode&amp;gt;.sql file is written to /root/backups/sql; which is rsynced to nl19:/backups/current/exodus/&lt;br /&gt;
*Unlike AREV, postgres can perform a &amp;quot;backup&amp;quot; of a database whilst the system is in use.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Git==&lt;br /&gt;
&lt;br /&gt;
There are two repositories, one for EXODUS and the other for NEOSYS.&lt;br /&gt;
&lt;br /&gt;
===Using git to make changes===&lt;br /&gt;
&lt;br /&gt;
Before following steps you must have a tested updated to a program/file/script. Do not commit untested changes to avoid a messy git history of reverts.&lt;br /&gt;
&lt;br /&gt;
Update your local repo before committing to local repo using the g alias for &amp;quot;git pull --ff-only ; git push &amp;amp;&amp;amp; git status&#039;&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;g&amp;lt;/pre&amp;gt;&lt;br /&gt;
Check which updates/files have not yet been staged and/or committed:&lt;br /&gt;
Add your updates to the staged area:&lt;br /&gt;
&amp;lt;pre&amp;gt;git add &amp;lt;filename&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
or if all the changes made need to be staged:&lt;br /&gt;
&amp;lt;pre&amp;gt;git add -a&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make a commit with a descriptive message on purpose of updates:&lt;br /&gt;
&amp;lt;pre&amp;gt;git commit -m &amp;lt;description n purpose of changes&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Again use g alias:&lt;br /&gt;
&amp;lt;pre&amp;gt;g&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Other useful git cmds===&lt;br /&gt;
&lt;br /&gt;
Do not use this commands unless you know what WILL happen. &lt;br /&gt;
*git pull - Instead use the safe &amp;quot;git pull --ff-only&amp;quot;&lt;br /&gt;
Stick to the alias &amp;quot;g&amp;quot; which does &amp;quot;git pull --ff-only ; git push &amp;amp;&amp;amp; git status&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*git log - display history of commits to master branch&lt;br /&gt;
*git diff - display the differences in files between working files and files in local repo.&lt;br /&gt;
*git status - display: which updated files are staged/not staged(tracked)&lt;br /&gt;
*git stash - &lt;br /&gt;
*git branch - switch to a new branch&lt;br /&gt;
*git branch &amp;lt;branchname&amp;gt; - will switch to this branch only if it exists&lt;br /&gt;
*git checkout - DESTROYS/Updates the state of local working directory with the state of the files in the local repo. (YOU WILL LOSE non staged updates)&lt;br /&gt;
*git restore &amp;lt;filename&amp;gt; - DESTROYS/Updates the file with the version in the local repo. (like with git checkout but for a specific file)&lt;br /&gt;
*git checkin - &lt;br /&gt;
*git revert &amp;lt;commitHash&amp;gt; - reverses a specific commit (use git log to get the chosen commit hash)&lt;br /&gt;
&lt;br /&gt;
==Converting AREV to EXODUS==&lt;br /&gt;
===Decompile AREV to C++===&lt;br /&gt;
(Do in win10a Maintenance mode)&lt;br /&gt;
&lt;br /&gt;
#Apply tested patch to win10a (master AREV Dev system)&lt;br /&gt;
#ATTACH ADECOMC &lt;br /&gt;
#*ADECOM &amp;lt;programname&amp;gt;   *single program&lt;br /&gt;
#*ADECOMALL                          *all programs   (CHECK THIS FIRST)&lt;br /&gt;
#*ADECOM &amp;lt;prog1&amp;gt; &amp;lt;prog2&amp;gt; *(CHECK IF THIS WORKS)&lt;br /&gt;
&lt;br /&gt;
===Send c++ files from win10a to nl19===&lt;br /&gt;
(Do in win10a Cygwin)&lt;br /&gt;
&lt;br /&gt;
#/d/exodus/arev/syncup.sh&lt;br /&gt;
&lt;br /&gt;
===Get c++ files from nl19 to exodus===&lt;br /&gt;
(Do in Exodus system)&lt;br /&gt;
&lt;br /&gt;
#If cpp in SYS then: ~/exodus/service/src ./getpickos&lt;br /&gt;
#If cpp in MED JOB FIN GEN AGY then: *~/neosys/src ./getpickos&lt;br /&gt;
#Compile single cpp then: c &amp;lt;programname&amp;gt; e.g &amp;quot;c monitor2&amp;quot;&lt;br /&gt;
#Compile all cpp then: ./compall (PENDING WHICH/WHERE? many compall)&lt;br /&gt;
&lt;br /&gt;
===Compile C++ files to TEST system===&lt;br /&gt;
&lt;br /&gt;
#*./test &amp;lt;DBNAME&amp;gt;&lt;br /&gt;
#*~/neosys ./doall TEST &amp;lt;DBNAME&amp;gt; restart    #to get one service to start start using the new lib files&lt;br /&gt;
#*~/neosys ./doall TEST all restart                    #to get all the services to start start using the new lib files&lt;br /&gt;
&lt;br /&gt;
===Install C++ files to LIVE System===&lt;br /&gt;
WARNING&lt;br /&gt;
&lt;br /&gt;
#~/exodus/service/ ./copyall            #to copy all the ~/lib and bin files to ~/live/lib and bin ... which is used by all exodus/live services&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Writing Standard Exodus Core Function/Method Testing==&lt;br /&gt;
Screen 9: ~/exodus/test/src/&lt;br /&gt;
There are a series of test programs that check whether methods/functions behave as intended.&lt;br /&gt;
They do this using the function, assert.. a 1 or more argument values produce one and only one output)&lt;br /&gt;
&lt;br /&gt;
e.g test_multilang.cpp or test_sort.cpp&lt;br /&gt;
&lt;br /&gt;
Two methods of running test programs:&lt;br /&gt;
*Screen 9: make test&lt;br /&gt;
*after compiling using edic/compile/c, enter test_prog_name. (Since compile has moved it to ~/bin)&lt;br /&gt;
&lt;br /&gt;
Difference between the two methods is make calls gdb directly;&lt;br /&gt;
whereas ~/bin/test_prog_name uses exodus compile program&lt;br /&gt;
#~/neosys ./doall LIVE all restart&lt;br /&gt;
&lt;br /&gt;
==Updating a pgsql function in an exodus dictionary==&lt;br /&gt;
&lt;br /&gt;
PENDING&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting postfix emailing issues==&lt;br /&gt;
&lt;br /&gt;
To view current configuration in main.cf&lt;br /&gt;
 postconf -n&lt;br /&gt;
&lt;br /&gt;
To update the value of a parameter&lt;br /&gt;
 postconf relayhost=mailout.neosys.com:2500&lt;br /&gt;
&lt;br /&gt;
To restart postfix service&lt;br /&gt;
 service postfix restart&lt;br /&gt;
&lt;br /&gt;
Send a test email using &amp;quot;mail&amp;quot; and watch the logs to verify&lt;br /&gt;
 mail &amp;lt;email&amp;gt;&lt;br /&gt;
 journalctl -f&lt;br /&gt;
&lt;br /&gt;
==Development and deployment using &#039;dat&#039; files==&lt;br /&gt;
&lt;br /&gt;
===Rationale===&lt;br /&gt;
&lt;br /&gt;
Part of system development is the creation of various data that is neither programs nor layout i.e. not cpp, h, html, js, php files etc.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
*Dictionaries are data about data.&lt;br /&gt;
*Language files are data about text to use for various languages.&lt;br /&gt;
*“Change logs” are data about changes in the system.&lt;br /&gt;
&lt;br /&gt;
Historically, in EXODUS and NEOSYS, the above data has been deployed in exodus database files using SQL text files. However SQL files are not convenient for development.&lt;br /&gt;
&lt;br /&gt;
Therefore, &#039;dat&#039; text files will be used now so that standard development tools including editors and git can be fully exploited.&lt;br /&gt;
&lt;br /&gt;
===&#039;dat&#039; files===&lt;br /&gt;
&lt;br /&gt;
Each database file is represented by an os directory of the same name.&lt;br /&gt;
&lt;br /&gt;
Each record in the database file is represented by an os text file where filename is the primary key.&lt;br /&gt;
&lt;br /&gt;
For example a record with key &#039;&#039;&#039;DEADLINE&#039;&#039;&#039; in a dat file &#039;&#039;&#039;dict.materials&#039;&#039;&#039; would be represented as an os text file &#039;&#039;&#039;dat/dict.materials/DEADLINE&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Each line in the os text file represents one field in the db record. In other words, db record FM characters are represented by new line characters in &#039;dat&#039; files. Any actual new line characters required in the record, and any backslashes, are escaped and appear as &#039;\n&#039; and &#039;\\&#039; in &#039;dat&#039; files. Other database field separator characters such as VM, SM, TM and STM are stored without any conversion.&lt;br /&gt;
&lt;br /&gt;
===Location of dat files===&lt;br /&gt;
&lt;br /&gt;
The development versions are stored in exodus and neosys src/dat dirs. They form part of the standard git repositories in parallel with cpp files.&lt;br /&gt;
&lt;br /&gt;
The operational versions are stored in ~/dat and ~/live/dat alongside bin and lib dirs and are automatically installed into databases as database files on service startup. Any database functions embedded in the text files (pgsql) are also automatically installed at the same time.&lt;br /&gt;
&lt;br /&gt;
===Editing and deploying a &#039;dat&#039; file===&lt;br /&gt;
&lt;br /&gt;
It is currently a three step process to edit and deploy such &#039;dat&#039; files. &lt;br /&gt;
&lt;br /&gt;
====Edit the &#039;dat&#039; file====&lt;br /&gt;
&lt;br /&gt;
Note that EXODUS service and NEOSYS have different src/dat folders.&lt;br /&gt;
&lt;br /&gt;
Editing language items:&lt;br /&gt;
&lt;br /&gt;
 edir dat/alanguage/SCHEDULES*ARABIC&lt;br /&gt;
&lt;br /&gt;
Editing a dictionary item:&lt;br /&gt;
&lt;br /&gt;
 edir dat/dict.materials/DEADLINE&lt;br /&gt;
&lt;br /&gt;
Editing a pgsql function in a dictionary:&lt;br /&gt;
&lt;br /&gt;
 edir dat/dict.materials/DEADLINE 8&lt;br /&gt;
&lt;br /&gt;
====Install all &#039;dat&#039; files in ~/dat ====&lt;br /&gt;
&lt;br /&gt;
This step might be removed at a later date.&lt;br /&gt;
&lt;br /&gt;
This will cause all test databases to immediately restart and load any &#039;dat&#039; file changes into dictionaries and data files and also create any new or modified pgsql functions.&lt;br /&gt;
&lt;br /&gt;
If any ~/neosys/src/dat files were edited:&lt;br /&gt;
&lt;br /&gt;
 cd ~/neosys/src &amp;amp;&amp;amp; ./compall&lt;br /&gt;
&lt;br /&gt;
and/or, if exodus/service/dat files were edited&lt;br /&gt;
&lt;br /&gt;
 cd ~/exodus/service/src &amp;amp;&amp;amp; ./compall&lt;br /&gt;
&lt;br /&gt;
====Copy all programs and &#039;dat&#039; files to live====&lt;br /&gt;
&lt;br /&gt;
This will cause all live databases to automatically restart and do the same as the test databases mentioned above.&lt;br /&gt;
&lt;br /&gt;
 cd ~/exodus/service &amp;amp;&amp;amp; ./copyall CONFIRM&lt;br /&gt;
​&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=EXODUS_Knowledge&amp;diff=3901</id>
		<title>EXODUS Knowledge</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=EXODUS_Knowledge&amp;diff=3901"/>
		<updated>2021-12-06T10:03:15Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* &amp;#039;dat&amp;#039; files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==TMUX Screens==&lt;br /&gt;
&lt;br /&gt;
To create the EXODUS maintenance/programming environment&lt;br /&gt;
 exodus#: ./tmux.exodus&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SCREEN NAME      STANDARD PATH                            PURPOSE&lt;br /&gt;
#ex1_root        - /root                                  - general usage &lt;br /&gt;
#exodus          - /root/exodus                           - &lt;br /&gt;
#exodus src      - /root/exodus/exodus/libexodus/exodus   - LibExodus is the core EXODUS library source files (emulating AREV CRUD)&lt;br /&gt;
#exo cli         - /root/exodus/cli/src                   - Core EXODUS program which can be executed from bash (clearfile, edir, edic, compile)&lt;br /&gt;
#service         - /root/exodus/service                   - Default working environment for EXODUS only service, including EXODUS core www and data directories. Also used to keep NEOSYS database installation scripts.&lt;br /&gt;
#ser src         - /root/exodus/service/src               -&lt;br /&gt;
#neosys          - /root/neosys                           - ./doall&lt;br /&gt;
#neo src         - /root/neosys/src                       -&lt;br /&gt;
#hosts           - /root/hosts                            -   &lt;br /&gt;
#test src        - /root/exodus/test/src                  - &lt;br /&gt;
#t10             - ~/                                     - &lt;br /&gt;
#t11             - ~/                                     - &lt;br /&gt;
#t12             - ~/                                     - &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Object Code/Libraries===&lt;br /&gt;
LIVE and TEST processes use different sets of object code.&lt;br /&gt;
TEST processes use libraries in ~/lib/, whereas LIVE processes use object code in ~/neo/lib&lt;br /&gt;
&lt;br /&gt;
This means development &amp;amp; testing can be done stress free on TEST database, as opposed to testing on production databases.&lt;br /&gt;
&lt;br /&gt;
When compiling using edic, the TEST object code is updated if the compilation is successful. (~/lib)&lt;br /&gt;
In order to apply a tested patch to LIVE see [[Update LIVE programs]].&lt;br /&gt;
&lt;br /&gt;
===Dictionaries===&lt;br /&gt;
Dictionaries, the files used to describe the fields of a file&#039;s record.&lt;br /&gt;
Unlike in AREV, there is a copy of all dictionaries in each pgsql database (In AREV, updating a dictionary would affect all the databases).&lt;br /&gt;
&lt;br /&gt;
===Processes===&lt;br /&gt;
The TEST process for all database use the same object code stored in /root/lib, whereas all LIVE process use the object code in /root/neo/.&lt;br /&gt;
&lt;br /&gt;
===Postgres===&lt;br /&gt;
Connect into postgres shell:&lt;br /&gt;
 sudo -u postgres psql&lt;br /&gt;
&lt;br /&gt;
List databases once in postgres shell:&lt;br /&gt;
 \l&lt;br /&gt;
&lt;br /&gt;
Delete a database:&lt;br /&gt;
 sudo -u postgres dropdb &amp;lt;dbcode&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===./doall===&lt;br /&gt;
&lt;br /&gt;
====General====&lt;br /&gt;
Screen 6: ./doall script contains all the necessary information(codes) to setup an installation.&lt;br /&gt;
It includes scripts to backup, restore, create an Apache site, create/start/stop/status a service, import an AREV database into postgres and more.&lt;br /&gt;
&lt;br /&gt;
====backup_db====&lt;br /&gt;
&lt;br /&gt;
*Does a backup &amp;amp; restore of a LIVE database into the corresponding TEST database.&lt;br /&gt;
*Backup &amp;lt;dbcode&amp;gt;.sql file is written to /root/backups/sql; which is rsynced to nl19:/backups/current/exodus/&lt;br /&gt;
*Unlike AREV, postgres can perform a &amp;quot;backup&amp;quot; of a database whilst the system is in use.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Git==&lt;br /&gt;
&lt;br /&gt;
There are two repositories, one for EXODUS and the other for NEOSYS.&lt;br /&gt;
&lt;br /&gt;
===Using git to make changes===&lt;br /&gt;
&lt;br /&gt;
Before following steps you must have a tested updated to a program/file/script. Do not commit untested changes to avoid a messy git history of reverts.&lt;br /&gt;
&lt;br /&gt;
Update your local repo before committing to local repo using the g alias for &amp;quot;git pull --ff-only ; git push &amp;amp;&amp;amp; git status&#039;&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;g&amp;lt;/pre&amp;gt;&lt;br /&gt;
Check which updates/files have not yet been staged and/or committed:&lt;br /&gt;
Add your updates to the staged area:&lt;br /&gt;
&amp;lt;pre&amp;gt;git add &amp;lt;filename&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
or if all the changes made need to be staged:&lt;br /&gt;
&amp;lt;pre&amp;gt;git add -a&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make a commit with a descriptive message on purpose of updates:&lt;br /&gt;
&amp;lt;pre&amp;gt;git commit -m &amp;lt;description n purpose of changes&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Again use g alias:&lt;br /&gt;
&amp;lt;pre&amp;gt;g&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Other useful git cmds===&lt;br /&gt;
&lt;br /&gt;
Do not use this commands unless you know what WILL happen. &lt;br /&gt;
*git pull - Instead use the safe &amp;quot;git pull --ff-only&amp;quot;&lt;br /&gt;
Stick to the alias &amp;quot;g&amp;quot; which does &amp;quot;git pull --ff-only ; git push &amp;amp;&amp;amp; git status&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*git log - display history of commits to master branch&lt;br /&gt;
*git diff - display the differences in files between working files and files in local repo.&lt;br /&gt;
*git status - display: which updated files are staged/not staged(tracked)&lt;br /&gt;
*git stash - &lt;br /&gt;
*git branch - switch to a new branch&lt;br /&gt;
*git branch &amp;lt;branchname&amp;gt; - will switch to this branch only if it exists&lt;br /&gt;
*git checkout - DESTROYS/Updates the state of local working directory with the state of the files in the local repo. (YOU WILL LOSE non staged updates)&lt;br /&gt;
*git restore &amp;lt;filename&amp;gt; - DESTROYS/Updates the file with the version in the local repo. (like with git checkout but for a specific file)&lt;br /&gt;
*git checkin - &lt;br /&gt;
*git revert &amp;lt;commitHash&amp;gt; - reverses a specific commit (use git log to get the chosen commit hash)&lt;br /&gt;
&lt;br /&gt;
==Converting AREV to EXODUS==&lt;br /&gt;
===Decompile AREV to C++===&lt;br /&gt;
(Do in win10a Maintenance mode)&lt;br /&gt;
&lt;br /&gt;
#Apply tested patch to win10a (master AREV Dev system)&lt;br /&gt;
#ATTACH ADECOMC &lt;br /&gt;
#*ADECOM &amp;lt;programname&amp;gt;   *single program&lt;br /&gt;
#*ADECOMALL                          *all programs   (CHECK THIS FIRST)&lt;br /&gt;
#*ADECOM &amp;lt;prog1&amp;gt; &amp;lt;prog2&amp;gt; *(CHECK IF THIS WORKS)&lt;br /&gt;
&lt;br /&gt;
===Send c++ files from win10a to nl19===&lt;br /&gt;
(Do in win10a Cygwin)&lt;br /&gt;
&lt;br /&gt;
#/d/exodus/arev/syncup.sh&lt;br /&gt;
&lt;br /&gt;
===Get c++ files from nl19 to exodus===&lt;br /&gt;
(Do in Exodus system)&lt;br /&gt;
&lt;br /&gt;
#If cpp in SYS then: ~/exodus/service/src ./getpickos&lt;br /&gt;
#If cpp in MED JOB FIN GEN AGY then: *~/neosys/src ./getpickos&lt;br /&gt;
#Compile single cpp then: c &amp;lt;programname&amp;gt; e.g &amp;quot;c monitor2&amp;quot;&lt;br /&gt;
#Compile all cpp then: ./compall (PENDING WHICH/WHERE? many compall)&lt;br /&gt;
&lt;br /&gt;
===Compile C++ files to TEST system===&lt;br /&gt;
&lt;br /&gt;
#*./test &amp;lt;DBNAME&amp;gt;&lt;br /&gt;
#*~/neosys ./doall TEST &amp;lt;DBNAME&amp;gt; restart    #to get one service to start start using the new lib files&lt;br /&gt;
#*~/neosys ./doall TEST all restart                    #to get all the services to start start using the new lib files&lt;br /&gt;
&lt;br /&gt;
===Install C++ files to LIVE System===&lt;br /&gt;
WARNING&lt;br /&gt;
&lt;br /&gt;
#~/exodus/service/ ./copyall            #to copy all the ~/lib and bin files to ~/live/lib and bin ... which is used by all exodus/live services&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Writing Standard Exodus Core Function/Method Testing==&lt;br /&gt;
Screen 9: ~/exodus/test/src/&lt;br /&gt;
There are a series of test programs that check whether methods/functions behave as intended.&lt;br /&gt;
They do this using the function, assert.. a 1 or more argument values produce one and only one output)&lt;br /&gt;
&lt;br /&gt;
e.g test_multilang.cpp or test_sort.cpp&lt;br /&gt;
&lt;br /&gt;
Two methods of running test programs:&lt;br /&gt;
*Screen 9: make test&lt;br /&gt;
*after compiling using edic/compile/c, enter test_prog_name. (Since compile has moved it to ~/bin)&lt;br /&gt;
&lt;br /&gt;
Difference between the two methods is make calls gdb directly;&lt;br /&gt;
whereas ~/bin/test_prog_name uses exodus compile program&lt;br /&gt;
#~/neosys ./doall LIVE all restart&lt;br /&gt;
&lt;br /&gt;
==Updating a pgsql function in an exodus dictionary==&lt;br /&gt;
&lt;br /&gt;
PENDING&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting postfix emailing issues==&lt;br /&gt;
&lt;br /&gt;
To view current configuration in main.cf&lt;br /&gt;
 postconf -n&lt;br /&gt;
&lt;br /&gt;
To update the value of a parameter&lt;br /&gt;
 postconf relayhost=mailout.neosys.com:2500&lt;br /&gt;
&lt;br /&gt;
To restart postfix service&lt;br /&gt;
 service postfix restart&lt;br /&gt;
&lt;br /&gt;
Send a test email using &amp;quot;mail&amp;quot; and watch the logs to verify&lt;br /&gt;
 mail &amp;lt;email&amp;gt;&lt;br /&gt;
 journalctl -f&lt;br /&gt;
&lt;br /&gt;
==Development and deployment using &#039;dat&#039; files==&lt;br /&gt;
&lt;br /&gt;
===Rationale===&lt;br /&gt;
&lt;br /&gt;
Part of system development is the creation of various data that is neither programs nor layout i.e. not cpp, h, html, js, php files etc.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
*Dictionaries are data about data.&lt;br /&gt;
*Language files are data about text to use for various languages.&lt;br /&gt;
*“Change logs” are data about changes in the system.&lt;br /&gt;
&lt;br /&gt;
Historically, in EXODUS and NEOSYS, the above data has been deployed in exodus database files using SQL text files. However SQL files are not convenient for development.&lt;br /&gt;
&lt;br /&gt;
Therefore, &#039;dat&#039; text files will be used now so that standard development tools including editors and git can be fully exploited.&lt;br /&gt;
&lt;br /&gt;
===&#039;dat&#039; files===&lt;br /&gt;
&lt;br /&gt;
Each database file is represented by an os directory of the same name.&lt;br /&gt;
&lt;br /&gt;
Each record in the database file is represented by an os text file where filename is the primary key.&lt;br /&gt;
&lt;br /&gt;
For example a record with key &#039;&#039;&#039;DEADLINE&#039;&#039;&#039; in a dat file &#039;&#039;&#039;dict.materials&#039;&#039;&#039; would be represented as an os text file &#039;&#039;&#039;dat/dict.materials/DEADLINE&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Each line in the os text file represents one field in the db record. In other words, db record FM characters are represented by new line characters in &#039;dat&#039; files. Any actual new line characters required in the record, and any backslashes, are escaped and appear as &#039;\n&#039; and &#039;\\&#039; in &#039;dat&#039; files. Other database field separator characters such as VM, SM, TM and STM are stored without any conversion.&lt;br /&gt;
&lt;br /&gt;
===Location of dat files===&lt;br /&gt;
&lt;br /&gt;
The development versions are stored in exodus and neosys src/dat dirs. They form part of the standard git repositories in parallel with cpp files.&lt;br /&gt;
&lt;br /&gt;
The operational versions are stored in ~/dat and ~/live/dat alongside bin and lib dirs and are automatically installed into databases as database files on service startup. Any database functions embedded in the text files (pgsql) are also automatically installed at the same time.&lt;br /&gt;
&lt;br /&gt;
===Editing and deploying a &#039;dat&#039; file===&lt;br /&gt;
&lt;br /&gt;
It is currently a three step process to edit and deploy such &#039;dat&#039; files. &lt;br /&gt;
&lt;br /&gt;
====Edit the &#039;dat&#039; file====&lt;br /&gt;
&lt;br /&gt;
Note that EXODUS service and NEOSYS have different src/dat folders.&lt;br /&gt;
&lt;br /&gt;
Editing language items:&lt;br /&gt;
&lt;br /&gt;
 edir dat/alanguage/SCHEDULES*ARABIC&lt;br /&gt;
&lt;br /&gt;
Editing a dictionary item:&lt;br /&gt;
&lt;br /&gt;
 edir dat/dict.materials/DEADLINE&lt;br /&gt;
&lt;br /&gt;
Editing a pgsql function in a dictionary:&lt;br /&gt;
&lt;br /&gt;
 edir dat/dict.materials/DEADLINE 8&lt;br /&gt;
&lt;br /&gt;
====Install all &#039;dat&#039; files====&lt;br /&gt;
&lt;br /&gt;
This step might be removed at a later date.&lt;br /&gt;
&lt;br /&gt;
This will cause all test databases to immediately restart and load any &#039;dat&#039; file changes into dictionaries and data files and also create any new or modified pgsql functions.&lt;br /&gt;
&lt;br /&gt;
If any ~/neosys/src/dat files were edited:&lt;br /&gt;
&lt;br /&gt;
 cd ~/neosys/src &amp;amp;&amp;amp; ./compall&lt;br /&gt;
&lt;br /&gt;
and/or, if exodus/service/dat files were edited&lt;br /&gt;
&lt;br /&gt;
 cd ~/exodus/service/src &amp;amp;&amp;amp; ./compall&lt;br /&gt;
&lt;br /&gt;
====Copy all programs and &#039;dat&#039; files to live====&lt;br /&gt;
&lt;br /&gt;
This will cause all live databases to automatically restart and do the same as the test databases mentioned above.&lt;br /&gt;
&lt;br /&gt;
 cd ~/exodus/service &amp;amp;&amp;amp; ./copyall CONFIRM&lt;br /&gt;
​&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=EXODUS_Knowledge&amp;diff=3900</id>
		<title>EXODUS Knowledge</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=EXODUS_Knowledge&amp;diff=3900"/>
		<updated>2021-12-06T09:50:43Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* &amp;#039;dat&amp;#039; files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==TMUX Screens==&lt;br /&gt;
&lt;br /&gt;
To create the EXODUS maintenance/programming environment&lt;br /&gt;
 exodus#: ./tmux.exodus&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SCREEN NAME      STANDARD PATH                            PURPOSE&lt;br /&gt;
#ex1_root        - /root                                  - general usage &lt;br /&gt;
#exodus          - /root/exodus                           - &lt;br /&gt;
#exodus src      - /root/exodus/exodus/libexodus/exodus   - LibExodus is the core EXODUS library source files (emulating AREV CRUD)&lt;br /&gt;
#exo cli         - /root/exodus/cli/src                   - Core EXODUS program which can be executed from bash (clearfile, edir, edic, compile)&lt;br /&gt;
#service         - /root/exodus/service                   - Default working environment for EXODUS only service, including EXODUS core www and data directories. Also used to keep NEOSYS database installation scripts.&lt;br /&gt;
#ser src         - /root/exodus/service/src               -&lt;br /&gt;
#neosys          - /root/neosys                           - ./doall&lt;br /&gt;
#neo src         - /root/neosys/src                       -&lt;br /&gt;
#hosts           - /root/hosts                            -   &lt;br /&gt;
#test src        - /root/exodus/test/src                  - &lt;br /&gt;
#t10             - ~/                                     - &lt;br /&gt;
#t11             - ~/                                     - &lt;br /&gt;
#t12             - ~/                                     - &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Object Code/Libraries===&lt;br /&gt;
LIVE and TEST processes use different sets of object code.&lt;br /&gt;
TEST processes use libraries in ~/lib/, whereas LIVE processes use object code in ~/neo/lib&lt;br /&gt;
&lt;br /&gt;
This means development &amp;amp; testing can be done stress free on TEST database, as opposed to testing on production databases.&lt;br /&gt;
&lt;br /&gt;
When compiling using edic, the TEST object code is updated if the compilation is successful. (~/lib)&lt;br /&gt;
In order to apply a tested patch to LIVE see [[Update LIVE programs]].&lt;br /&gt;
&lt;br /&gt;
===Dictionaries===&lt;br /&gt;
Dictionaries, the files used to describe the fields of a file&#039;s record.&lt;br /&gt;
Unlike in AREV, there is a copy of all dictionaries in each pgsql database (In AREV, updating a dictionary would affect all the databases).&lt;br /&gt;
&lt;br /&gt;
===Processes===&lt;br /&gt;
The TEST process for all database use the same object code stored in /root/lib, whereas all LIVE process use the object code in /root/neo/.&lt;br /&gt;
&lt;br /&gt;
===Postgres===&lt;br /&gt;
Connect into postgres shell:&lt;br /&gt;
 sudo -u postgres psql&lt;br /&gt;
&lt;br /&gt;
List databases once in postgres shell:&lt;br /&gt;
 \l&lt;br /&gt;
&lt;br /&gt;
Delete a database:&lt;br /&gt;
 sudo -u postgres dropdb &amp;lt;dbcode&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===./doall===&lt;br /&gt;
&lt;br /&gt;
====General====&lt;br /&gt;
Screen 6: ./doall script contains all the necessary information(codes) to setup an installation.&lt;br /&gt;
It includes scripts to backup, restore, create an Apache site, create/start/stop/status a service, import an AREV database into postgres and more.&lt;br /&gt;
&lt;br /&gt;
====backup_db====&lt;br /&gt;
&lt;br /&gt;
*Does a backup &amp;amp; restore of a LIVE database into the corresponding TEST database.&lt;br /&gt;
*Backup &amp;lt;dbcode&amp;gt;.sql file is written to /root/backups/sql; which is rsynced to nl19:/backups/current/exodus/&lt;br /&gt;
*Unlike AREV, postgres can perform a &amp;quot;backup&amp;quot; of a database whilst the system is in use.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Git==&lt;br /&gt;
&lt;br /&gt;
There are two repositories, one for EXODUS and the other for NEOSYS.&lt;br /&gt;
&lt;br /&gt;
===Using git to make changes===&lt;br /&gt;
&lt;br /&gt;
Before following steps you must have a tested updated to a program/file/script. Do not commit untested changes to avoid a messy git history of reverts.&lt;br /&gt;
&lt;br /&gt;
Update your local repo before committing to local repo using the g alias for &amp;quot;git pull --ff-only ; git push &amp;amp;&amp;amp; git status&#039;&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;g&amp;lt;/pre&amp;gt;&lt;br /&gt;
Check which updates/files have not yet been staged and/or committed:&lt;br /&gt;
Add your updates to the staged area:&lt;br /&gt;
&amp;lt;pre&amp;gt;git add &amp;lt;filename&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
or if all the changes made need to be staged:&lt;br /&gt;
&amp;lt;pre&amp;gt;git add -a&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make a commit with a descriptive message on purpose of updates:&lt;br /&gt;
&amp;lt;pre&amp;gt;git commit -m &amp;lt;description n purpose of changes&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Again use g alias:&lt;br /&gt;
&amp;lt;pre&amp;gt;g&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Other useful git cmds===&lt;br /&gt;
&lt;br /&gt;
Do not use this commands unless you know what WILL happen. &lt;br /&gt;
*git pull - Instead use the safe &amp;quot;git pull --ff-only&amp;quot;&lt;br /&gt;
Stick to the alias &amp;quot;g&amp;quot; which does &amp;quot;git pull --ff-only ; git push &amp;amp;&amp;amp; git status&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*git log - display history of commits to master branch&lt;br /&gt;
*git diff - display the differences in files between working files and files in local repo.&lt;br /&gt;
*git status - display: which updated files are staged/not staged(tracked)&lt;br /&gt;
*git stash - &lt;br /&gt;
*git branch - switch to a new branch&lt;br /&gt;
*git branch &amp;lt;branchname&amp;gt; - will switch to this branch only if it exists&lt;br /&gt;
*git checkout - DESTROYS/Updates the state of local working directory with the state of the files in the local repo. (YOU WILL LOSE non staged updates)&lt;br /&gt;
*git restore &amp;lt;filename&amp;gt; - DESTROYS/Updates the file with the version in the local repo. (like with git checkout but for a specific file)&lt;br /&gt;
*git checkin - &lt;br /&gt;
*git revert &amp;lt;commitHash&amp;gt; - reverses a specific commit (use git log to get the chosen commit hash)&lt;br /&gt;
&lt;br /&gt;
==Converting AREV to EXODUS==&lt;br /&gt;
===Decompile AREV to C++===&lt;br /&gt;
(Do in win10a Maintenance mode)&lt;br /&gt;
&lt;br /&gt;
#Apply tested patch to win10a (master AREV Dev system)&lt;br /&gt;
#ATTACH ADECOMC &lt;br /&gt;
#*ADECOM &amp;lt;programname&amp;gt;   *single program&lt;br /&gt;
#*ADECOMALL                          *all programs   (CHECK THIS FIRST)&lt;br /&gt;
#*ADECOM &amp;lt;prog1&amp;gt; &amp;lt;prog2&amp;gt; *(CHECK IF THIS WORKS)&lt;br /&gt;
&lt;br /&gt;
===Send c++ files from win10a to nl19===&lt;br /&gt;
(Do in win10a Cygwin)&lt;br /&gt;
&lt;br /&gt;
#/d/exodus/arev/syncup.sh&lt;br /&gt;
&lt;br /&gt;
===Get c++ files from nl19 to exodus===&lt;br /&gt;
(Do in Exodus system)&lt;br /&gt;
&lt;br /&gt;
#If cpp in SYS then: ~/exodus/service/src ./getpickos&lt;br /&gt;
#If cpp in MED JOB FIN GEN AGY then: *~/neosys/src ./getpickos&lt;br /&gt;
#Compile single cpp then: c &amp;lt;programname&amp;gt; e.g &amp;quot;c monitor2&amp;quot;&lt;br /&gt;
#Compile all cpp then: ./compall (PENDING WHICH/WHERE? many compall)&lt;br /&gt;
&lt;br /&gt;
===Compile C++ files to TEST system===&lt;br /&gt;
&lt;br /&gt;
#*./test &amp;lt;DBNAME&amp;gt;&lt;br /&gt;
#*~/neosys ./doall TEST &amp;lt;DBNAME&amp;gt; restart    #to get one service to start start using the new lib files&lt;br /&gt;
#*~/neosys ./doall TEST all restart                    #to get all the services to start start using the new lib files&lt;br /&gt;
&lt;br /&gt;
===Install C++ files to LIVE System===&lt;br /&gt;
WARNING&lt;br /&gt;
&lt;br /&gt;
#~/exodus/service/ ./copyall            #to copy all the ~/lib and bin files to ~/live/lib and bin ... which is used by all exodus/live services&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Writing Standard Exodus Core Function/Method Testing==&lt;br /&gt;
Screen 9: ~/exodus/test/src/&lt;br /&gt;
There are a series of test programs that check whether methods/functions behave as intended.&lt;br /&gt;
They do this using the function, assert.. a 1 or more argument values produce one and only one output)&lt;br /&gt;
&lt;br /&gt;
e.g test_multilang.cpp or test_sort.cpp&lt;br /&gt;
&lt;br /&gt;
Two methods of running test programs:&lt;br /&gt;
*Screen 9: make test&lt;br /&gt;
*after compiling using edic/compile/c, enter test_prog_name. (Since compile has moved it to ~/bin)&lt;br /&gt;
&lt;br /&gt;
Difference between the two methods is make calls gdb directly;&lt;br /&gt;
whereas ~/bin/test_prog_name uses exodus compile program&lt;br /&gt;
#~/neosys ./doall LIVE all restart&lt;br /&gt;
&lt;br /&gt;
==Updating a pgsql function in an exodus dictionary==&lt;br /&gt;
&lt;br /&gt;
PENDING&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting postfix emailing issues==&lt;br /&gt;
&lt;br /&gt;
To view current configuration in main.cf&lt;br /&gt;
 postconf -n&lt;br /&gt;
&lt;br /&gt;
To update the value of a parameter&lt;br /&gt;
 postconf relayhost=mailout.neosys.com:2500&lt;br /&gt;
&lt;br /&gt;
To restart postfix service&lt;br /&gt;
 service postfix restart&lt;br /&gt;
&lt;br /&gt;
Send a test email using &amp;quot;mail&amp;quot; and watch the logs to verify&lt;br /&gt;
 mail &amp;lt;email&amp;gt;&lt;br /&gt;
 journalctl -f&lt;br /&gt;
&lt;br /&gt;
==Development and deployment using &#039;dat&#039; files==&lt;br /&gt;
&lt;br /&gt;
===Rationale===&lt;br /&gt;
&lt;br /&gt;
Part of system development is the creation of various data that is neither programs nor layout i.e. not cpp, h, html, js, php files etc.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
*Dictionaries are data about data.&lt;br /&gt;
*Language files are data about text to use for various languages.&lt;br /&gt;
*“Change logs” are data about changes in the system.&lt;br /&gt;
&lt;br /&gt;
Historically, in EXODUS and NEOSYS, the above data has been deployed in exodus database files using SQL text files. However SQL files are not convenient for development.&lt;br /&gt;
&lt;br /&gt;
Therefore, &#039;dat&#039; text files will be used now so that standard development tools including editors and git can be fully exploited.&lt;br /&gt;
&lt;br /&gt;
===&#039;dat&#039; files===&lt;br /&gt;
&lt;br /&gt;
Each database file is represented by an os directory of the same name.&lt;br /&gt;
&lt;br /&gt;
Each record in the database file is represented by an os text file where filename is the primary key.&lt;br /&gt;
&lt;br /&gt;
For example a record with key &#039;&#039;&#039;DEADLINE&#039;&#039;&#039; in a dat file &#039;&#039;&#039;dict.materials&#039;&#039;&#039; would be represented as an os text file &#039;&#039;&#039;dat/dict.materials/DEADLINE&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Each line in the os text file represents one field in the db record. In other words, db record FM characters are represented by new line characters in &#039;dat&#039; files. Any actual new line characters required in the record, and any backslashes, are escaped and appear as &#039;\n&#039; and &#039;\\&#039; in &#039;dat&#039; files. Other database field separator characters such as VM, SM, TM and STM are stored without any conversion.&lt;br /&gt;
&lt;br /&gt;
The text files are automatically installed into databases as database files on service startup. Any database functions embedded in the text files, like pgsql, are also automatically installed at the same time.&lt;br /&gt;
&lt;br /&gt;
===Editing and deploying a &#039;dat&#039; file===&lt;br /&gt;
&lt;br /&gt;
It is currently a three step process to edit and deploy such &#039;dat&#039; files. &lt;br /&gt;
&lt;br /&gt;
====Edit the &#039;dat&#039; file====&lt;br /&gt;
&lt;br /&gt;
Note that EXODUS service and NEOSYS have different src/dat folders.&lt;br /&gt;
&lt;br /&gt;
Editing language items:&lt;br /&gt;
&lt;br /&gt;
 edir dat/alanguage/SCHEDULES*ARABIC&lt;br /&gt;
&lt;br /&gt;
Editing a dictionary item:&lt;br /&gt;
&lt;br /&gt;
 edir dat/dict.materials/DEADLINE&lt;br /&gt;
&lt;br /&gt;
Editing a pgsql function in a dictionary:&lt;br /&gt;
&lt;br /&gt;
 edir dat/dict.materials/DEADLINE 8&lt;br /&gt;
&lt;br /&gt;
====Install all &#039;dat&#039; files====&lt;br /&gt;
&lt;br /&gt;
This step might be removed at a later date.&lt;br /&gt;
&lt;br /&gt;
This will cause all test databases to immediately restart and load any &#039;dat&#039; file changes into dictionaries and data files and also create any new or modified pgsql functions.&lt;br /&gt;
&lt;br /&gt;
If any ~/neosys/src/dat files were edited:&lt;br /&gt;
&lt;br /&gt;
 cd ~/neosys/src &amp;amp;&amp;amp; ./compall&lt;br /&gt;
&lt;br /&gt;
and/or, if exodus/service/dat files were edited&lt;br /&gt;
&lt;br /&gt;
 cd ~/exodus/service/src &amp;amp;&amp;amp; ./compall&lt;br /&gt;
&lt;br /&gt;
====Copy all programs and &#039;dat&#039; files to live====&lt;br /&gt;
&lt;br /&gt;
This will cause all live databases to automatically restart and do the same as the test databases mentioned above.&lt;br /&gt;
&lt;br /&gt;
 cd ~/exodus/service &amp;amp;&amp;amp; ./copyall CONFIRM&lt;br /&gt;
​&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=EXODUS_Knowledge&amp;diff=3899</id>
		<title>EXODUS Knowledge</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=EXODUS_Knowledge&amp;diff=3899"/>
		<updated>2021-12-06T07:23:39Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Install all &amp;#039;dat&amp;#039; files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==TMUX Screens==&lt;br /&gt;
&lt;br /&gt;
To create the EXODUS maintenance/programming environment&lt;br /&gt;
 exodus#: ./tmux.exodus&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SCREEN NAME      STANDARD PATH                            PURPOSE&lt;br /&gt;
#ex1_root        - /root                                  - general usage &lt;br /&gt;
#exodus          - /root/exodus                           - &lt;br /&gt;
#exodus src      - /root/exodus/exodus/libexodus/exodus   - LibExodus is the core EXODUS library source files (emulating AREV CRUD)&lt;br /&gt;
#exo cli         - /root/exodus/cli/src                   - Core EXODUS program which can be executed from bash (clearfile, edir, edic, compile)&lt;br /&gt;
#service         - /root/exodus/service                   - Default working environment for EXODUS only service, including EXODUS core www and data directories. Also used to keep NEOSYS database installation scripts.&lt;br /&gt;
#ser src         - /root/exodus/service/src               -&lt;br /&gt;
#neosys          - /root/neosys                           - ./doall&lt;br /&gt;
#neo src         - /root/neosys/src                       -&lt;br /&gt;
#hosts           - /root/hosts                            -   &lt;br /&gt;
#test src        - /root/exodus/test/src                  - &lt;br /&gt;
#t10             - ~/                                     - &lt;br /&gt;
#t11             - ~/                                     - &lt;br /&gt;
#t12             - ~/                                     - &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Object Code/Libraries===&lt;br /&gt;
LIVE and TEST processes use different sets of object code.&lt;br /&gt;
TEST processes use libraries in ~/lib/, whereas LIVE processes use object code in ~/neo/lib&lt;br /&gt;
&lt;br /&gt;
This means development &amp;amp; testing can be done stress free on TEST database, as opposed to testing on production databases.&lt;br /&gt;
&lt;br /&gt;
When compiling using edic, the TEST object code is updated if the compilation is successful. (~/lib)&lt;br /&gt;
In order to apply a tested patch to LIVE see [[Update LIVE programs]].&lt;br /&gt;
&lt;br /&gt;
===Dictionaries===&lt;br /&gt;
Dictionaries, the files used to describe the fields of a file&#039;s record.&lt;br /&gt;
Unlike in AREV, there is a copy of all dictionaries in each pgsql database (In AREV, updating a dictionary would affect all the databases).&lt;br /&gt;
&lt;br /&gt;
===Processes===&lt;br /&gt;
The TEST process for all database use the same object code stored in /root/lib, whereas all LIVE process use the object code in /root/neo/.&lt;br /&gt;
&lt;br /&gt;
===Postgres===&lt;br /&gt;
Connect into postgres shell:&lt;br /&gt;
 sudo -u postgres psql&lt;br /&gt;
&lt;br /&gt;
List databases once in postgres shell:&lt;br /&gt;
 \l&lt;br /&gt;
&lt;br /&gt;
Delete a database:&lt;br /&gt;
 sudo -u postgres dropdb &amp;lt;dbcode&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===./doall===&lt;br /&gt;
&lt;br /&gt;
====General====&lt;br /&gt;
Screen 6: ./doall script contains all the necessary information(codes) to setup an installation.&lt;br /&gt;
It includes scripts to backup, restore, create an Apache site, create/start/stop/status a service, import an AREV database into postgres and more.&lt;br /&gt;
&lt;br /&gt;
====backup_db====&lt;br /&gt;
&lt;br /&gt;
*Does a backup &amp;amp; restore of a LIVE database into the corresponding TEST database.&lt;br /&gt;
*Backup &amp;lt;dbcode&amp;gt;.sql file is written to /root/backups/sql; which is rsynced to nl19:/backups/current/exodus/&lt;br /&gt;
*Unlike AREV, postgres can perform a &amp;quot;backup&amp;quot; of a database whilst the system is in use.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Git==&lt;br /&gt;
&lt;br /&gt;
There are two repositories, one for EXODUS and the other for NEOSYS.&lt;br /&gt;
&lt;br /&gt;
===Using git to make changes===&lt;br /&gt;
&lt;br /&gt;
Before following steps you must have a tested updated to a program/file/script. Do not commit untested changes to avoid a messy git history of reverts.&lt;br /&gt;
&lt;br /&gt;
Update your local repo before committing to local repo using the g alias for &amp;quot;git pull --ff-only ; git push &amp;amp;&amp;amp; git status&#039;&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;g&amp;lt;/pre&amp;gt;&lt;br /&gt;
Check which updates/files have not yet been staged and/or committed:&lt;br /&gt;
Add your updates to the staged area:&lt;br /&gt;
&amp;lt;pre&amp;gt;git add &amp;lt;filename&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
or if all the changes made need to be staged:&lt;br /&gt;
&amp;lt;pre&amp;gt;git add -a&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make a commit with a descriptive message on purpose of updates:&lt;br /&gt;
&amp;lt;pre&amp;gt;git commit -m &amp;lt;description n purpose of changes&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Again use g alias:&lt;br /&gt;
&amp;lt;pre&amp;gt;g&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Other useful git cmds===&lt;br /&gt;
&lt;br /&gt;
Do not use this commands unless you know what WILL happen. &lt;br /&gt;
*git pull - Instead use the safe &amp;quot;git pull --ff-only&amp;quot;&lt;br /&gt;
Stick to the alias &amp;quot;g&amp;quot; which does &amp;quot;git pull --ff-only ; git push &amp;amp;&amp;amp; git status&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*git log - display history of commits to master branch&lt;br /&gt;
*git diff - display the differences in files between working files and files in local repo.&lt;br /&gt;
*git status - display: which updated files are staged/not staged(tracked)&lt;br /&gt;
*git stash - &lt;br /&gt;
*git branch - switch to a new branch&lt;br /&gt;
*git branch &amp;lt;branchname&amp;gt; - will switch to this branch only if it exists&lt;br /&gt;
*git checkout - DESTROYS/Updates the state of local working directory with the state of the files in the local repo. (YOU WILL LOSE non staged updates)&lt;br /&gt;
*git restore &amp;lt;filename&amp;gt; - DESTROYS/Updates the file with the version in the local repo. (like with git checkout but for a specific file)&lt;br /&gt;
*git checkin - &lt;br /&gt;
*git revert &amp;lt;commitHash&amp;gt; - reverses a specific commit (use git log to get the chosen commit hash)&lt;br /&gt;
&lt;br /&gt;
==Converting AREV to EXODUS==&lt;br /&gt;
===Decompile AREV to C++===&lt;br /&gt;
(Do in win10a Maintenance mode)&lt;br /&gt;
&lt;br /&gt;
#Apply tested patch to win10a (master AREV Dev system)&lt;br /&gt;
#ATTACH ADECOMC &lt;br /&gt;
#*ADECOM &amp;lt;programname&amp;gt;   *single program&lt;br /&gt;
#*ADECOMALL                          *all programs   (CHECK THIS FIRST)&lt;br /&gt;
#*ADECOM &amp;lt;prog1&amp;gt; &amp;lt;prog2&amp;gt; *(CHECK IF THIS WORKS)&lt;br /&gt;
&lt;br /&gt;
===Send c++ files from win10a to nl19===&lt;br /&gt;
(Do in win10a Cygwin)&lt;br /&gt;
&lt;br /&gt;
#/d/exodus/arev/syncup.sh&lt;br /&gt;
&lt;br /&gt;
===Get c++ files from nl19 to exodus===&lt;br /&gt;
(Do in Exodus system)&lt;br /&gt;
&lt;br /&gt;
#If cpp in SYS then: ~/exodus/service/src ./getpickos&lt;br /&gt;
#If cpp in MED JOB FIN GEN AGY then: *~/neosys/src ./getpickos&lt;br /&gt;
#Compile single cpp then: c &amp;lt;programname&amp;gt; e.g &amp;quot;c monitor2&amp;quot;&lt;br /&gt;
#Compile all cpp then: ./compall (PENDING WHICH/WHERE? many compall)&lt;br /&gt;
&lt;br /&gt;
===Compile C++ files to TEST system===&lt;br /&gt;
&lt;br /&gt;
#*./test &amp;lt;DBNAME&amp;gt;&lt;br /&gt;
#*~/neosys ./doall TEST &amp;lt;DBNAME&amp;gt; restart    #to get one service to start start using the new lib files&lt;br /&gt;
#*~/neosys ./doall TEST all restart                    #to get all the services to start start using the new lib files&lt;br /&gt;
&lt;br /&gt;
===Install C++ files to LIVE System===&lt;br /&gt;
WARNING&lt;br /&gt;
&lt;br /&gt;
#~/exodus/service/ ./copyall            #to copy all the ~/lib and bin files to ~/live/lib and bin ... which is used by all exodus/live services&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Writing Standard Exodus Core Function/Method Testing==&lt;br /&gt;
Screen 9: ~/exodus/test/src/&lt;br /&gt;
There are a series of test programs that check whether methods/functions behave as intended.&lt;br /&gt;
They do this using the function, assert.. a 1 or more argument values produce one and only one output)&lt;br /&gt;
&lt;br /&gt;
e.g test_multilang.cpp or test_sort.cpp&lt;br /&gt;
&lt;br /&gt;
Two methods of running test programs:&lt;br /&gt;
*Screen 9: make test&lt;br /&gt;
*after compiling using edic/compile/c, enter test_prog_name. (Since compile has moved it to ~/bin)&lt;br /&gt;
&lt;br /&gt;
Difference between the two methods is make calls gdb directly;&lt;br /&gt;
whereas ~/bin/test_prog_name uses exodus compile program&lt;br /&gt;
#~/neosys ./doall LIVE all restart&lt;br /&gt;
&lt;br /&gt;
==Updating a pgsql function in an exodus dictionary==&lt;br /&gt;
&lt;br /&gt;
PENDING&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting postfix emailing issues==&lt;br /&gt;
&lt;br /&gt;
To view current configuration in main.cf&lt;br /&gt;
 postconf -n&lt;br /&gt;
&lt;br /&gt;
To update the value of a parameter&lt;br /&gt;
 postconf relayhost=mailout.neosys.com:2500&lt;br /&gt;
&lt;br /&gt;
To restart postfix service&lt;br /&gt;
 service postfix restart&lt;br /&gt;
&lt;br /&gt;
Send a test email using &amp;quot;mail&amp;quot; and watch the logs to verify&lt;br /&gt;
 mail &amp;lt;email&amp;gt;&lt;br /&gt;
 journalctl -f&lt;br /&gt;
&lt;br /&gt;
==Development and deployment using &#039;dat&#039; files==&lt;br /&gt;
&lt;br /&gt;
===Rationale===&lt;br /&gt;
&lt;br /&gt;
Part of system development is the creation of various data that is neither programs nor layout i.e. not cpp, h, html, js, php files etc.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
*Dictionaries are data about data.&lt;br /&gt;
*Language files are data about text to use for various languages.&lt;br /&gt;
*“Change logs” are data about changes in the system.&lt;br /&gt;
&lt;br /&gt;
Historically, in EXODUS and NEOSYS, the above data has been deployed in exodus database files using SQL text files. However SQL files are not convenient for development.&lt;br /&gt;
&lt;br /&gt;
Therefore, &#039;dat&#039; text files will be used now so that standard development tools including editors and git can be fully exploited.&lt;br /&gt;
&lt;br /&gt;
===&#039;dat&#039; files===&lt;br /&gt;
&lt;br /&gt;
Each database file is represented by an os directory of the same name.&lt;br /&gt;
&lt;br /&gt;
Each record in the database file is represented by an os text file where filename is the primary key.&lt;br /&gt;
&lt;br /&gt;
Each line in the os text file represents one field in the db record. In other words, db record FM characters are represented by new line characters in &#039;dat&#039; files. Any actual new line characters required in the record, and any backslashes, are escaped and appear as &#039;\n&#039; and &#039;\\&#039; in &#039;dat&#039; files. Other database field separator characters such as VM, SM, TM and STM are stored without any conversion.&lt;br /&gt;
&lt;br /&gt;
The text files are automatically installed into databases as database files on service startup. Any database functions embedded in the text files, like pgsql, are also automatically installed at the same time.&lt;br /&gt;
&lt;br /&gt;
===Editing and deploying a &#039;dat&#039; file===&lt;br /&gt;
&lt;br /&gt;
It is currently a three step process to edit and deploy such &#039;dat&#039; files. &lt;br /&gt;
&lt;br /&gt;
====Edit the &#039;dat&#039; file====&lt;br /&gt;
&lt;br /&gt;
Note that EXODUS service and NEOSYS have different src/dat folders.&lt;br /&gt;
&lt;br /&gt;
Editing language items:&lt;br /&gt;
&lt;br /&gt;
 edir dat/alanguage/SCHEDULES*ARABIC&lt;br /&gt;
&lt;br /&gt;
Editing a dictionary item:&lt;br /&gt;
&lt;br /&gt;
 edir dat/dict.materials/DEADLINE&lt;br /&gt;
&lt;br /&gt;
Editing a pgsql function in a dictionary:&lt;br /&gt;
&lt;br /&gt;
 edir dat/dict.materials/DEADLINE 8&lt;br /&gt;
&lt;br /&gt;
====Install all &#039;dat&#039; files====&lt;br /&gt;
&lt;br /&gt;
This step might be removed at a later date.&lt;br /&gt;
&lt;br /&gt;
This will cause all test databases to immediately restart and load any &#039;dat&#039; file changes into dictionaries and data files and also create any new or modified pgsql functions.&lt;br /&gt;
&lt;br /&gt;
If any ~/neosys/src/dat files were edited:&lt;br /&gt;
&lt;br /&gt;
 cd ~/neosys/src &amp;amp;&amp;amp; ./compall&lt;br /&gt;
&lt;br /&gt;
and/or, if exodus/service/dat files were edited&lt;br /&gt;
&lt;br /&gt;
 cd ~/exodus/service/src &amp;amp;&amp;amp; ./compall&lt;br /&gt;
&lt;br /&gt;
====Copy all programs and &#039;dat&#039; files to live====&lt;br /&gt;
&lt;br /&gt;
This will cause all live databases to automatically restart and do the same as the test databases mentioned above.&lt;br /&gt;
&lt;br /&gt;
 cd ~/exodus/service &amp;amp;&amp;amp; ./copyall CONFIRM&lt;br /&gt;
​&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=EXODUS_Knowledge&amp;diff=3869</id>
		<title>EXODUS Knowledge</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=EXODUS_Knowledge&amp;diff=3869"/>
		<updated>2021-08-23T13:20:41Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Git */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==TMUX Screens==&lt;br /&gt;
&lt;br /&gt;
To create the EXODUS maintenance/programming environment&lt;br /&gt;
 exodus#: ./tmux.exodus&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SCREEN NAME      STANDARD PATH                            PURPOSE&lt;br /&gt;
#ex1_root        - /root                                  - general usage &lt;br /&gt;
#exodus          - /root/exodus                           - &lt;br /&gt;
#exodus src      - /root/exodus/exodus/libexodus/exodus   - LibExodus is the core EXODUS library source files (emulating AREV CRUD)&lt;br /&gt;
#exo cli         - /root/exodus/cli/src                   - Core EXODUS program which can be executed from bash (clearfile, edir, edic, compile)&lt;br /&gt;
#service         - /root/exodus/service                   - Default working environment for EXODUS only service, including EXODUS core www and data directories. Also used to keep NEOSYS database installation scripts.&lt;br /&gt;
#ser src         - /root/exodus/service/src               -&lt;br /&gt;
#neosys          - /root/neosys                           - ./doall&lt;br /&gt;
#neo src         - /root/neosys/src                       -&lt;br /&gt;
#hosts           - /root/hosts                            -   &lt;br /&gt;
#test src        - /root/exodus/test/src                  - &lt;br /&gt;
#t10             - ~/                                     - &lt;br /&gt;
#t11             - ~/                                     - &lt;br /&gt;
#t12             - ~/                                     - &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Object Code/Libraries===&lt;br /&gt;
LIVE and TEST processes use different sets of object code.&lt;br /&gt;
TEST processes use libraries in ~/lib/, whereas LIVE processes use object code in ~/neo/lib&lt;br /&gt;
&lt;br /&gt;
This means development &amp;amp; testing can be done stress free on TEST database, as opposed to testing on production databases.&lt;br /&gt;
&lt;br /&gt;
When compiling using edic, the TEST object code is updated if the compilation is successful. (~/lib)&lt;br /&gt;
In order to apply a tested patch to LIVE see [[Update LIVE programs]].&lt;br /&gt;
&lt;br /&gt;
===Dictionaries===&lt;br /&gt;
Dictionaries, the files used to describe the fields of a file&#039;s record.&lt;br /&gt;
Unlike in AREV, there is a copy of all dictionaries in each pgsql database (In AREV, updating a dictionary would affect all the databases).&lt;br /&gt;
&lt;br /&gt;
===Processes===&lt;br /&gt;
The TEST process for all database use the same object code stored in /root/lib, whereas all LIVE process use the object code in /root/neo/.&lt;br /&gt;
&lt;br /&gt;
===Postgres===&lt;br /&gt;
Connect into postgres shell:&lt;br /&gt;
 sudo -u postgres psql&lt;br /&gt;
&lt;br /&gt;
List databases once in postgres shell:&lt;br /&gt;
 \l&lt;br /&gt;
&lt;br /&gt;
Delete a database:&lt;br /&gt;
 sudo -u postgres dropdb &amp;lt;dbcode&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===./doall===&lt;br /&gt;
&lt;br /&gt;
====General====&lt;br /&gt;
Screen 6: ./doall script contains all the necessary information(codes) to setup an installation.&lt;br /&gt;
It includes scripts to backup, restore, create an Apache site, create/start/stop/status a service, import an AREV database into postgres and more.&lt;br /&gt;
&lt;br /&gt;
====backup_db====&lt;br /&gt;
&lt;br /&gt;
*Does a backup &amp;amp; restore of a LIVE database into the corresponding TEST database.&lt;br /&gt;
*Backup &amp;lt;dbcode&amp;gt;.sql file is written to /root/backups/sql; which is rsynced to nl19:/backups/current/exodus/&lt;br /&gt;
*Unlike AREV, postgres can perform a &amp;quot;backup&amp;quot; of a database whilst the system is in use.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Git==&lt;br /&gt;
&lt;br /&gt;
There are two repositories, one for EXODUS and the other for NEOSYS.&lt;br /&gt;
&lt;br /&gt;
As of 22/08/21, each repo has three main branches &lt;br /&gt;
&lt;br /&gt;
* master - not used &lt;br /&gt;
* 21.08 - live on ex1 &lt;br /&gt;
* dev - the development branch &lt;br /&gt;
&lt;br /&gt;
As of 22/08/21, ex1b is a clone of ex1 but used as the development environment. &lt;br /&gt;
In order to use ex1b as development environment the &lt;br /&gt;
&lt;br /&gt;
ex1b has to be rebuilt every morning to get the development branch working otherwise it is a pure clone  of ex1 except disabled&lt;br /&gt;
&lt;br /&gt;
that is usually done early in the morning and may be automated in future using ~/neosys/onboot.sh&lt;br /&gt;
&lt;br /&gt;
there is no issue running all processes on ex1b actually since even live process emails to users are all deflected to sysmsg ie neosys&lt;br /&gt;
&lt;br /&gt;
to rebuild as the development branch in ex1b&lt;br /&gt;
&lt;br /&gt;
DONT DO THIS IN ex1!!!!!!!!!!!!!!&lt;br /&gt;
&lt;br /&gt;
#in ~/neosys screen 6&lt;br /&gt;
&lt;br /&gt;
#git stash &amp;amp;&amp;amp; git pull &amp;amp;&amp;amp; git switch dev&lt;br /&gt;
&lt;br /&gt;
#./reinstall dev dev o-&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
./reinstall first switches exodus to its dev branch and rebuilds it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Converting AREV to EXODUS==&lt;br /&gt;
===Decompile AREV to C++===&lt;br /&gt;
(Do in win10a Maintenance mode)&lt;br /&gt;
&lt;br /&gt;
#Apply tested patch to win10a (master AREV Dev system)&lt;br /&gt;
#ATTACH ADECOMC &lt;br /&gt;
#*ADECOM &amp;lt;programname&amp;gt;   *single program&lt;br /&gt;
#*ADECOMALL                          *all programs   (CHECK THIS FIRST)&lt;br /&gt;
#*ADECOM &amp;lt;prog1&amp;gt; &amp;lt;prog2&amp;gt; *(CHECK IF THIS WORKS)&lt;br /&gt;
&lt;br /&gt;
===Send c++ files from win10a to nl19===&lt;br /&gt;
(Do in win10a Cygwin)&lt;br /&gt;
&lt;br /&gt;
#/d/exodus/arev/syncup.sh&lt;br /&gt;
&lt;br /&gt;
===Get c++ files from nl19 to exodus===&lt;br /&gt;
(Do in Exodus system)&lt;br /&gt;
&lt;br /&gt;
#If cpp in SYS then: ~/exodus/service/src ./getpickos&lt;br /&gt;
#If cpp in MED JOB FIN GEN AGY then: *~/neosys/src ./getpickos&lt;br /&gt;
#Compile single cpp then: c &amp;lt;programname&amp;gt; e.g &amp;quot;c monitor2&amp;quot;&lt;br /&gt;
#Compile all cpp then: ./compall (PENDING WHICH/WHERE? many compall)&lt;br /&gt;
&lt;br /&gt;
===Compile C++ files to TEST system===&lt;br /&gt;
&lt;br /&gt;
#*./test &amp;lt;DBNAME&amp;gt;&lt;br /&gt;
#*~/neosys ./doall TEST &amp;lt;DBNAME&amp;gt; restart    #to get one service to start start using the new lib files&lt;br /&gt;
#*~/neosys ./doall TEST all restart                    #to get all the services to start start using the new lib files&lt;br /&gt;
&lt;br /&gt;
===Install C++ files to LIVE System===&lt;br /&gt;
WARNING&lt;br /&gt;
&lt;br /&gt;
#~/exodus/service/ ./copyall            #to copy all the ~/lib and bin files to ~/live/lib and bin ... which is used by all exodus/live services&lt;br /&gt;
#~/neosys ./doall LIVE all restart&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Handling_Nagios_Client_Monitoring_System&amp;diff=3832</id>
		<title>Handling Nagios Client Monitoring System</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Handling_Nagios_Client_Monitoring_System&amp;diff=3832"/>
		<updated>2021-06-06T05:07:08Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* UPDATE.xWG */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Procedure to handle Nagios==&lt;br /&gt;
&lt;br /&gt;
The procedure that support staff need to follow while handling Nagios is documented under [[Procedures#Handling_Nagios_Client_Monitoring_system| Procedures: Handling Nagios Client Monitoring System]]&lt;br /&gt;
&lt;br /&gt;
Nagios is accessed via this link: http://monitor.neosys.com/nagios3&lt;br /&gt;
&lt;br /&gt;
==Nagios services==&lt;br /&gt;
&lt;br /&gt;
Nagios is configured to display information pertaining to all NEOSYS client&#039;s server statuses which include multiple services such as:&lt;br /&gt;
&lt;br /&gt;
#HTTPS: Most of NEOSYS clients are configured to have external web access via secure HTTP protocol (port 4430) from outside office. Nagios is configured to check port 4430 on a regular interval of 10 minutes and display any issues in accessing the same.&lt;br /&gt;
#SSH: As part of the support contract, NEOSYS should have external secure access to the client server usually over port 19580. Nagios is configured to check this port on a regular interval of 10 minutes and display any issues in accessing the same.&lt;br /&gt;
#Ping: Nagios is also configured to ping the client router as a measure to check if router responds incase the NEOSYS server is down.&lt;br /&gt;
#NEOSYS: This service works in a reverse direction, and the NEOSYS installation on the client server sends information such as databases running, current backup status, internal and internet IP addressess etc to Nagios on a regular interval of 10 minutes.&lt;br /&gt;
&lt;br /&gt;
Some key information about Nagios is as follows:&lt;br /&gt;
&lt;br /&gt;
*Nagios is also configured to display information related to internal servers.&lt;br /&gt;
*Clients hosted on a NEOSYS cloud server might not have services such as SSH or PING as this is monitored as part of the internal server service.&lt;br /&gt;
*Nagios sends out email alerts to support2@neosys.com (which is forwarded to support@neosys.com) from 8 am to 12 midnight on all Dubai working days (Sun-Thu). No alerts are sent out on Fri and Sat, unless they are for NEOSYS internal servers.&lt;br /&gt;
&lt;br /&gt;
Nagios Configuration files:&lt;br /&gt;
&lt;br /&gt;
*Commands to check different services. ~/etc/nagios3/commands.cfg&lt;br /&gt;
*Contacts where support2@neosys.com is configured. Emails from nagios will be sent to the email ID configured here. /etc/nagios3/conf.d.backups/contacts.cfg&lt;br /&gt;
*For Oman Client. Unclear of purpose.  /etc/nagios3/conf.d.backups/dtme.cfg&lt;br /&gt;
*Fully commented file of generic hostgroup definitions. /etc/nagios3/conf.d.backups/hostgroups_nagios2.cfg&lt;br /&gt;
*Host group definition. /etc/nagios3/conf.d.backups/linux.cfg&lt;br /&gt;
*Files where all the neosys hosts and hostgroups are defined. /etc/nagios3/conf.d.backups/neosysclients.cfg&lt;br /&gt;
*Config for monitor.neosys.com. /etc/nagios3/conf.d.backups/monitor.cfg&lt;br /&gt;
&lt;br /&gt;
==How to handle a service error==&lt;br /&gt;
&lt;br /&gt;
#Nagios Service Info - get there via various routes eg from Service Problems - then click on the service name (not the host name)&lt;br /&gt;
#Service Commands, Acknowledge this service problem (only services with status Warning or Critical have this option)&lt;br /&gt;
#Enter a note - explaining to yourself and your co-workers explaining how the problem is being handled and when to follow up&lt;br /&gt;
&lt;br /&gt;
Notifications will be automatically resumed once the service becomes OK again.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Disable notifications&amp;quot; is not quite the same and shows as red on tactical summary screen.&lt;br /&gt;
&lt;br /&gt;
====[[Backup_and_Restore#Updating_Nagios_incase_of_failures| Updating Nagios in case of backup failures]]====&lt;br /&gt;
&lt;br /&gt;
====How to stop ALL notifications====&lt;br /&gt;
&lt;br /&gt;
Useful to stop a massive number of alerts due to various causes.&lt;br /&gt;
&lt;br /&gt;
#Nagios Process Info&lt;br /&gt;
#Enable/Disable notifications&lt;br /&gt;
&lt;br /&gt;
====Speeding up Nagios web interface====&lt;br /&gt;
&lt;br /&gt;
The usual F5 to refresh before the automatic 90 second refresh works but Ctrl+F5 doesnt.&lt;br /&gt;
&lt;br /&gt;
====Speeding up NEOSYS process checkins====&lt;br /&gt;
&lt;br /&gt;
You can force a neosys service checkin from NEOSYS maintenance mode (any process/database) press F5&lt;br /&gt;
&lt;br /&gt;
 MONITOR2&lt;br /&gt;
&lt;br /&gt;
====[http://itwiki.neosys.com/index.php/Setting_up_monitoring_in_Nagios#Adding_a_new_NEOSYS_installation_.28new_client.29 Adding the client to Nagios]====&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting NAGIOS generally==&lt;br /&gt;
===Fixing “CRITICAL – Socket timeout after 10 secs” error message on NAGIOS===&lt;br /&gt;
&lt;br /&gt;
====Error Message====&lt;br /&gt;
&lt;br /&gt;
[[image:Vm3nagios.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Problem====&lt;br /&gt;
&lt;br /&gt;
NAGIOS is not updating services like CPU Load, Drive Space C:, Drive Save D:,Explorer, Memory Usage etc.&lt;br /&gt;
&lt;br /&gt;
====Solution====&lt;br /&gt;
&lt;br /&gt;
Open Windows Task Manager and kill any nscp.exe process. Then, restart NSClient++ from the desktop or by going to Start&amp;gt; Programs&amp;gt; NSClient++&lt;br /&gt;
These steps can be carried out even when users are active.&lt;br /&gt;
&lt;br /&gt;
===Fixing “NEOSYS has not checked in” error message===&lt;br /&gt;
&lt;br /&gt;
====Error Message Explained====&lt;br /&gt;
&lt;br /&gt;
Nagios reports this error when it is is not able to update the status of NEOSYS for a particular client server.&lt;br /&gt;
&lt;br /&gt;
====Possible Causes &amp;amp; Solutions====&lt;br /&gt;
&lt;br /&gt;
=====The maintenance window is left open=====&lt;br /&gt;
&lt;br /&gt;
Make sure that there is no maintenance window left open in the server.&lt;br /&gt;
&lt;br /&gt;
=====Hung process on server===== &lt;br /&gt;
&lt;br /&gt;
Check if there are any hung processes on the server e.g. Fatal Error in Rev Restart. Follow steps in troubleshooting [[Troubleshooting_NEOSYS_Generally#Troubleshooting_Hung_processes| hung process]]. &lt;br /&gt;
&lt;br /&gt;
=====The NEOSYS process IS NOT running on the server=====&lt;br /&gt;
&lt;br /&gt;
If there are no NEOSYS processes running, then start the NEOSYS process and wait for NEOSYS to check into Nagios, or force Nagios to re-check the status of NEOSYS service.&lt;br /&gt;
&lt;br /&gt;
=====The NEOSYS process IS running on the server but still cannot connect to NAGIOS=====&lt;br /&gt;
&lt;br /&gt;
NEOSYS connects to Nagios using http and automatically detects and uses any http proxy configuration configured in Internet Explorer. &lt;br /&gt;
&lt;br /&gt;
If Internet Explorer in the server can reach the internet then NEOSYS should be able to update to NAGIOS via the same proxy.&lt;br /&gt;
&lt;br /&gt;
Check if Internet Explorer can reach Nagios by using the below link. The check is successful if you get the Nagios login request shown in the image below.&lt;br /&gt;
 https://monitor.hosts.neosys.com:4428&lt;br /&gt;
&lt;br /&gt;
[[image:nagios_access.png]]&lt;br /&gt;
&lt;br /&gt;
======If Internet Explorer CANNOT connect to Nagios======&lt;br /&gt;
&lt;br /&gt;
The client&#039;s IT must enable outbound access preferably on all ports or at least 4428 to our NEOSYS server at monitor.hosts.neosys.com. &lt;br /&gt;
&lt;br /&gt;
If outbound access to monitor.hosts.neosys.com on port 4428 has not been enabled, then Nagios will not be able to update the status of the host and will show the error &amp;quot;NEOSYS not checked in&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
If port 4428 cannot be used, then Support can manually configure the network to use standard port 443 in the [http://userwiki.neosys.com/index.php/System_Configuration_File#Monitor_Port_No. system configuration file.]&lt;br /&gt;
&lt;br /&gt;
This requires that the client&#039;s IP number is added to the list of allowed IP numbers on nl10r router since Nagios https server gets multiple probes a day on port 443 if it is left open to everyone.&lt;br /&gt;
&lt;br /&gt;
======If Internet Explorer CAN connect to Nagios====== &lt;br /&gt;
&lt;br /&gt;
View the Internet Explorer proxy configuration as follows:&lt;br /&gt;
&lt;br /&gt;
[[image:ieproxy.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Check if there is an issue with NEOSYS&#039; http proxy server configuration as follows:&lt;br /&gt;
&lt;br /&gt;
#Open the UPDATE.$WG or UPDATE.xWG file located in the neosys\neosys or hosts/xxxxxxxx/work folder.&lt;br /&gt;
#You should find a message similar to the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Connecting to 192.168.100.145:8080 failed: No such file or directory.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Where the above appears to be some non-functional http proxy server ip/port number and is not the expected nagios server ip number.&lt;br /&gt;
A windows proxy command shows the same ip and port:&lt;br /&gt;
&lt;br /&gt;
On Windows 2003/XP&lt;br /&gt;
&lt;br /&gt;
 proxycfg&lt;br /&gt;
&lt;br /&gt;
On Windows 2008/Win7&lt;br /&gt;
&lt;br /&gt;
 NetSH WinHTTP import Proxy ie&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Microsoft (R) WinHTTP Default Proxy Configuration Tool&lt;br /&gt;
Copyright (c) Microsoft Corporation. All rights reserved.&lt;br /&gt;
&lt;br /&gt;
Current WinHTTP proxy settings under:&lt;br /&gt;
  HKEY_LOCAL_MACHINE\&lt;br /&gt;
    SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Connections\&lt;br /&gt;
      WinHttpSettings :&lt;br /&gt;
&lt;br /&gt;
    Proxy Server(s) :  192.168.100.145:8080&lt;br /&gt;
    Bypass List     :  192.168.*.*;localhost;&amp;lt;local&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution 1 - Remove the above setting to create a direct connection&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#To remove the registry entries that ProxyCfg.exe creates,you must delete the WinHttpSettings value from the following registry key:&amp;lt;br&amp;gt;&amp;lt;pre&amp;gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Connections\WinHttpSettings&amp;lt;/pre&amp;gt;&lt;br /&gt;
#After you do the above, confirm that the proxy details are deleted by running the proxycfg command &amp;lt;BR&amp;gt;&lt;br /&gt;
#Next, restart the NEOSYS processes for the changes to be affected &amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution 2 - Configure a functioning proxy ip/port number&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Use the proxycfg command to enter a working proxy ip/port number/exclusion list: http://msdn.microsoft.com/en-us/library/aa384069%28VS.85%29.aspx&lt;br /&gt;
#After you do the above, confirm that the new proxy details are working by running the proxycfg command again&lt;br /&gt;
#Next, restart the NEOSYS processes for the changes to be affected &amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Please refer to the following link before you restart NEOSYS processes: [[Administering_NEOSYS_Server#Closing_NEOSYS_Services|Closing NEOSYS Services]]&lt;br /&gt;
&lt;br /&gt;
On the client server, look at the text of UPDATE.$WG or UPDATE.xWG and other UPDATE.* files in the client&#039;s NEOSYS installation neosys/neosys or hosts/xxxxxxxx/work folder for clues.&lt;br /&gt;
&lt;br /&gt;
=====There is a problem with the USB media inserted for backup=====&lt;br /&gt;
Refer [[Troubleshooting_NEOSYS_Generally#Error_message:_.E2.80.9CAbort.2C_Retry.2C_Fail.E2.80.9D|here]]&lt;br /&gt;
&lt;br /&gt;
=====NEOSYS thinks it sees a new neosys2.exe upgrade file on the location http://www.neosys.com/support/neosys2.exe and attempts to download it=====&lt;br /&gt;
&lt;br /&gt;
Refer [[Troubleshooting_NEOSYS_Generally#NEOSYS_process_window_displays_message_.22Upgrade_Downloading.22 | here]]&lt;br /&gt;
&lt;br /&gt;
===Fixing &amp;quot;Cannot make SSL connection&amp;quot; error===&lt;br /&gt;
====Error Message====&lt;br /&gt;
[[File:SSL.jpg]]&lt;br /&gt;
&lt;br /&gt;
Users get the message &amp;quot;This page cannot be displayed&amp;quot; when they try to access the HTTPS website.&lt;br /&gt;
TODO Add screenshot&lt;br /&gt;
&lt;br /&gt;
====Cause====&lt;br /&gt;
When there are multiple HTTPS sites on one server, any subsequent SSL self certifications seems to destroy all other sites with self certification where the export/REMOVE/import step is not done for some reason. See [http://techwiki.neosys.com/index.php/Setting_up_HTTPS#Export.2C_Remove_and_Import_Certificates Export, Remove and Import Step]&lt;br /&gt;
&lt;br /&gt;
This issue is only evident after the server restart.&lt;br /&gt;
&lt;br /&gt;
====Solution====&lt;br /&gt;
Re-install certificates. See [http://techwiki.neosys.com/index.php/Setting_up_HTTPS#Re-installing_Certificates Re-installing Certificates]&lt;br /&gt;
&lt;br /&gt;
====Fixing &amp;quot;check_ssl_certificates&amp;quot; error====&lt;br /&gt;
&lt;br /&gt;
=====Cause=====&lt;br /&gt;
This error appears when the current ssl certificate to which website binding is done is no longer valid.&lt;br /&gt;
&lt;br /&gt;
=====Solution=====&lt;br /&gt;
Use the latest valid ssl certificate and redo website binding. Refer to link [[Setting_up_HTTPS|Setting up HTTPS]]&lt;br /&gt;
&lt;br /&gt;
====Backup -&amp;gt; Impossible alert====&lt;br /&gt;
=====Possible Causes and Solutions=====&lt;br /&gt;
If there is an error &amp;quot;Backup-&amp;gt;Impossible&amp;quot; on Nagios check if the USB is properly inserted and schedule downtime to Nagios for 2 hours.&lt;br /&gt;
&lt;br /&gt;
====[[Backup_and_Restore#Interchange_backup_USB_mail_reminder| &amp;quot;Change Backup&amp;quot; alert]]====&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting Network Outages reflected in Nagios due to reassigning of router name or IP address===&lt;br /&gt;
Nagios displays errors if a router name or the ip address it is monitoring have been reassigned. &lt;br /&gt;
&lt;br /&gt;
We can resolve this issue by trying to find the ISP router ip address just before the NEOSYS server.&lt;br /&gt;
&lt;br /&gt;
Steps:-&lt;br /&gt;
&lt;br /&gt;
#Login to Nagios&lt;br /&gt;
#Click on Tactical Overview -&amp;gt; Network Outages and click on Blocking Outages to view &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;[[image:tracert-00.jpg]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#You will now see the host/ISP which is down. Click on the status map icon to identify the host associated with the ISP, as shown below: &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;[[image:tracert-01.jpg]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#From the Network Map displayed, identify the host associated with the ISP. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;[[image:tracert-02.jpg]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#If you already know the ip address of the host then skip to next step else, in Nagios, click on Host Detail, then on the hostname identified earlier and From the Host Details shown, save the host url. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;[[image:tracert-03.jpg]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;[[image:tracert-04.jpg]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#Log onto www.network-tools.com:&lt;br /&gt;
#*Select Trace&lt;br /&gt;
#*Enter the host&#039;s ip address if already known or host url&lt;br /&gt;
#*Click on Go &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;[[image:tracert-05.jpg]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#The trace route should complete successfully revealing the IP address of the ISP just before the NEOSYS server. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;[[image:tracert-06.jpg]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#You can now login to zoneedit and update the ip address of the host.&lt;br /&gt;
#Check Nagios.&lt;br /&gt;
&lt;br /&gt;
====Nagios reports a hung process====&lt;br /&gt;
=====Possible Causes and Solutions=====&lt;br /&gt;
Refer link [[Troubleshooting_NEOSYS_Generally#Error_message:_.22Read_error_in_the_operating_system_file.22|here]]&lt;br /&gt;
&lt;br /&gt;
====Explorer.exe not running====&lt;br /&gt;
Nagios will display this error for only Win3 at the moment. &lt;br /&gt;
&lt;br /&gt;
=====Possible Causes and Solutions=====&lt;br /&gt;
This error means that the server has (for whatever reasons) rebooted and stuck at the Windows login prompt for someone to enter the username &amp;amp; password. (More info on explorer.exe is available at http://en.wikipedia.org/wiki/Explorer.exe)&lt;br /&gt;
&lt;br /&gt;
Solution to this problem would be to login via Tunnelier and open up Remote Desktop Connection.&lt;br /&gt;
&lt;br /&gt;
==Configuring Sonicwall firewall to allow NEOSYS to update Nagios==&lt;br /&gt;
====Configuring Sonicwall firewall to allow NEOSYS to update Nagios====&lt;br /&gt;
&lt;br /&gt;
This is documented at [[Sonicwall_Firewall_Configuration#Configuring_Sonicwall_firewall_to_allow_NEOSYS_to_update_Nagios|Configuring Sonicwall firewall to allow NEOSYS to update Nagios]]&lt;br /&gt;
&lt;br /&gt;
==Counting current active users==&lt;br /&gt;
&lt;br /&gt;
NEOSYS gives an estimate of the number of users currently active by counting how&lt;br /&gt;
many users have been seen to be active, even once, within the last hour.&lt;br /&gt;
&lt;br /&gt;
This can give a sense of the processing requirements for an installation.&lt;br /&gt;
&lt;br /&gt;
The numbers can be seen in nagios installations screen from support.htm&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  Users: 5/4/2 Max: 7/5/2&lt;br /&gt;
&lt;br /&gt;
Users means:&lt;br /&gt;
&lt;br /&gt;
*5 unique browser session ids seen in the last hour&lt;br /&gt;
*4 unique user codes seen in the last hour&lt;br /&gt;
*2 Unique IP Nos seen in the last hour (60 mins)&lt;br /&gt;
&lt;br /&gt;
Max means the maximums of the above seen in any one of the last 24 hours.&lt;br /&gt;
&lt;br /&gt;
In practice, the middle figure, count of unique user codes, is very&lt;br /&gt;
close to the real number of people active within an hour. However,&lt;br /&gt;
since the same user code can be used by different people, even on&lt;br /&gt;
different computers (although not at the same time) it could&lt;br /&gt;
technically be an underestimate.&lt;br /&gt;
&lt;br /&gt;
The number of currently active users is usually much lower than the number of&lt;br /&gt;
registered users. This is because some registered users use the system&lt;br /&gt;
infrequently and many dont use the system all the time.&lt;br /&gt;
&lt;br /&gt;
The total number of different user codes seen to be active over the&lt;br /&gt;
whole day is not shown. For that, you can see Usage Statistics.&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Migrating_to_modern_javascript&amp;diff=3719</id>
		<title>Migrating to modern javascript</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Migrating_to_modern_javascript&amp;diff=3719"/>
		<updated>2020-03-22T00:20:07Z</updated>

		<summary type="html">&lt;p&gt;Steve: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In 2015 the new &amp;quot;ES6&amp;quot; version of javascript introduced a many fundamental and routine improvements in the language.&lt;br /&gt;
&lt;br /&gt;
The concept of &amp;quot;modules&amp;quot; allows the packaging up a group of associated functions so that they have their own module scope variables that do not interfere with the standard global variables. NEOSYS may be refactored to take advantage of the protection that this brings and it will allow the introduction of industry standard libraries without those libraries conflicting with NEOSYS scripts. NEOSYS currently does not use any libraries since it was created long before any javascript libraries existed.&lt;br /&gt;
&lt;br /&gt;
On the routine programming side this page will contain a list of the possible improvements in programming style that can be used when adding new code to the NEOSYS javascript code base.&lt;br /&gt;
&lt;br /&gt;
== Using map function instead of time honoured &amp;quot;for loop over array&amp;quot; ==&lt;br /&gt;
*The purpose of the new &amp;quot;map&amp;quot; function is to convert every element of an array by using a given function. map doesn&#039;t actually touch the old array but rather outputs a new array. If you immediately assign the output of the map function into the old array then the end result is a conversion, not a creation.&lt;br /&gt;
&lt;br /&gt;
*The old ugly &amp;quot;for loop&amp;quot; syntax is replaced by the new beautiful &amp;quot;map&amp;quot; syntax. Both are equally incomprehensible in plain language.&lt;br /&gt;
&lt;br /&gt;
*Think of the &#039;&#039;&#039;&amp;quot;acno =&amp;gt; {&amp;quot;&#039;&#039;&#039; is the new style shorthand meaning &amp;quot;&#039;&#039;&#039;function anonymous(acno) {&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&amp;quot;=&amp;gt;&amp;quot; is known as an &amp;quot;arrow function&amp;quot; in javascript. In the rest of the programming world they are known as &amp;quot;lamda&amp;quot; function or in plain language &amp;quot;anonymous functions&amp;quot; since they have no function name.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Old&lt;br /&gt;
!New&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;white-space:nowrap&amp;quot;&amp;gt;&lt;br /&gt;
for (var acnon = 0; acnon &amp;lt; acnos.length; ++acnon) {&lt;br /&gt;
    var acno = acnos[acnon].split(sm)&lt;br /&gt;
    if (acno[1])&lt;br /&gt;
        acno = acno[1]&lt;br /&gt;
    else if (acno[0]) {&lt;br /&gt;
        //acno=&amp;quot;.&amp;quot;+acno[1]&lt;br /&gt;
        acno = &amp;quot;.&amp;quot; + acno[0]&lt;br /&gt;
    } else {&lt;br /&gt;
        acno = &#039;&#039;&lt;br /&gt;
    }&lt;br /&gt;
    acnos[acnon] = acno&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; class=&amp;quot;nowrap&amp;quot;&amp;gt;&lt;br /&gt;
acnos = acnos.map(acno =&amp;gt; {&lt;br /&gt;
    const acno2 = acno.neosyssplit(sm)&lt;br /&gt;
    if (acno2[1])&lt;br /&gt;
        return acno2[1]&lt;br /&gt;
    else if (acno2[0]) {&lt;br /&gt;
        //return &amp;quot;.&amp;quot;+acno2[1]&lt;br /&gt;
        return &amp;quot;.&amp;quot; + acno2[0]&lt;br /&gt;
    } else {&lt;br /&gt;
        return &#039;&#039;&lt;br /&gt;
    }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Migrating_to_modern_javascript&amp;diff=3718</id>
		<title>Migrating to modern javascript</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Migrating_to_modern_javascript&amp;diff=3718"/>
		<updated>2020-03-21T21:04:08Z</updated>

		<summary type="html">&lt;p&gt;Steve: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In 2015 the new &amp;quot;ES6&amp;quot; version of javascript introduced a many fundamental and routine improvements in the language.&lt;br /&gt;
&lt;br /&gt;
The concept of &amp;quot;modules&amp;quot; allows the packaging up a group of associated functions so that they have their own module scope variables that do not interfere with the standard global variables. NEOSYS may be refactored to take advantage of the protection that this brings and it will allow the introduction of industry standard libraries without those libraries conflicting with NEOSYS scripts. NEOSYS currently does not use any libraries since it was created long before any javascript libraries existed.&lt;br /&gt;
&lt;br /&gt;
On the routine programming side this page will contain a list of the possible improvements in programming style that can be used when adding new code to the NEOSYS javascript code base.&lt;br /&gt;
&lt;br /&gt;
== Using map function instead of time honoured &amp;quot;for loop over array&amp;quot; ==&lt;br /&gt;
*The purpose of the new &amp;quot;map&amp;quot; function is to convert every element of an array by using a given function. map doesn&#039;t actually touch the old array but rather outputs a new array. If you immediately assign the output of the map function into the old array then the end result is a conversion, not a creation.&lt;br /&gt;
&lt;br /&gt;
*The old ugly &amp;quot;for loop&amp;quot; syntax is replaced by the new beautiful &amp;quot;map&amp;quot; syntax. Both are equally incomprehensible in plain language.&lt;br /&gt;
&lt;br /&gt;
*Think of the &#039;&#039;&#039;&amp;quot;acno =&amp;gt; {&amp;quot;&#039;&#039;&#039; is the new style shorthand meaning &amp;quot;&#039;&#039;&#039;function anonymous(acno) {&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&amp;quot;=&amp;gt;&amp;quot; is known as an &amp;quot;arrow function&amp;quot; in javascript. In the rest of the programming world they are known as &amp;quot;lamda&amp;quot; function or in plain language &amp;quot;anonymous functions&amp;quot; since they have no function name.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Old&lt;br /&gt;
!New&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;white-space:nowrap&amp;quot;&amp;gt;&lt;br /&gt;
for (var acnon=0;acnon&amp;lt;acnos.length;++acnon) {&lt;br /&gt;
 var acno=acnos[acnon].split(sm)&lt;br /&gt;
 if (acno[1])&lt;br /&gt;
  acno=acno[1]&lt;br /&gt;
 else if (acno[0]) {&lt;br /&gt;
  //acno=&amp;quot;.&amp;quot;+acno[1]&lt;br /&gt;
  acno=&amp;quot;.&amp;quot;+acno[0]&lt;br /&gt;
 } else {&lt;br /&gt;
  acno=&#039;&#039;&lt;br /&gt;
 }&lt;br /&gt;
 acnos[acnon]=acno&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; class=&amp;quot;nowrap&amp;quot;&amp;gt;&lt;br /&gt;
acnos=acnos.map(acno =&amp;gt; {&lt;br /&gt;
 let acno=acno.neosyssplit(sm)&lt;br /&gt;
 if (acno[1])&lt;br /&gt;
  return acno[1]&lt;br /&gt;
 else if (acno[0]) {&lt;br /&gt;
  //acno=&amp;quot;.&amp;quot;+acno[1]&lt;br /&gt;
  return &amp;quot;.&amp;quot;+acno[0]&lt;br /&gt;
 else {&lt;br /&gt;
  return &#039;&#039;&lt;br /&gt;
 }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Migrating_to_modern_javascript&amp;diff=3717</id>
		<title>Migrating to modern javascript</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Migrating_to_modern_javascript&amp;diff=3717"/>
		<updated>2020-03-21T21:01:42Z</updated>

		<summary type="html">&lt;p&gt;Steve: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In 2015 the new &amp;quot;ES6&amp;quot; version of javascript introduced a many fundamental and routine improvements in the language.&lt;br /&gt;
&lt;br /&gt;
The concept of &amp;quot;modules&amp;quot; allows the packaging up a group of associated functions so that they have their own module scope variables that do not interfere with the standard global variables. NEOSYS may be refactored to take advantage of the protection that this brings and it will allow the introduction of industry standard libraries without those libraries conflicting with NEOSYS scripts. NEOSYS currently does not use any libraries since it was created long before any javascript libraries existed.&lt;br /&gt;
&lt;br /&gt;
On the routine programming side this page will contain a list of the possible improvements in programming style that can be used when adding new code to the NEOSYS javascript code base.&lt;br /&gt;
&lt;br /&gt;
== Using map function instead of time honoured &amp;quot;for loop over array&amp;quot; ==&lt;br /&gt;
*The purpose of the new &amp;quot;map&amp;quot; function is to convert every element of an array by using a given function. map doesn&#039;t actually touch the old array but rather outputs a new array. If you immediately assign the output of the map function into the old array then the end result is a conversion, not a creation.&lt;br /&gt;
&lt;br /&gt;
*The old ugly &amp;quot;for loop&amp;quot; syntax is replaced by the new beautiful &amp;quot;map&amp;quot; syntax. Both are equally incomprehensible in plain language.&lt;br /&gt;
&lt;br /&gt;
*Think of the &#039;&#039;&#039;&amp;quot;acno =&amp;gt; {&amp;quot;&#039;&#039;&#039; is the new style shorthand meaning &amp;quot;&#039;&#039;&#039;function anonymous(acno) {&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&amp;quot;=&amp;gt;&amp;quot; is known as an &amp;quot;arrow function&amp;quot; in javascript. In the rest of the programming world they are known as &amp;quot;lamda&amp;quot; function or in plain language &amp;quot;anonymous functions&amp;quot; since they have no function name.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Old&lt;br /&gt;
!New&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; style=&amp;quot;white-space:nowrap&amp;quot;&amp;gt;&lt;br /&gt;
for (var acnon=0;acnon&amp;lt;acnos.length;++acnon) {&lt;br /&gt;
 var acno=acnos[acnon].split(sm)&lt;br /&gt;
 if (acno[1])&lt;br /&gt;
  acno=acno[1]&lt;br /&gt;
 else if (acno[0]) {&lt;br /&gt;
  //acno=&amp;quot;.&amp;quot;+acno[1]&lt;br /&gt;
  acno=&amp;quot;.&amp;quot;+acno[0]&lt;br /&gt;
 } else {&lt;br /&gt;
  acno=&#039;&#039;&lt;br /&gt;
 }&lt;br /&gt;
 acnos[acnon]=acno&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot; class=&amp;quot;nowrap&amp;quot;&amp;gt;&lt;br /&gt;
acnos=acnos.map(acno =&amp;gt; {&lt;br /&gt;
 let acno=acno.neosyssplit(sm)&lt;br /&gt;
 if (acno[1])&lt;br /&gt;
  return acno[1]&lt;br /&gt;
 else if (acno[0]) {&lt;br /&gt;
  //acno=&amp;quot;.&amp;quot;+acno[1]&lt;br /&gt;
  return &amp;quot;.&amp;quot;+acno[0]&lt;br /&gt;
 else {&lt;br /&gt;
  return &#039;&#039;&lt;br /&gt;
 }&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Migrating_to_modern_javascript&amp;diff=3716</id>
		<title>Migrating to modern javascript</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Migrating_to_modern_javascript&amp;diff=3716"/>
		<updated>2020-03-21T17:56:52Z</updated>

		<summary type="html">&lt;p&gt;Steve: Created page with &amp;quot;In 2015 the new &amp;quot;ES6&amp;quot; version of javascript introduced a many fundamental and routine improvements in the language.  The concept of &amp;quot;modules&amp;quot; allows the packaging up a group o...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In 2015 the new &amp;quot;ES6&amp;quot; version of javascript introduced a many fundamental and routine improvements in the language.&lt;br /&gt;
&lt;br /&gt;
The concept of &amp;quot;modules&amp;quot; allows the packaging up a group of associated functions so that they have their own module scope variables that do not interfere with the standard global variables. NEOSYS may be refactored to take advantage of the protection that this brings and it will allow the introduction of industry standard libraries without those libraries conflicting with NEOSYS scripts. NEOSYS currently does not use any libraries since it was created long before any javascript libraries existed.&lt;br /&gt;
&lt;br /&gt;
On the routine programming side this page will contain a list of the possible improvements in programming style that can be used when adding new code to the NEOSYS javascript code base.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Using map function instead of time honoured &amp;quot;for loop over array&amp;quot;&lt;br /&gt;
!Old&lt;br /&gt;
!New&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|for (var acnon=0;acnon&amp;lt;acnos.length;++acnon) {&lt;br /&gt;
var acno=acnos[acnon].split(sm)&lt;br /&gt;
if (acno[1])&lt;br /&gt;
  acno=acno[1]&lt;br /&gt;
else if (acno[0]) {&lt;br /&gt;
  //acno=&amp;quot;.&amp;quot;+acno[1]&lt;br /&gt;
  acno=&amp;quot;.&amp;quot;+acno[0]&lt;br /&gt;
} else&lt;br /&gt;
  acno=&amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
acnos[acnon]=acno&lt;br /&gt;
}&amp;lt;br /&amp;gt;&lt;br /&gt;
|acnos=acnos.map(acno =&amp;gt; {&lt;br /&gt;
 acno=acno.neosyssplit(sm)&lt;br /&gt;
  if (acno[1])&lt;br /&gt;
  return acno[1]&lt;br /&gt;
  else if (acno[0]) {&lt;br /&gt;
  //acno=&amp;quot;.&amp;quot;+acno[1]&lt;br /&gt;
  return &amp;quot;.&amp;quot;+acno[0]&lt;br /&gt;
  else&lt;br /&gt;
  return &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
})&lt;br /&gt;
|&lt;br /&gt;
* The purpose of the new &amp;quot;map&amp;quot; function is to convert every element of any array by using a function. map doesn&#039;t actually touch the old array but rather outputs a new array. Of course you are free to immediately replace the old array with the new array ... so the end result is a conversion, not a creation.&lt;br /&gt;
&lt;br /&gt;
* The old ugly &amp;quot;for loop&amp;quot; syntax is replaced by the new beautiful &amp;quot;map&amp;quot; syntax. Both are equally incomprehensible in plain language.&lt;br /&gt;
&lt;br /&gt;
* Think of the &#039;&#039;&#039;&amp;quot;acno =&amp;gt; {&amp;quot;&#039;&#039;&#039; is the new style shorthand meaning &amp;quot;&#039;&#039;&#039;function anonymous(acno) {&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;=&amp;gt;&amp;quot; is known as an &amp;quot;arrow function&amp;quot; in javascript. In the rest of the programming world they are known as &amp;quot;lamda&amp;quot; function or in plain language &amp;quot;anonymous functions&amp;quot; since they have no function  &lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Main_Page&amp;diff=3715</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Main_Page&amp;diff=3715"/>
		<updated>2020-03-21T17:07:24Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Technical */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;big&amp;gt;&#039;&#039;&#039;This is the Technical Support NEOSYS Wiki.&#039;&#039;&#039;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Technical==&lt;br /&gt;
[[Installing NEOSYS]]&lt;br /&gt;
&lt;br /&gt;
[[Upgrading NEOSYS]]&lt;br /&gt;
&lt;br /&gt;
[[Testing NEOSYS]]&lt;br /&gt;
&lt;br /&gt;
[[Configuring NEOSYS Generally]]&lt;br /&gt;
&lt;br /&gt;
[[Configuring NEOSYS Finance System]]&lt;br /&gt;
&lt;br /&gt;
[[Administering NEOSYS Server]]&lt;br /&gt;
&lt;br /&gt;
[[Troubleshooting NEOSYS Generally]]&lt;br /&gt;
&lt;br /&gt;
[[Troubleshooting NEOSYS Agency System]]&lt;br /&gt;
&lt;br /&gt;
[[Troubleshooting NEOSYS Media System]]&lt;br /&gt;
&lt;br /&gt;
[[Troubleshooting NEOSYS Finance System]]&lt;br /&gt;
&lt;br /&gt;
[[Troubleshooting NEOSYS Jobs System]]&lt;br /&gt;
&lt;br /&gt;
[[Moving and Uninstalling NEOSYS]]&lt;br /&gt;
&lt;br /&gt;
[[Handling Nagios Client Monitoring System]]&lt;br /&gt;
&lt;br /&gt;
[[Backup and Restore]]&lt;br /&gt;
&lt;br /&gt;
[[Procedures]]&lt;br /&gt;
&lt;br /&gt;
[[Checklists]]&lt;br /&gt;
&lt;br /&gt;
[[Solution Unknown]]&lt;br /&gt;
&lt;br /&gt;
[[NEOSYS DDNS Service]]&lt;br /&gt;
&lt;br /&gt;
[[Activating/Reactivating Windows]]&lt;br /&gt;
&lt;br /&gt;
[[Programming Knowledge]]&lt;br /&gt;
&lt;br /&gt;
[[MIgrating to modern javascript|MIgrating to Modern Javascript]]&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Troubleshooting_NEOSYS_Generally&amp;diff=3681</id>
		<title>Troubleshooting NEOSYS Generally</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Troubleshooting_NEOSYS_Generally&amp;diff=3681"/>
		<updated>2020-01-22T16:08:27Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Investigating slow response in NEOSYS using NEOSYS logs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Solving failure to start a NEOSYS server due to disk failure message==&lt;br /&gt;
===Problem===&lt;br /&gt;
During a reboot process (which maybe due to a Windows update or even done by a support personnel) the NEOSYS server gets hung on the startup and shows a message &amp;quot;Boot Failure - Abort, Retry&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
===Temporary solution===&lt;br /&gt;
This typically happens due to the USB being plugged into the server and the boot sequence being wrong - i.e. the server trying to boot from the USB first and fails. The immediate solution would be to unplug the USB and ask the client to reboot the server again and upon successfully rebooting the system, plug the USB back again.&lt;br /&gt;
&lt;br /&gt;
===Permanent solution===&lt;br /&gt;
The above problem will occur every time the computer is rebooted, so you need to immediately talk to the IT Administrator of the client and ask them to rectify the boot sequence to make it boot first from the CD ROM, then the HDD and last the USB.&lt;br /&gt;
&amp;lt;BR&amp;gt;Allowing &amp;quot;Boot from USB&amp;quot; causes a severe risk of infection by boot sector viruses since the first infected USB device inserted WILL infect the server immediately as anti-virus programs are not active during boot.&lt;br /&gt;
&lt;br /&gt;
==Replicate options used &amp;amp; error using sysmsg Data:==&lt;br /&gt;
&lt;br /&gt;
NEOSYS users will send screenshots with the error message which often blocks options used, slowing down the ability to replicate the problem.&lt;br /&gt;
&lt;br /&gt;
NEOSYS when a user faces a system error, NEOSYS sends a email with the error information, including texted that cann be used to recreate the optioned used at the time.&lt;br /&gt;
Thus avoiding the need to ask the user to send another screenshot without the error message. &lt;br /&gt;
&lt;br /&gt;
Find the form data in the raw text of the emailed error message. &lt;br /&gt;
&lt;br /&gt;
[[image:Rawformdatapng.png]]&lt;br /&gt;
&lt;br /&gt;
Sadly normal email view renders it useless by mangling it, treating ^ as formatting character superscript.&lt;br /&gt;
&lt;br /&gt;
The form raw data will be something like this:&lt;br /&gt;
&lt;br /&gt;
 1^^^1^3^3^^^^^^^^^^^^^^^3^^^^^^^^^18319^18319^^^^^^^^^4^^0^^^^^^^^^^^^^1}2&lt;br /&gt;
&lt;br /&gt;
First prepare a command by inserting the above form data into the following command in place of %FORMDATA%. Do it anywhere you can cut and paste text.&lt;br /&gt;
&lt;br /&gt;
 form_setdefault(&#039;%FORMDATA%&#039;)&lt;br /&gt;
&lt;br /&gt;
or in old versions of NEOSYS&lt;br /&gt;
&lt;br /&gt;
 gro.defaultrevstr=unescape(&#039;%FORMDATA%&#039;.neosysconvert(&#039;`^]}\~&#039;,rm+fm+vm+sm+tm+stm))&lt;br /&gt;
&lt;br /&gt;
Achieving the following command:&lt;br /&gt;
&lt;br /&gt;
 form_setdefault(&#039;1^^^1^3^3^^^^^^^^^^^^^^^3^^^^^^^^^18319^18319^^^^^^^^^4^^0^^^^^^^^^^^^^1}2&#039;)&lt;br /&gt;
&lt;br /&gt;
or in old versions of NEOSYS&lt;br /&gt;
&lt;br /&gt;
 gro.defaultrevstr=unescape(&#039;1^^^1^3^3^^^^^^^^^^^^^^^3^^^^^^^^^18319^18319^^^^^^^^^4^^0^^^^^^^^^^^^^1}2&#039;.neosysconvert(&#039;`^]}\~&#039;,rm+fm+vm+sm+tm+stm))&lt;br /&gt;
&lt;br /&gt;
Once you have constructed the command, do the following:&lt;br /&gt;
&lt;br /&gt;
#As NEOSYS user, get onto the exact same screen as the user was in when they got the message. (Using the screenshot they send)&lt;br /&gt;
#Press Ctrl+Shift+F12 - to get a NEOSYS javascript prompt&lt;br /&gt;
#Paste the command and Press Enter - to execute the command - it must confirm with &amp;quot;setdefaultform( ... ) = ok&amp;quot;&lt;br /&gt;
#Press Enter or click OK - to remove the confirmation&lt;br /&gt;
#Press Esc or click Cancel - to close the javascript prompt&lt;br /&gt;
#Press F8 or click Close - to refresh the form&lt;br /&gt;
#The form should now be filled in correctly including any hidden fields.&lt;br /&gt;
&lt;br /&gt;
==[[Administering_NEOSYS_Server#Clearing_File_Locks| Troubleshooting &amp;quot;Document is being updated&amp;quot; message]]==&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting the &amp;quot;Database not available&amp;quot; error message== &lt;br /&gt;
===Problem explained===&lt;br /&gt;
This error appears when you try to login to NEOSYS after you enter your username and password and click the Login button.&lt;br /&gt;
&lt;br /&gt;
[[image:database_unavailable.jpg]]&lt;br /&gt;
&lt;br /&gt;
Error message : &lt;br /&gt;
&lt;br /&gt;
 Cannot login because : &lt;br /&gt;
 Error :  The (database code) database is not available right now.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the error message appears post login i.e. when users are working on the system then check if processes are free to run user request.&lt;br /&gt;
&lt;br /&gt;
[[image:not_available.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Solution explained===&lt;br /&gt;
&lt;br /&gt;
#Determine if the processes are running. If they are running and you still get the same message that means that either the processes have [[Troubleshooting_NEOSYS_Generally#Troubleshooting_Hung_processes|hung]] and need to be [[Troubleshooting_NEOSYS_Generally#How_to_kill_hung_NEOSYS_processes|killed]].&lt;br /&gt;
#If the processes are not visible on the desktop, it is possible that they are running in the background and have hung for some reason. Check the windows task manager to see if any ‘ntvdm’ process is running and [[Troubleshooting_NEOSYS_Generally#If_NEOSYS_processes_are_not_visible_on_the_server_desktop|fix hung processes]].&lt;br /&gt;
#If not hung then the available processes may be busy running long reports and a new process needs to be started. Refer to [[Handling_Nagios_Client_Monitoring_System#Counting_current_active_users| counting current active users]] to get a sense of the processing requirements for an installation.&lt;br /&gt;
#If there are processes available which are not hung or busy running reports, then ensure that the URL is pointing to the correct IP address and not to a wrong one e.g. a backup server.&lt;br /&gt;
#If the process had not hung and no processes running, then the server might have restarted due to a power failure or a windows update and the administrator user had not logged in post the scheduled startup time of 6AM. To determine the cause of this, investigate in the Windows Event Viewer Log file.&lt;br /&gt;
#You can now start up the process by clicking on the respective desktop icons.&lt;br /&gt;
#Also check if the nightly backup took place successfully or not.&lt;br /&gt;
#Look into the logs at the date/time stated for the last transaction processed to investigate why process got hung. See [[Troubleshooting_NEOSYS_Generally#Inspecting_Database_LOGS_Folder| Inspecting logs]] for more information on logs.&lt;br /&gt;
&lt;br /&gt;
==Fixing missing ADAGENCY.VOL==&lt;br /&gt;
&lt;br /&gt;
The file contains database info required on Login Page and the directory paths of the NEOSYS programs and DATA required for maintenance mode.&lt;br /&gt;
&lt;br /&gt;
===Problem===&lt;br /&gt;
&lt;br /&gt;
When accessing NEOSYS Login Page: &amp;quot;Error: Cannot read D:\NEOSYS\NEOSYS\ADAGENCY.VOL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This error will occur when the ADAGENCY.VOL file has been deleted (has previously happened after failed backup and after upgrading NEOSYS) or the file has become corrupt after a bad disk block was &amp;quot;fixed&amp;quot; by windows CHKDISK.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
&lt;br /&gt;
Manually recreate the file and its text contents (or if installation is on win3 use the nl13 snapshots).&lt;br /&gt;
&lt;br /&gt;
In example below, only make changes to first line: (Maintenance mode login at dataset selection will display info)&lt;br /&gt;
&lt;br /&gt;
 Syntax: ZXC &amp;lt;DATASET NAME, DATASET CODE,,LAST BACKUP DATE&amp;gt;*..&amp;gt; (Separate each database&#039;s details with &#039;*&#039;)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ZXC TEST,TEST,,25 MAR 2019*XDEVTEST,XDEVTEST,,17 SEP 2018&lt;br /&gt;
.\ACCOUNTS&lt;br /&gt;
.\GENERAL&lt;br /&gt;
.\ADAGENCY&lt;br /&gt;
..\DATA\ZXC\GENERAL&lt;br /&gt;
..\DATA\ZXC\ACCOUNTS&lt;br /&gt;
..\DATA\ZXC\ADAGENCY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting &amp;quot;user not authorised to login from a location&amp;quot; error message==&lt;br /&gt;
[[image:IPerror.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Error message:&#039;&#039;&#039;&lt;br /&gt;
 xxx is not authorised to login form the location (IP Number. xx.xx.xx.xx)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution Explained:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Check the URL used and follow the steps below to check if it is correct and email the user accordingly.&lt;br /&gt;
&lt;br /&gt;
#If the Client installation is hosted on NEOSYS server then users can use only https link to access NEOSYS.&lt;br /&gt;
#*Check with the client&#039;s management if this particular IP is their public IP.&lt;br /&gt;
#*Add IP on management confirmation (Refer to [[Procedures#Handling_User_Requests_to_add_an_IP_or_range_of_IPs_to_access_NEOSYS|Handling User Requests to add IP/IPs]] )&lt;br /&gt;
#In case of Client hosted server, users should access NEOSYS via LAN using the http link.&lt;br /&gt;
#*There can be exceptional cases where user needs to access NEOSYS outside the office Network e.g a client installation with two companies at different locations and NEOSYS installed at one. In this case Support will have to add the IP number of the second company so that users can access NEOSYS.&amp;lt;br&amp;gt;But before you even suggest to add the IP, get the request from their management saying that the IP number is another office location and needs to be added. (Refer to [[Procedures#Handling_User_Requests_to_add_an_IP_or_range_of_IPs_to_access_NEOSYS|Handling User Requests to add IP/IPs]] )&lt;br /&gt;
&lt;br /&gt;
==Handling damaged files==&lt;br /&gt;
&lt;br /&gt;
[[Handling damaged files]]&lt;br /&gt;
&lt;br /&gt;
===Checking for corrupt database files===&lt;br /&gt;
Login to NEOSYS Maintenance. This can be done when users are online.&lt;br /&gt;
&lt;br /&gt;
Press F5&lt;br /&gt;
&lt;br /&gt;
 CHK.FILES&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 CHK.FILES filename&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Sizelock while performing chk.files &#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Fixing sizelock errors should not be done while other users are online to the same database.&lt;br /&gt;
&lt;br /&gt;
Sizelock errors are not critical and will be fixed automatically during the nightly backup.&lt;br /&gt;
&lt;br /&gt;
Sizelock errors occur if a program or process that is selecting records from a file is aborted in some abnormal way.&lt;br /&gt;
&lt;br /&gt;
Error message:&lt;br /&gt;
&lt;br /&gt;
 These Files/Tables have a Sizelock Value of 2 or greater. &lt;br /&gt;
 Tag/Select the Files/Tables to be Fixed.&lt;br /&gt;
 Press F9 to fix selected files&lt;br /&gt;
&lt;br /&gt;
Press F9 to proceed with fixing the selected files or press ESC to continue with chk.files without fixing sizelock as it gets automatically fixed during the nightly backup. &lt;br /&gt;
&lt;br /&gt;
Refer to the [http://techwiki.neosys.com/index.php/Backup_and_Restore#Error_Message:_Size_Lock Sizelock errors in backup emails] for more information.&lt;br /&gt;
&lt;br /&gt;
[[file:sizelock.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Determining Database File Name from Operating System File Name===&lt;br /&gt;
&lt;br /&gt;
To assess the potential damage and possible remedial measures you need to know the database file name. If the message only refers to the operating system file name you need to follow this procedure to determine the database file name.&lt;br /&gt;
&lt;br /&gt;
Once you have the database file name you can use CHK.FILES XXXXXXX to check if corrupt or not and various other procedures to fix the corruption.&lt;br /&gt;
&lt;br /&gt;
Remember that fixing the corrupt data does not solve the overall problem. The *cause* of the corruption must be identified and eliminated otherwise the problem may reoccur and in a more serious form perhaps with unrecoverable loss of data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
╒═══════════════════════════════════TCL - 2══════════════════════════════════╕&lt;br /&gt;
│                                                                            │&lt;br /&gt;
│ :list FILES WITH ALL CONTAINING &#039;REV76481&#039;                                 │&lt;br /&gt;
│                                                                            │&lt;br /&gt;
╘════════════════════════════════════════════════════════════════════════════╛&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:DBfilenamefromOSfilename.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Finding out when and by whom a record was deleted==&lt;br /&gt;
&lt;br /&gt;
In most cases, NEOSYS does not allow users to delete records and instead keeps a record of everything. In some cases however, things are deleted and the only way to get full details about the deletion is to search the logs. This is cumbersome, but there is a quick way to find out when, and by whom, a record was deleted. Prior to NEOSYS software versions dated Mar 2014, and deletions done before the same date, this procedure will only tell you when the record was deleted - but not who deleted it. Knowing exactly when it was deleted will nevertheless help you to search the logs for full details.&lt;br /&gt;
&lt;br /&gt;
In maintenance mode F5&lt;br /&gt;
&lt;br /&gt;
 ED SHADOW DELETED*filename*key&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
 ED SHADOW DELETED*BATCHES*L*JOU*2*U&lt;br /&gt;
&lt;br /&gt;
Journals are stored in the BATCHES file. The key of an unposted batch is x*y*999*U where x is the company code, y is the journal type code, 999 is UNPOSTED batch number and U is just U to indicate unposted batches. Note that unposted batches are normally deleted at the time they are posted - ie converted to posted batches.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
╔══════════════════════════┤DELETED*BATCHES*L*JOU*2*U├═════════════════════════╗&lt;br /&gt;
║16831.60706                                                                   ║&lt;br /&gt;
║BRUCEL                                                                        ║&lt;br /&gt;
║╒═══════════════════════════════════TCL - 6══════════════════════════════════╕║&lt;br /&gt;
║│                                                                            │║&lt;br /&gt;
║│ :EVAL PRINT 16831.60706 &#039;[DATETIME]&#039;                                       │║&lt;br /&gt;
║│                                                                            │║&lt;br /&gt;
║╘════════════════════════════════════════════════════════════════════════════╛║&lt;br /&gt;
║                                                                              ║&lt;br /&gt;
║                                                                              ║&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you see the number (in this case 16831.60706) you can convert it to a time and date by typing something like&lt;br /&gt;
&lt;br /&gt;
 PRINT 16831.60706 &#039;[DATETIME]&#039;&lt;br /&gt;
&lt;br /&gt;
Using this date and time you can search the logs more effectively to find out who did the deletion and in what circumstances.&lt;br /&gt;
&lt;br /&gt;
==How to find the physical disk space occupied by logical files==&lt;br /&gt;
Running the following command in NEOSYS maintenance mode will identify disk space used per file, largest files first.&lt;br /&gt;
 LIST FILES BY-DSND SIZE&lt;br /&gt;
or on old versions of NEOSYS&lt;br /&gt;
 LIST FILES BY-DSND SIZE ACCOUNT SIZE FILE.HANDLE&lt;br /&gt;
 &lt;br /&gt;
This will include all files not just those in the actual dataset in DATA\* folders.&lt;br /&gt;
&lt;br /&gt;
The file handle column shows the name of an .LK file however every .LK file has its .OV (overflow file) which is often larger than the .LK file.&lt;br /&gt;
&lt;br /&gt;
[[File:Physical file sizes.png]]&lt;br /&gt;
&lt;br /&gt;
==Fixing slow speed==&lt;br /&gt;
===[[Benchmarking NEOSYS]]===&lt;br /&gt;
===Investigating slow response in NEOSYS using NEOSYS logs===&lt;br /&gt;
Firstly remember that users are highly prone to claiming that the system is &amp;quot;slow&amp;quot; when what is really happening is that the system is hanging and freezing due to some system or network failure ... and there is no actual &amp;quot;speed&amp;quot; issue at whatsoever.&lt;br /&gt;
&lt;br /&gt;
If users complain about slow speed, but the server CPU performance looks normal, then support MUST investigate NEOSYS request logs to confirm that NEOSYS was in fact slow at the time when the client complained about slow response. Then check what requests took time to respond and investigate the delay. Remember that request logs report the elapsed time that the NEOSYS database takes, it does not cover web server or network time, although those are usually negligable.&lt;br /&gt;
&lt;br /&gt;
Search NEOSYS log entries around the time that the user complained about slow response and look for log entries with high response time. Make a note of what requests took long to respond. If multiple users were simultaneously requesting long reports from NEOSYS, then NEOSYS can be expected to respond slowly for other smaller requests that were processed at that time.&lt;br /&gt;
&lt;br /&gt;
Also refer to [http://userwiki.neosys.com/index.php/General_FAQ#Why_is_NEOSYS_taking_a_long_time_to_generate_a_report.3F why is NEOSYS taking a long time to generate a report].&lt;br /&gt;
&lt;br /&gt;
===Investigating CPU 100% using Windows Task Manager===&lt;br /&gt;
Email, to support, a screen-shot of task manager APPLICATIONS, PROCESSES and PERFORMANCE screens MAXIMIZED TO SHOW AS MUCH AS POSSIBLE. &lt;br /&gt;
&lt;br /&gt;
(Sort the processes to show ntvdm, waiting.exe and high cpu% processes clearly)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Steps:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Right Click on Windows Taskbar and click on Start Task Manager &amp;lt;br&amp;gt; [[image:starttaskmanager.jpg]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
#Click on Processes and then click on CPU &amp;lt;br&amp;gt;&#039;&#039;&#039;Note - The HIGH cpu% processes which should usually be the &amp;quot;process&amp;quot; called &amp;quot;System Idle Process&amp;quot; &#039;&#039;&#039;&amp;lt;br&amp;gt;[[image:cpu100percent1.jpg]] &amp;lt;br&amp;gt;&lt;br /&gt;
#Click on the Performance Tab &amp;lt;br&amp;gt; &#039;&#039;&#039;Note - PF Usage should typically be much less than Physical Memory otherwise there is insufficient real memory in the server to handle the load&#039;&#039;&#039; &amp;lt;br&amp;gt; [[image:cpu100percent3.jpg]] &amp;lt;br&amp;gt;&lt;br /&gt;
#Click on Application Tab then Right Click on a NEOSYS Process and Click on Bring to Front &amp;lt;br&amp;gt;&#039;&#039;&#039;See what the NEOSYS Process is doing &amp;lt;br&amp;gt; [[image:cpu100percent2.jpg]] &amp;lt;br&amp;gt; &#039;&#039;&#039;&lt;br /&gt;
#Right Click on a NEOSYS Process and Click on Go to Processes &amp;lt;br&amp;gt;&#039;&#039;&#039;Note the cpu% ntvdm process &amp;lt;br&amp;gt;[[image:cpu100percent2_2.jpg]]&amp;lt;br&amp;gt;  &#039;&#039;&#039;&lt;br /&gt;
#Normally NEOSYS application screens say &amp;quot;LISTENING&amp;quot; in the bottom line and those applications should have very low cpu%&amp;lt;br&amp;gt;[[image:normalneosysprocess.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
#Look at the difference between the screen of running NEOSYS processes (applications actually) which are idle (listening for requests) and active (processing a request from a user)&lt;br /&gt;
#Note the number of cpus or cpu threads in the server from the performance screen graphics&amp;lt;br&amp;gt;[[image:performance-taskmgr-cputhread.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
#Take screen-shots of any and ALL hung or long running processes (NEOSYS application screens) and email them to support. Even small details on the screens and user names, the user names may give clues to what problem caused the hanging.A Typical Hung NEOSYS process will look like this: &amp;lt;br&amp;gt; [[image:hungneosysprocess.jpg]] &amp;lt;br&amp;gt;&lt;br /&gt;
#Once all hung/long processes are closed then CPU should be low and not near 100%. If it is still 100% then check all high cpu% processes and send a screen-shot of processes sorted to show the high cpu% process names to support.&lt;br /&gt;
&lt;br /&gt;
===Solving server CPU% is 100 and all users are extremely slow/stopped===&lt;br /&gt;
&lt;br /&gt;
Get the screenshots of Task Manager and ALL processes on the server, the objective is to assess the true issue. No need to get the screens not in use obviously but you can send a parallel screen shot for them if you want to be pedantic or even a comment will do.&lt;br /&gt;
&lt;br /&gt;
====Too few CPUs/threads for the number of users====&lt;br /&gt;
In Windows task manager normally, you should see one ntvdm.exe and one waiting.exe process per NEOSYS process (application). A standard installation has three NEOSYS processes per main database and plus one per test database. This is configured in Support Menu, Configuration File.&lt;br /&gt;
&lt;br /&gt;
If there are MORE ntvdm processes than you expect from the configuration file, then perhaps NEOSYS is auto starting new NEOSYS processes to try and cater for a high number of concurrent users.&lt;br /&gt;
&lt;br /&gt;
If the number of concurrent NEOSYS processes significantly exceeds the number of cpus/hyperthreads available in the server then processing for everybody can become so slow for everybody and almost no work gets done.&lt;br /&gt;
&lt;br /&gt;
====Solution====&lt;br /&gt;
Stop NEOSYS creating new NEOSYS processes automatically. Create a text file with the first and only line as AUTOSTART=NO in the neosys\neosys folder something like this.&lt;br /&gt;
&lt;br /&gt;
notepad d:\neosys\neosys\NET.CFG&lt;br /&gt;
&lt;br /&gt;
AUTOSTART=NO&lt;br /&gt;
&lt;br /&gt;
==How do I troubleshoot email not received?==&lt;br /&gt;
&lt;br /&gt;
[[Troubleshooting email not received]]&lt;br /&gt;
&lt;br /&gt;
==Fixing permissions errors while logging in==&lt;br /&gt;
 &lt;br /&gt;
===Problem===&lt;br /&gt;
 &lt;br /&gt;
While logging in, you get the following error message:&lt;br /&gt;
[[Image:login_error_message.jpg]]&lt;br /&gt;
 &lt;br /&gt;
===Solution===&lt;br /&gt;
 &lt;br /&gt;
Add the internet guest account to the security list of the data folder with the default permission of list/read/write&lt;br /&gt;
 &lt;br /&gt;
Make sure the read&amp;amp;execute permission is removed&lt;br /&gt;
[[Image:permissions_on_data.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Fixing the &#039;HTTP Error 500.0 - Internal Server Error&#039; while logging in on IE on a Windows Vista system==&lt;br /&gt;
&lt;br /&gt;
===Problem===&lt;br /&gt;
After configuring IIS on Windows Vista you will get this error message while trying to login into NEOSYS from Internet Explorer:&lt;br /&gt;
&lt;br /&gt;
 HTTP Error 500.0 - Internal Server Error&lt;br /&gt;
 Description: This application is running in an application pool that uses the Integrated .NET  &lt;br /&gt;
 mode. This is the preferred mode for running ASP.NET applications on the current and future &lt;br /&gt;
 version of IIS.&lt;br /&gt;
 &lt;br /&gt;
 In this mode, the application using client impersonation configured with &amp;lt;identity &lt;br /&gt;
 impersonate=&amp;quot;true&amp;quot; /&amp;gt; may not behave correctly. Client impersonation is not available in early &lt;br /&gt;
 ASP.NET request processing stages and may lead modules in those stages to execute with process &lt;br /&gt;
 identity instead.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
&lt;br /&gt;
You can move the application to an application pool that uses the Classic .NET mode by using the following from a command line window (the window must be running as Administrator) &lt;br /&gt;
&lt;br /&gt;
 %systemroot%\system32\inetsrv\APPCMD.EXE set app &amp;quot;Default Web Site/neosys&amp;quot; /applicationPool:&amp;quot;Classic .NET AppPool&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use any other application pool on your system that is running in the Classic .NET mode. You can also use the IIS Administration tool to move this application to another application pool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Fixing the &#039;Class Not Registered&#039; error message while logging in==&lt;br /&gt;
&lt;br /&gt;
===Problem===&lt;br /&gt;
While logging into NEOSYS, you will get a popup window giving an error message saying &#039;Class Not Registered - Server Error&#039;. Typically, you will encounter this error with XP Pro IIS 5.1. As usual, there&#039;s way to solve it, however the root cause of this is still unknown.&lt;br /&gt;
&lt;br /&gt;
Anyway, you will get the proper message in the event log:&lt;br /&gt;
&lt;br /&gt;
 Event Type: Warning&lt;br /&gt;
 Event Source: W3SVC&lt;br /&gt;
 Event Category: None&lt;br /&gt;
 Event ID: 36&lt;br /&gt;
 Description: The server failed to load application &#039;/LM/W3SVC/1/ROOT/NEOSYS.&lt;br /&gt;
 The error was &#039;Class not registered&#039;. &lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
So, what do you do ? This problem is related to Component Services, and when you open Component Services MMC, you will most probably  get  Error Code 8004E00F COM + was unable to talk to Microsoft Distributed Transaction Coordinator. So, fix the COM+ services first by using the following KB from Microsoft (PRB: Cannot Expand &amp;quot;My Computer&amp;quot; in Component Services MMC Snap-In http://support.microsoft.com/?id=301919):&lt;br /&gt;
&lt;br /&gt;
To resolve this problem, reinstall Component Services as follows: WARNING: &lt;br /&gt;
&lt;br /&gt;
#Open registry editor, locate HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\COM3, and then delete this key.&lt;br /&gt;
#From the Start menu, point to Settings, click Control Panel, and then click Add/Remove Programs.&lt;br /&gt;
#Click Add/Remove Windows Components.&lt;br /&gt;
#Proceed through the wizard, and accept all of the defaults (including IIS)&lt;br /&gt;
#Restart the computer.&lt;br /&gt;
&lt;br /&gt;
If the above didn&#039;t solve it, and you still receive the &#039;Class not registered&#039; error message, then you need to recreate the IIS packages in COM+, try&lt;br /&gt;
&lt;br /&gt;
#Delete IIS related package in Component Services MMC&lt;br /&gt;
#IIS In-Process Applications&lt;br /&gt;
#IIS Out-of-Process Pooled Applications&lt;br /&gt;
#IIS Utilities&lt;br /&gt;
&lt;br /&gt;
Next, if you still get the message, try following before re-install IIS if you can&#039;t find Distributed Transaction Coordinator in your Services console.&lt;br /&gt;
&lt;br /&gt;
Launch command prompt and run the following command.&lt;br /&gt;
&lt;br /&gt;
#msdtc -install&lt;br /&gt;
#net start msdtc&lt;br /&gt;
&lt;br /&gt;
Then try re-install IIS.&lt;br /&gt;
&lt;br /&gt;
This should solve the problem&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enabling File Security option on Win XP Professional==&lt;br /&gt;
&lt;br /&gt;
===Problem===&lt;br /&gt;
&lt;br /&gt;
In the Properties of any folders, the Security option does not show, hence you cannot modify the Read, Write options.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
&lt;br /&gt;
The solution would be to untick the &#039;Simple File Sharing&#039; option from  Tools &amp;gt; Folder Options &amp;gt; View:&lt;br /&gt;
[[Image:simplefilesharingoff.jpg]]&lt;br /&gt;
&lt;br /&gt;
==%00%00%00%00 Errors==&lt;br /&gt;
&lt;br /&gt;
===Error Message===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SYSTEM ERROR in line 162. Amount &amp;quot;-2698.00AED&amp;quot; or base &amp;quot;%00%00%00%00&amp;quot; has been wrongly generated   &lt;br /&gt;
GET NEOSYS SUPPORT. DO NOT ATTEMPT TO CORRECT MANUALLY    &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Solution===&lt;br /&gt;
%00%00%00%00 indicates an internal error that NEOSYS programmer has to fix. It is usually random and can be hard to replicate unlike almost all other NEOSYS errors which usually replicate reliably once you find the cause.&lt;br /&gt;
&lt;br /&gt;
==B703 Errors==&lt;br /&gt;
&lt;br /&gt;
The B703 error is usually always related to something too big for NEOSYS to handle. &lt;br /&gt;
&lt;br /&gt;
These are the only B errors that NEOSYS cant always permanently prevent by fixing the software.&lt;br /&gt;
&lt;br /&gt;
For more information, check [[Troubleshooting_NEOSYS_Media_System#B703_Errors|B703 errors]]&lt;br /&gt;
&lt;br /&gt;
==Internet Explorer Menu, View, Text Size doesnt change font size as expected==&lt;br /&gt;
&lt;br /&gt;
Cause: This is because the font size is now user definable in NEOSYS and View, Text Size does not override predefined font sizes.&lt;br /&gt;
&lt;br /&gt;
Solution: If you are using Internet Explorer 7 you can scale the screen (including the font size  using ctrl + and ctrl - keyboard shortcuts or the font size button on the bottom right hand side of the window. &lt;br /&gt;
&lt;br /&gt;
You can adjust the font size on the User Details form when you login although this permanently applies to all forms not just the one that you are on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Uploaded jpg files fail to display in internet explorer==&lt;br /&gt;
&lt;br /&gt;
Some large jpg files &amp;gt; 2Mb cannot be viewed in internet explorer despite being viewable in image preview, ms paint and other viewers/editors. It is not an issue caused by uploading or downloading the files.&lt;br /&gt;
&lt;br /&gt;
These file appear to have been created on Photoshop CS Macintosh and may be a special type of uncompressed jpg used for production quality files.&lt;br /&gt;
&lt;br /&gt;
===Partial solution===&lt;br /&gt;
Before uploading the files, open them in some editor like MS Paint (right click, edit) and save them. However this results in a loss of quality. Perhaps there is some program that can convert these files to a format understandable by Internet explorer without any loss of quality.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;This document is currently read only&amp;quot;==&lt;br /&gt;
&lt;br /&gt;
===Cause===&lt;br /&gt;
The user attempting to modify this document does not have the authorization key to do so.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
Inform the user that he is not authorised to modify the document and give him the list of users within his company who are authorised to do so.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;You have attempted to write to a read-only file&amp;quot;==&lt;br /&gt;
&lt;br /&gt;
===Message===&lt;br /&gt;
&lt;br /&gt;
Error while writing data.&lt;br /&gt;
You have attempted to write to a read-only file.&lt;br /&gt;
- or -&lt;br /&gt;
access to the file has been denied by the operating system.&lt;br /&gt;
(operating system file name: &amp;quot;..\DATA\ADLINEC\ADAGENCY\REV76467.OV00012618&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
===Cause===&lt;br /&gt;
&lt;br /&gt;
It is almost certainly due to some third party backup or other maintenance software opening the NEOSYS database files when it shouldn&#039;t e.g. badly configured third party backup scheduled to backup NEOSYS while NEOSYS is still running. Note that the exact filename varies each time.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
&lt;br /&gt;
This can be a serious error that causes damaged files in NEOSYS especially if the filename ends in .OV. Use the usual methods of checking for damaged files e.g. do a backup which also looks for damaged files BUT DO NOT OVERWRITE THE LATEST BACKUP SINCE IT MAY BE REQUIRED for restoration. Then fix the damaged files using the usual methods e.g. by rebuilding/using&lt;br /&gt;
FIXFILE or restoring databases. For more info check [[Handling damaged files|Handling damaged files]]&lt;br /&gt;
&lt;br /&gt;
===Prevention===&lt;br /&gt;
&lt;br /&gt;
Remove the third party backup or other maintenance software or reschedule it to run at a time that NEOSYS is shutdown. Removal of software may require hunting through the windows process list for unexpected programs running.&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting Hung processes==&lt;br /&gt;
&lt;br /&gt;
===Investigating hung NEOSYS processes===&lt;br /&gt;
&lt;br /&gt;
To find out if a process is hung, check the time on the last line of the process which would be frozen since the time it first hung. This time can be cross-referenced with the current server time and you will notice the difference in time b/w the server and the hung process. You can also find the duration of hung processes in Nagios.&lt;br /&gt;
&lt;br /&gt;
Step 1&lt;br /&gt;
&lt;br /&gt;
Gather all the useful and necessary information about the current state of the system by taking screenshots of the NEOSYS process windows, server time and date, process list in Task Manager etc.&lt;br /&gt;
&lt;br /&gt;
Always remember to take screenshots of the whole screen, since every little detail is useful for investigation. &lt;br /&gt;
&lt;br /&gt;
Send an e-mail to Support with all the investigated details.&lt;br /&gt;
&lt;br /&gt;
Step 2&lt;br /&gt;
&lt;br /&gt;
Request a shutdown of all NEOSYS processes, which would leave only the hung processes open. &lt;br /&gt;
&lt;br /&gt;
Close the hung process/es.&lt;br /&gt;
&lt;br /&gt;
Step 3&lt;br /&gt;
&lt;br /&gt;
Process explorer can be installed from Microsoft Sysinternals and for a deeper inspection of the problem with a view to resolving it, should be used to gain information about what files are open.&lt;br /&gt;
&lt;br /&gt;
If already installed, procexp.exe can be found on the Desktop or from Start Menu-&amp;gt; Programs.&lt;br /&gt;
&lt;br /&gt;
In process explorer, Find -&amp;gt; Handle -&amp;gt; type d:\&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Submit the complete list (maybe more than one page) to support for records.&lt;br /&gt;
&lt;br /&gt;
[[Image:invhungprocess.jpg]]&lt;br /&gt;
&lt;br /&gt;
===[[Troubleshooting_NEOSYS_Generally#Investigating_CPU_100.25_using_Windows_Task_Manager|Investigating CPU 100% using Windows Task Manager]]===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===[[Troubleshooting_NEOSYS_Generally#Solving_server_CPU.25_is_100_and_all_users_are_extremely_slow.2Fstopped|Solving server CPU% is 100 and all users are extremely slow/stopped]]===&lt;br /&gt;
&lt;br /&gt;
===Error message: &amp;quot;Fatal Error in Rev Restart&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
[[image:fatal.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Error message: “Abort, Retry, Fail”===&lt;br /&gt;
====Problem====&lt;br /&gt;
The following messages may come on older versions of NEOSYS if there is a problem with the USB media inserted for backup.&lt;br /&gt;
&lt;br /&gt;
[[image:usberror.jpg]]&lt;br /&gt;
&lt;br /&gt;
This results in “NEOSYS has not checked in” message on Nagios since it hangs during the monitoring update and locks all other processes from monitoring too.&lt;br /&gt;
&lt;br /&gt;
General failure writing drive F&lt;br /&gt;
Abort, Retry, Fail?&lt;br /&gt;
&lt;br /&gt;
Not read reading drive F&lt;br /&gt;
Abort, Retry, Fail?&lt;br /&gt;
&lt;br /&gt;
Pressing A or F results in the problem happening again in about a minute, perhaps on a different process.&lt;br /&gt;
&lt;br /&gt;
====Solution====&lt;br /&gt;
Temporary solution is to do “Safely remove hardware” from the windows notification area. Using “Eject” from My Computer will not work.&lt;br /&gt;
&lt;br /&gt;
Permanent solution is to replace the defective USB memory stick. Sometime reformatting is sufficient.&lt;br /&gt;
&lt;br /&gt;
Upgrading NEOSYS will probably stop the defective media from causing NEOSYS to hang but the USB will still be useless for backup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Error message: &amp;quot;Read error in the operating system file&amp;quot;===&lt;br /&gt;
====Problem====&lt;br /&gt;
Nagios reports a hung process and on the server a process has the following message popup.&lt;br /&gt;
&lt;br /&gt;
 Read error in the operating system file &amp;quot;..\DATA\PT0833\ACCOUNTS\REV20049&lt;br /&gt;
 The file does not exist or the filename is&lt;br /&gt;
 not valid for the operating system.&lt;br /&gt;
&lt;br /&gt;
[[Image:readerrorintheoperatingsystemfile.png]]&lt;br /&gt;
&lt;br /&gt;
====Cause====&lt;br /&gt;
Some non-NEOSYS program is directly accessing the NEOSYS database files while NEOSYS processes are running and using the files as well.&lt;br /&gt;
&lt;br /&gt;
*Client IT staff using a backup program to perform backup without ensuring that NEOSYS processes are shutdown.&lt;br /&gt;
*A NEOSYS rsync process taking longer than expected due to new USB.&lt;br /&gt;
&lt;br /&gt;
====Solution====&lt;br /&gt;
Kill the NEOSYS process eg with the X button. It is advisable NOT to let it run further while it cannot properly access one of its files.&lt;br /&gt;
&lt;br /&gt;
====Prevention====&lt;br /&gt;
Remove the third party program or arrange for it to operate only while NEOSYS processes are shutdown eg from 3am-6am.&lt;br /&gt;
&lt;br /&gt;
===Error message: &amp;quot;Not enough string space - Out of Memory&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
====Message====&lt;br /&gt;
&lt;br /&gt;
‘RTP27’ Line 1. [B29] Not enough string space – Out of Memory.&lt;br /&gt;
&lt;br /&gt;
Not enough memory to execute Debugger; current program aborted.&lt;br /&gt;
Press any key to continue&lt;br /&gt;
&lt;br /&gt;
[[Image:out_of_memory.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Cause====&lt;br /&gt;
Unknown perhaps related to some large document or report&lt;br /&gt;
&lt;br /&gt;
====Solution====&lt;br /&gt;
Ask users for any hanging transactions.&lt;br /&gt;
None other than closing and starting another process.&lt;br /&gt;
&lt;br /&gt;
Also refer [[Troubleshooting NEOSYS Generally#Enabling EMS memory on Window 2003|Enabling EMS memory on Window 2003]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Error message: B521===&lt;br /&gt;
&lt;br /&gt;
[[Image:B521.jpg]] &lt;br /&gt;
&lt;br /&gt;
 Another user is currently updating indexes. &lt;br /&gt;
 Waiting to make your updates...&lt;br /&gt;
 If you interrupt this process,&lt;br /&gt;
 you may have to rebuild all the indexes&lt;br /&gt;
&lt;br /&gt;
B521 message is usually temporary and goes away by itself. If it does not then, as the text of the B521 message makes clear, some OTHER process is holding up the system, preventing the process with B521 message from continuing.&lt;br /&gt;
&lt;br /&gt;
B521 message is a symptom of other problem so it does not itself have some one simple solution. You must find which other process or issue is causing the hold up and solve whatever problem is causing the hold up, which could be anything.&lt;br /&gt;
&lt;br /&gt;
===Error message: &amp;quot; NTVDM encountered a hard error &amp;quot;===&lt;br /&gt;
&lt;br /&gt;
The following error message appears:&lt;br /&gt;
&lt;br /&gt;
[[Image:ntvdm.jpg]]&lt;br /&gt;
&lt;br /&gt;
 NTVDM encountered a hard error&lt;br /&gt;
&lt;br /&gt;
====Solution====&lt;br /&gt;
 &lt;br /&gt;
This error is caused by missing or corrupt Windows system files (i.e. command.com, autoexec.nt and config.nt). The solution is to run a program called XP FIX which will reinstall these missing files. You can download it form http://www.visualtour.com/downloads/xp_fix.exe&lt;br /&gt;
&lt;br /&gt;
Sometimes even after running the XP FIX program the error still appears. Then you need to copy all the files under C:/windows/repair to C:/windows/system32 and in the autoexec.nt and config.nt put REM before any lines there which don&#039;t have it.&lt;br /&gt;
&lt;br /&gt;
====Possible fix for some NTVDM errors====&lt;br /&gt;
&lt;br /&gt;
=====Error message===== &lt;br /&gt;
&lt;br /&gt;
[[Image:Ntvdm1.jpg]]&lt;br /&gt;
&lt;br /&gt;
 NTVDM has encountered a System error.&lt;br /&gt;
 The system cannot find the file specified.&lt;br /&gt;
 Choose close to terminate the application.&lt;br /&gt;
&lt;br /&gt;
=====Possible solution===== &lt;br /&gt;
&lt;br /&gt;
#Change the TEMP and TMP environment variables to C:\WINDOWS\TEMP. This should be for the user that runs NEOSYS processes - normally administrator.&lt;br /&gt;
#Close all NEOSYS processes&lt;br /&gt;
#Logout/Login again&lt;br /&gt;
#Restart NEOSYS processes&lt;br /&gt;
&lt;br /&gt;
[[image:Ntvdmsoln.png]]&lt;br /&gt;
&lt;br /&gt;
=====Check solution done properly===== &lt;br /&gt;
&lt;br /&gt;
You can check that by typing ECHO %TEMP% and ECHO %TMP% at a console prompt after logging out and in again. &lt;br /&gt;
&lt;br /&gt;
Note that windows will actually set the windows environment variables to something like C:\WINDOWS\TEMP\2 for some unknown reason. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
d:\hosts&amp;gt;ECHO %temp% &lt;br /&gt;
C:\WINDOWS\TEMP\2 &lt;br /&gt;
&lt;br /&gt;
d:\hosts&amp;gt;ECHO %tmp% &lt;br /&gt;
C:\WINDOWS\TEMP\2 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Error message: [[Troubleshooting_NEOSYS_Generally#Troubleshooting_the_.22Database_not_available.22_error_message|&amp;quot;Database not available&amp;quot; post login]]===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Error message: [[Backup_and_Restore#Error_Message:_.22Cannot_backup.2Frestore_because_PROCESS1_PROCESS2_.28etc.29_is.2Fare_online.22_message|&amp;quot;Cannot backup/restore because PROCESS1 PROCESS2 (etc) is/are online&amp;quot;]]===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How to kill hung NEOSYS processes===&lt;br /&gt;
 &lt;br /&gt;
NOTE WELL: If you kill actively working NEOSYS processes (those which are &amp;quot;listening&amp;quot; and not hung/crashed) there is a reasonable chance that the database will be damaged and might need a restore losing possibly large amounts of work.&lt;br /&gt;
 &lt;br /&gt;
====If NEOSYS processes are visible on the server desktop====&lt;br /&gt;
 &lt;br /&gt;
Look for processes which don&#039;t have &amp;quot;Listening ...&amp;quot; on the last but one line. The times on the left hand side are frozen as at the time of the hang.&lt;br /&gt;
 &lt;br /&gt;
You can then click the X to kill the process and confirm that this is OK.&lt;br /&gt;
 &lt;br /&gt;
Example of a NEOSYS process that has hung due to a software error resulting in a failure to handle a complex query with a lot of brand codes.&lt;br /&gt;
&lt;br /&gt;
[[Image:hungprocess.jpg]]&lt;br /&gt;
 &lt;br /&gt;
====If NEOSYS processes are not visible on the server desktop====&lt;br /&gt;
&lt;br /&gt;
NEOSYS processes are most of the time visible on the desktop (i.e. the black dos windows) in Windows 2003 OS, except in the case that the process has been scheduled to start on computer restart and no one has logged into the server. In this case it would be running in the background. TODO&lt;br /&gt;
&lt;br /&gt;
You can check if there are any hung processes from the NEOSYS Support Menu, List of Database Processes. &lt;br /&gt;
[[Image:databaseprocesseslist.jpg]]&lt;br /&gt;
&lt;br /&gt;
In this case you should follow the below instructions - however all of them need to be done within 30 seconds of starting the first instruction to avoid inconvenience to the users. It is recommend that you keep relevant windows open before proceeding with the same:&lt;br /&gt;
&lt;br /&gt;
#Shutdown NEOSYS by TEMPORARILY putting a file called GLOBAL.END in the parent directory of NEOSYS (if there is already a GLOBAL.END.TEMP file then rename it to GLOBAL.END). Leaving the file there would prevent NEOSYS from starting up again. Shutting down NEOSYS from the Support menu will not work because of the hung processes.&lt;br /&gt;
#Use Windows Task Manager to kill all the NTVDM processes - assuming that you have closed all the visible NEOSYS processes, then the NTVDM processes in the task manager would be the hung one.&lt;br /&gt;
#Delete GLOBAL.END or rename it to GLOBAL.END.TEMP&lt;br /&gt;
#Restart the processes back again. If there are many datasets then you need to restart them all well within the 30 seconds period. Restarting a process will not be noticed by users, if started immediately.&lt;br /&gt;
#*Create a [[Configuring_STARTALL.cmd_command_to_auto_start_all_processess | STARTALL.cmd]] file for future cases, where you may need to quickly start many processes for clients with multiple datasets.&lt;br /&gt;
&lt;br /&gt;
In case of Patsalides, where we have a thousand datasets which start &amp;quot;on demand&amp;quot; i.e. usually on login; all you need to do is start one dataset which will restart all the other datasets &amp;quot;on demand&amp;quot;. If there is no response within 30 seconds then one of the running datasets will start it up so there appears to be a 30 second delay when you login to one of the thousand datasets the first time on any one day.&lt;br /&gt;
&lt;br /&gt;
===Temporary workarounds for hung NEOSYS processes===&lt;br /&gt;
Until the error in the software is fixed users can often get their results by simplifying their requirements. For example select individual clients instead of selecting all the brands for a particular client. If the user has repeated his request (in forlorn hope that it would work finally) then the number of working NEOSYS processes will drop causing severe slowdown for other users and complete stop if all the NEOSYS processes hang.&lt;br /&gt;
&lt;br /&gt;
==Fixing &amp;quot; You do not have sufficient privilege to access this file &amp;quot;==&lt;br /&gt;
&lt;br /&gt;
This error message may come up while NEOSYS processes start up at the same time.&lt;br /&gt;
&lt;br /&gt;
Error message on:  &lt;br /&gt;
16 bit MS-DOS Subsystem&lt;br /&gt;
D:\hosts\Client_nam\NEOSYS\AREV.EXE&lt;br /&gt;
C:\Windows\SYSTEM32\CONFIG.NT. Error Code 0x20. You do not have sufficient privilige to access this file. See your system administrator. Choose &#039;Close&#039; to terminate the application.&lt;br /&gt;
&lt;br /&gt;
Close the error message window and look for NEOSYS processes for that client. In case there is no process, start the NEOSYS process.&lt;br /&gt;
&lt;br /&gt;
[[image:Errormsg.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Fixing wrong default program assigned to open a file type==&lt;br /&gt;
&lt;br /&gt;
The NEOSYS process (cmd file) might open up in a notepad, instead of the usual black colour DOS window. This may happen if a JavaScript file is opened using notepad. Support MUST be very CAREFUL when accessing  .JS and .JSE files and double check that the default program remains wscript.exe and not changed to notepad/wordpad. The issue can be fixed by the following:&lt;br /&gt;
&lt;br /&gt;
#Check if Windows Script 5.6/5.7 is installed, IF NOT download and install it from the Microsoft Website.&lt;br /&gt;
#Go to Control Panel -&amp;gt; Default Programs -&amp;gt; Associate a file type or protocol with a program and then change the default program for .JS and .JSE to &amp;quot;Microsoft Windows Based Script Host&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For file types that must not have any default program to open them (e.g. .vol file type):&lt;br /&gt;
&lt;br /&gt;
#Right click the concerned file (e.g. ADAGENCY.vol) &amp;gt; Open with &amp;gt; Choose another app &amp;gt; More apps&lt;br /&gt;
#Select &amp;quot;Always use this app to open XXXX files&amp;quot;&lt;br /&gt;
#Click &amp;quot;Look for another app on this PC&amp;quot;&lt;br /&gt;
#Locate and select the concerned file (ADAGENCY.vol in this example). An error should appear &amp;quot;This app can&#039;t be run on your PC&amp;quot;. Click OK.&lt;br /&gt;
&lt;br /&gt;
==Fixing a &#039;Could not start&#039; error on Scheduled Tasks in Windows Server 2000 SP4==&lt;br /&gt;
&lt;br /&gt;
This error occurs because of a change that is made to the data that is stored in the credentials database when you install Windows 2000 SP4. Hence installing SP4 causes the the data that is stored in the credentials database to get converted to an SP4-compatible format. A registry key is configured to indicate that the data has been converted to the SP4 format.&lt;br /&gt;
&lt;br /&gt;
Hence the Scheduled Tasks do not work sometimes. However the Scheduled Tasks works fine sometimes, but when you uninstall SP4, it does not work.&lt;br /&gt;
&lt;br /&gt;
The best solution is to:&lt;br /&gt;
&lt;br /&gt;
#Incase Scheduled Tasks do not work after installing SP4, then uninstall SP4 and it should be fine.&lt;br /&gt;
#Incase Scheduled Tasks works after installing SP4, and later after uninstalling SP4, it does not work, then install SP4 and it should be fine.&lt;br /&gt;
&lt;br /&gt;
==Checking for server or NEOSYS crashes==&lt;br /&gt;
 &lt;br /&gt;
#NEOSYS Maintenance Mode&lt;br /&gt;
#General Menu, Setup, Processes&lt;br /&gt;
#Select the dates and the option Detailed&lt;br /&gt;
 &lt;br /&gt;
This report shows a list of dates and times that NEOSYS logged in but did not log out properly.&lt;br /&gt;
 &lt;br /&gt;
Ignore the very latest entries since they represent the current NEOSYS processes. For example, if you have four NEOSYS processes running at the time that you get the report (including any in maintenance mode) then you can ignore the last four entries.&lt;br /&gt;
 &lt;br /&gt;
The date and time shows for each process that has failed to shutdown correctly when the process logged in. Versions of NEOSYS from January 2008 will also show the date and time that each crashed NEOSYS process was last active (heartbeat) so that the time of failure can be known.&lt;br /&gt;
 &lt;br /&gt;
If you see a bunch of NEOSYS processes all started up at around the same time but all failed to shutdown correctly then the cause will be a server failure - usually power failure.&lt;br /&gt;
 &lt;br /&gt;
Isolated one-off failures will be related to individual NEOSYS process crashes - most commonly caused by one of the following:&lt;br /&gt;
 &lt;br /&gt;
#NEOSYS hanging to due to software failure&lt;br /&gt;
#Manually exiting a NEOSYS process on the server either by pressing Ctrl+Alt+Del or clicking the &amp;quot;X&amp;quot; close icon/box and ignoring the warning&lt;br /&gt;
#Random server failures eg memory, disk etc&lt;br /&gt;
 &lt;br /&gt;
Example:&lt;br /&gt;
 &lt;br /&gt;
 LOGIN 22/12/2007 06:02 NEOSYS SERVER ADAGENCY         Current workstation &lt;br /&gt;
 LOGIN 23/12/2007 06:00 NEOSYS SERVER ADAGENCY         Current workstation  &lt;br /&gt;
 LOGIN 23/12/2007 06:01 NEOSYS SERVER ADAGENCY         Current workstation  &lt;br /&gt;
 LOGIN 23/12/2007 06:02 NEOSYS SERVER ADAGENCY         Current workstation  &lt;br /&gt;
 LOGIN 23/12/2007 08:52 NEOSYS SERVER ADAGENCY         Current workstation  &lt;br /&gt;
 LOGIN 23/12/2007 08:52 NEOSYS SERVER ADAGENCY         Current workstation  &lt;br /&gt;
 LOGIN 23/12/2007 08:53 NEOSYS SERVER ADAGENCY         Current workstation  &lt;br /&gt;
 LOGIN 8/1/2008 06:00 NEOSYS SERVER ADAGENCY         Current workstation  &lt;br /&gt;
 LOGIN 8/1/2008 06:01 NEOSYS SERVER ADAGENCY         Current workstation  &lt;br /&gt;
 LOGIN 8/1/2008 06:02 NEOSYS SERVER ADAGENCY         Current workstation  &lt;br /&gt;
 LOGIN 8/1/2008 13:51 NEOSYS SERVER NEOSYS         Current user session  &lt;br /&gt;
&lt;br /&gt;
Interpretation:&lt;br /&gt;
 &lt;br /&gt;
The first four entries indicate that all four NEOSYS processes started at 06am were suddenly killed probably by power failure&lt;br /&gt;
 &lt;br /&gt;
The next four entries indicate that NEOSYS was restarted at around 08:52 and all these processes were AGAIN killed probably by power failure&lt;br /&gt;
 &lt;br /&gt;
The last four entries can be ignored because there were four NEOSYS processes running at the time that the report was generated&lt;br /&gt;
&lt;br /&gt;
==Searching for word/number in the database files using maintenance mode==&lt;br /&gt;
&lt;br /&gt;
You can search for any word/number in the database files of NEOSYS, using the following command line:&lt;br /&gt;
&lt;br /&gt;
 F5&lt;br /&gt;
 FIND FILENAME WORDWITHOUTANYSPACES&lt;br /&gt;
 &lt;br /&gt;
 For eg:&lt;br /&gt;
 FIND CURRENCIES 1.1&lt;br /&gt;
 (here you are searching for the number 1.1 in the currencies file) You CANNOT search for a phrase ie include spaces like this.&lt;br /&gt;
 &lt;br /&gt;
 Or you can also type:&lt;br /&gt;
 FIND FILENAME &amp;lt;enter&amp;gt;&lt;br /&gt;
 and it will ask you what you want do to search. You can enter an exact phrase with spaces.&lt;br /&gt;
&lt;br /&gt;
Incase you do not know the filenames, you can enter the following command to see all the filenames in the system:&lt;br /&gt;
&lt;br /&gt;
 F5&lt;br /&gt;
 LF&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting a Service Unavailable message on Internet Explorer when opening up NEOSYS==&lt;br /&gt;
&lt;br /&gt;
===Error Message===&lt;br /&gt;
&lt;br /&gt;
The following error message appears in Internet Explorer when you try to open up NEOSYS:&lt;br /&gt;
&lt;br /&gt;
 Service Unavailable&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
 &lt;br /&gt;
Open the IIS Manager, right click Web Sites and select properties:&lt;br /&gt;
[[Image:serviceunavailable1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Switch to the Service Tab and tick the &amp;quot;Run WWW Service in IIS 5.0 Isolation Mode&amp;quot;.&lt;br /&gt;
[[Image:serviceunavailable2.jpg]]&lt;br /&gt;
&lt;br /&gt;
You will be asked for Restart of IIS. Click yes to restart IIS. If you are not asked just restart IIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Inspecting IIS log files==&lt;br /&gt;
&lt;br /&gt;
At a windows command prompt:&lt;br /&gt;
&lt;br /&gt;
 c:&lt;br /&gt;
 cd \Windows\system32\LogFiles\W3SVC1&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 %SystemDrive%&lt;br /&gt;
 cd %SystemRoot%&lt;br /&gt;
 cd system32\LogFiles\W3SVC1&lt;br /&gt;
&lt;br /&gt;
then (substituting the ip number you are interested in)&lt;br /&gt;
&lt;br /&gt;
 find &amp;quot;192.168.1.55&amp;quot; *|sort&amp;gt;temp.log&lt;br /&gt;
&lt;br /&gt;
Open temp.log in Excel and use Tools, Data, Text to Columns to split into columns using options &amp;quot;Delimited&amp;quot; and check split on Space.&lt;br /&gt;
&lt;br /&gt;
Autowidth all columns by clicking on the top left box just outside the data to the left of column A and above column 1 then double click the column separator to the right of column &amp;quot;A&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note that times and dates are in UTC/GMT so you have to add/subtract your timezone offset to get local times.&lt;br /&gt;
&lt;br /&gt;
==Inspecting Database LOGS Folder==&lt;br /&gt;
NEOSYS log files e.g. 15123103.xml are created by the database processes and contain user requests to the NEOSYS database. Each XML file represents commands executed by each NEOSYS process.&lt;br /&gt;
&lt;br /&gt;
If the database is not available according to the website then no entry will appear in that log. (The request will appear in the IIS website log but that log is nothing to do with database processes)&lt;br /&gt;
&lt;br /&gt;
It is often quicker and easier to do a preliminary search for database requests using the Request Log in NEOSYS UI, although more specific details such as Session No, Host IP, Filename and DataOut/In are only available in the XML logs.&lt;br /&gt;
&lt;br /&gt;
Find log files in neosys/LOGS. The file naming format is yymmdd(log created by process No.) E.g 18060402 = 4th of July 2018 process02.&lt;br /&gt;
&lt;br /&gt;
Use simple text editor to view the log files. &lt;br /&gt;
&lt;br /&gt;
Details found in XML log files:&amp;lt;br&amp;gt;&lt;br /&gt;
Message: Date, Time, User, Filename, WorkstationIP, HostIP, HTTP and Session. &amp;lt;br&amp;gt;&lt;br /&gt;
Request: Req1, Req2, Req..&amp;lt;br&amp;gt;&lt;br /&gt;
Response: ProcessingSecs&amp;lt;br&amp;gt;&lt;br /&gt;
DataOut/DataIn:&lt;br /&gt;
&lt;br /&gt;
===Understanding Log Entries===&lt;br /&gt;
Inspecting and searching through Logs file allows NEOSYS staff to answer clients queries like &amp;quot;Who deleted schedule XXXX&amp;quot; etc.&lt;br /&gt;
&lt;br /&gt;
To read and understand the log file with more ease, copy the portion of the log file required to be analysed into another text editor.&lt;br /&gt;
&lt;br /&gt;
While going through the log file you may come across a request &amp;quot;EXECUTE GENERAL GETTASKS NOT&amp;quot;, this request is concerned with getting a list of tasks that the user is *not* allowed to do.&lt;br /&gt;
&lt;br /&gt;
To read and understand the log file with more ease, copy the portion of the log file required to be analysed into another text editor.&lt;br /&gt;
&lt;br /&gt;
The text that appears as %FE, %FC, %FD, etc. are basically separators. Replace %FE, %FD, %FC, etc. with a separator like &amp;quot;--&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Once replacing all these characters is done, the log file will be more easily readable and vital information will be clearer. &lt;br /&gt;
&lt;br /&gt;
In the log file, you may find numbers like 17290, 17195, etc. These numbers denote dates selected or entered by the NEOSYS user. These are basically the number of days from 31st December 1967 till the date chosen by the user. For example, to convert 17290 to actual date, 31/12/1967 + 17290 = 3/5/2015. So the actual date is 3rd May 2015.&lt;br /&gt;
&lt;br /&gt;
To convert these numbers to dates using maintenance mode, refer to the article [http://techwiki.neosys.com/index.php/Troubleshooting_NEOSYS_Generally#Finding_out_when_and_by_whom_a_record_was_deleted Finding out when and by whom a record was deleted]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:NEOSYS Logs.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Fixing NEOSYS processes that do not auto start / Recovering from incorrect advanced date or time==&lt;br /&gt;
This solution is applicable to live database processes only. Test database processes don’t auto-start any other processes.&lt;br /&gt;
&lt;br /&gt;
===Problem explained===&lt;br /&gt;
After starting up the 1st process, the rest of the processes don&#039;t start up.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
&lt;br /&gt;
The possible cause for this could be that the system date/time might have been changed - either manually or by the auto synchronization. Do the following checks in the sequence of order:&lt;br /&gt;
&lt;br /&gt;
#Check for any *.$* files (* after dollar sign should show a number, the highest being the latest one). If it shows OK, then proceed ahead.&lt;br /&gt;
#Check for any .end files and delete it to rename to .end.temp&lt;br /&gt;
#Check the System Event Viewer log for any 520 or 577 error message (refer http://128.175.24.251/forensics/timechange.htm). Also check for any out of sequence / ahead of today date or time.&lt;br /&gt;
#In case of no 520 or 577 error message, go to Administrative Tools &amp;gt; Local Security Policy &amp;gt; Local Policies &amp;gt; Audit Policy &amp;gt; Audit Privilege use - make sure that Success and Failure are selected under this (this will ensure that future changes to the date/time are recorded in the System Log).&lt;br /&gt;
#In NEOSYS maintenance mode - F5 ED PROCESSES %UPDATE% - and see what it says, incase of any text (only text, not numbers) there, that means that for sure the system date has been changed. To fix this, exit the editor by pressing the ESCAPE key and then type DELETE PROCESSES &amp;quot;%UPDATE%&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Fixing starting issues with NEOSYS processes or Maintenance Mode==&lt;br /&gt;
&lt;br /&gt;
===Fixing &amp;quot;UNABLE TO OPEN BOOT MEDIA MAP&amp;quot; error===&lt;br /&gt;
&lt;br /&gt;
Opening NEOSYS process or maintenance mode just opens and closes the window instantly.&lt;br /&gt;
&lt;br /&gt;
Running ADAGENCY.BAT from a windows CMD shows an error message&lt;br /&gt;
&lt;br /&gt;
 Unable to open boot media map.&lt;br /&gt;
&lt;br /&gt;
Cause:&lt;br /&gt;
&lt;br /&gt;
AREV.EXE is unable to access the  REVMEDIA.LK file.&lt;br /&gt;
&lt;br /&gt;
Possibly due to windows permissions problems. For example after using CYGWIN RSYNC without the --no-perms option.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
If cygwin rsync has screwed up the permissions you can reset the permissions for all files on the D: disk&lt;br /&gt;
&lt;br /&gt;
D: disk properties, security tab, Advanced button&lt;br /&gt;
&lt;br /&gt;
#Owner: change to administrator&lt;br /&gt;
#Check &amp;quot;Replace owner on subcontainers and objects&amp;quot;&lt;br /&gt;
#Check &amp;quot;Replace all child object permission entries with ... &amp;quot;&lt;br /&gt;
#Apply and confirm all questions&lt;br /&gt;
#Repeat and change BACK to Owner: SYSTEM&lt;br /&gt;
&lt;br /&gt;
[[Image:Unableopenbootmediamap.png]]&lt;br /&gt;
&lt;br /&gt;
===Fixing issue where NEOSYS processes do not start-up at all or start-up and close immediately===&lt;br /&gt;
&lt;br /&gt;
Fixing issue where NEOSYS processes do not start-up at all or start-up and close immediately.&lt;br /&gt;
&lt;br /&gt;
#Check if a file with the name global.end exists in the root directory of the NEOSYS installation. Eg D:\global.end . If you find such a file, rename it to global.end.temp - for more information on global.end and what it does, refer to [[Administering_NEOSYS_Server#Closing_NEOSYS_Services|Closing NEOSYS Services]]&lt;br /&gt;
#If the above didn&#039;t fix the problem and NEOSYS still does not start, do a windows search for the entire NEOSYS folder for *.end (i.e. any file ending with .end extension). You may find a (databasecode).end file in D:\neosys\neosys folder which is created by the NEOSYS program during backup at 1 am and later on removed automatically. In this case NEOSYS program might have crashed during the backup and left this file behind. (databasecode).end files prevent other other NEOSYS processes starting up on the database while exclusive processes (like backup) are being done.&lt;br /&gt;
&lt;br /&gt;
Or try: Delete the read-only file REVBOOT file (under d:/neosys/neosys folder). REVBOOT file is recreated when you start maintenance mode.&lt;br /&gt;
&lt;br /&gt;
In case the above didn&#039;t fix the problem then escalate to the programmer immediately.&lt;br /&gt;
&lt;br /&gt;
==Recognising and Solving Low Memory Problems==&lt;br /&gt;
&lt;br /&gt;
Quick Note: Installing a server class operating system on a workstation class computer with the intention of NEOSYS serving a heavy load is likely to cause problems with low memory.&lt;br /&gt;
&lt;br /&gt;
Quick Fix: Disable *ALL* non-essential features in the power-on setup menu.&lt;br /&gt;
&lt;br /&gt;
===Effects===&lt;br /&gt;
&lt;br /&gt;
It is speculated but not proven that low memory may cause NEOSYS to fail by hanging, causing damaged files etc.&lt;br /&gt;
&lt;br /&gt;
===Checking===&lt;br /&gt;
&lt;br /&gt;
 F5&lt;br /&gt;
 MEMORY&lt;br /&gt;
&lt;br /&gt;
On server class machines it should say somewhere around 350Kb to 370Kb Free&lt;br /&gt;
&lt;br /&gt;
Some server class machines have around 330Kb and sometimes even less with no reported problems&lt;br /&gt;
&lt;br /&gt;
The actual effect of low memory is supposed to make NEOSYS slower and perhaps cause hanging and damaged files however this has not been proven in an specific case so far.&lt;br /&gt;
&lt;br /&gt;
On workstation class machines it may often say around 280Kb to 300Kb.&lt;br /&gt;
&lt;br /&gt;
===Cause===&lt;br /&gt;
&lt;br /&gt;
Although there is plenty of real memory in virtually all computers now, NEOSYS runs in the legacy 16 bit virtual memory space of a windows mode called NTVDM. This is limited to 1Mb plus 4Mb of EMS memory.&lt;br /&gt;
&lt;br /&gt;
The 1Mb memory space is shared with:&lt;br /&gt;
&lt;br /&gt;
#Various non-essential windows drivers which NEOSYS automatically disables them in autoexec.nt&lt;br /&gt;
#Various plug and play hardware device drivers for the various adapters in the computer like video, network adapters and various other items that NEOSYS is unable to disable.&lt;br /&gt;
&lt;br /&gt;
In a server class computer the hardware device drivers are usually minimally present in the 1Mb base memory and do not therefore DOESNT a low memory situation for NEOSYS.&lt;br /&gt;
&lt;br /&gt;
In workstation class computers there are often many hardware device drivers present in the 1Mb base memory and this DOES causes a low memory situation for NEOSYS.&lt;br /&gt;
&lt;br /&gt;
When NEOSYS is installed on workstation class computers with XP there is usually not a heavy load expectation and therefore the low memory does not cause a problem.&lt;br /&gt;
&lt;br /&gt;
If Windows Server OS is installed on a workstation class computer NEOSYS may well be expected to serve a heavy load with limited amounts of memory.&lt;br /&gt;
&lt;br /&gt;
Workstation class computers: hardware drivers present and EMS is installed in low memory (0000-9FFF) causing low memory for NEOSYS and possible inability to &lt;br /&gt;
&lt;br /&gt;
Server class computers: Usually few hardware drivers are present in high part (A000-FFFF) of the 1Mb base memory and EMS is able to occupy the high memory leaving the low part (0000-9FFFF) of the 1Mb memory free for NEOSYS. You can find out how much memory is available to NEOSYS and whether EMS is occuping high or low memory using the following sections.&lt;br /&gt;
&lt;br /&gt;
===Fixing Low Memory===&lt;br /&gt;
&lt;br /&gt;
Start, Run, notepad c:\windows\system32\autoexec.nt&lt;br /&gt;
&lt;br /&gt;
Every time NEOSYS starts it tries to make some changes as follow:&lt;br /&gt;
&lt;br /&gt;
#replaces all lines in C:/WINDOWS/SYSTEM32/AUTOEXEC.NT starting with &#039;lh &#039; to start with &#039;rem NEOSYS LH &#039; instead.&lt;br /&gt;
#changes the line in C:/WINDOWS/SYSTEM32/CONFIG.NT &amp;quot;files=...&amp;quot; to &amp;quot;FILES=200&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The replacement is case sensitive triggered on &#039;lh&#039; and &#039;files&#039; so if you manually edit the files and remove the rem or change the number of files and leave the LH and FILES in uppercase then NEOSYS will NOT make further changes. This allows you to do manual amendments to the files without NEOSYS overwriting them.&lt;br /&gt;
&lt;br /&gt;
Check that NEOSYS has successfully disabled all the drivers in the lines starting with LH.&lt;br /&gt;
&lt;br /&gt;
They should be commented out (prefixed) with REM or REM NEOSYS as follows.&lt;br /&gt;
&lt;br /&gt;
After making changes reopen NEOSYS in maintenance mode to use the MEMORY and WHO commands again.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
REM Install CD ROM extensions&lt;br /&gt;
REM NEOSYS LH %SystemRoot%\system32\mscdexnt.exe&lt;br /&gt;
&lt;br /&gt;
REM Install network redirector (load before dosx.exe)&lt;br /&gt;
REM NEOSYS LH %SystemRoot%\system32\redir&lt;br /&gt;
&lt;br /&gt;
REM Install DPMI support&lt;br /&gt;
REM NEOSYS LH %SYSTEMROOT%\SYSTEM32\DOSX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Low Memory Issues in Windows 2003 server can be fixed using instructions mentioned at [http://techwiki.neosys.com/index.php/Troubleshooting_NEOSYS_Generally#Enabling_EMS_memory_on_Window_2003 Fixing Low Memory in Windows 2003 Server]&lt;br /&gt;
&lt;br /&gt;
===Allowing DOS programs that require DOSX to run on the same computer as NEOSYS===&lt;br /&gt;
&lt;br /&gt;
The automatic commenting out DOSX by NEOSYS will prevent some other DOS-like programs from running. If NEOSYS is on dedicated server then there should be no other such programs to fail. However, if you must allow DOS-like programs to work as well as NEOSYS you can do the following configuration:&lt;br /&gt;
&lt;br /&gt;
#leave or restore the original AUTOEXEC.NT and CONFIG.NT files where they are&lt;br /&gt;
#copy them to another folder eg neosys folder&lt;br /&gt;
#make the necessary REM changes there by hand&lt;br /&gt;
#right click the NEOSYS\NEOSYS\AREV.PIF and select properties&lt;br /&gt;
#change the location of the AUTOEXEC.NT and CONFIG.NT files in the following location&lt;br /&gt;
&lt;br /&gt;
[[image:pifsettings.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Checking EMS Memory Configuration===&lt;br /&gt;
&lt;br /&gt;
====Inspection====&lt;br /&gt;
&lt;br /&gt;
 F5&lt;br /&gt;
 WHO&lt;br /&gt;
&lt;br /&gt;
 press the up arrow to get to the last part/page&lt;br /&gt;
&lt;br /&gt;
=====Example of Typical Server EMS Memory=====&lt;br /&gt;
[[image:serveremm.jpg]]&lt;br /&gt;
&lt;br /&gt;
=====Example of Typical Workstation EMS Memory=====&lt;br /&gt;
[[image:workstationemm.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Correction====&lt;br /&gt;
&lt;br /&gt;
No easy way&lt;br /&gt;
&lt;br /&gt;
Removal of hardware adapters designed for workstations instead of servers eg graphics cards and network cards.&lt;br /&gt;
&lt;br /&gt;
Many of the devices may be located on the motherboard and not relocatable except possibly by BIOS configuration or special manufacturer information.&lt;br /&gt;
&lt;br /&gt;
Use windows device manager, View: Resources by Connection, Open the Memory item and look for items between 000A0000 up to 000FFFFF that might give you a clue as to what hardware could be removed or reconfigured. Actually only 000C0000 to 000FFFFF is candidate for EMS memory since 000A000-000BFFFF is mandatory video memory in all systems.&lt;br /&gt;
&lt;br /&gt;
[[image:devicemanager.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Fixing issue where NEOSYS processes do not start-up at all or start-up and close immediately==&lt;br /&gt;
&lt;br /&gt;
#Find if a file with the name global.end exists in the root directory of the NEOSYS installation. Eg D:\global.end . If you find such a file, rename it to global.end.temp - for more information on global.end and what it does refer to [[Administering_NEOSYS_Server#Closing_NEOSYS_Services|Closing NEOSYS Services]]&lt;br /&gt;
#If the above didn&#039;t fix the problem and NEOSYS still does not start, do a windows search for the entire NEOSYS folder for *.end (i.e. any file ending with .end extension). You may find a (databasecode).end file in D:\neosys\neosys folder which is created by the NEOSYS program during backup at 1 am and later on removed automatically. In this case NEOSYS program might have crashed during the backup and left this file behind. (databasecode).end files prevent other other NEOSYS processes starting up on the database while exclusive processes (like backup) are being done.&lt;br /&gt;
&lt;br /&gt;
In case the above didn&#039;t fix the problem then escalate to the programmer immediately.&lt;br /&gt;
&lt;br /&gt;
===Solving &amp;quot;Control Record&amp;quot; error in maintenance mode===&lt;br /&gt;
&lt;br /&gt;
If processes dont start after you log into maintenance mode and you get an error message&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
╔════[FS152]═══════════════════════════════════════╗&lt;br /&gt;
║          The control record &amp;quot;RECORDS&amp;quot;            ║&lt;br /&gt;
║           is too long to be saved.               ║&lt;br /&gt;
║   The current record length is 65539 characters. ║&lt;br /&gt;
║                                                  ║&lt;br /&gt;
║               &amp;lt; Press any key &amp;gt;                  ║&lt;br /&gt;
╚══════════════════════════════════════════════════╝  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[File:Record1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1&#039;&#039;&#039;. Press space to get rid of the error message and you should then get this menu&lt;br /&gt;
&lt;br /&gt;
[[File:Record2.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2&#039;&#039;&#039;. Press F5 and run this command (case sensitive)&lt;br /&gt;
&lt;br /&gt;
 DICT DEFINITIONS&lt;br /&gt;
&lt;br /&gt;
or Press Alt+S and run this command (case sensitive)&lt;br /&gt;
&lt;br /&gt;
 EXECUTE DICT DEFINITIONS&lt;br /&gt;
&lt;br /&gt;
[[File:Record3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3&#039;&#039;&#039;. Press Shift+F3 to get the following message&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
╔══[B202]══════════════════════════════════╗&lt;br /&gt;
║            &amp;quot;DEFINITIONS&amp;quot; has             ║&lt;br /&gt;
║          &amp;quot;QUICKDEX&amp;quot; installed            ║&lt;br /&gt;
║                                          ║&lt;br /&gt;
║ Do you want to remove &amp;quot;QUICKDEX&amp;quot;? [Y/N]  ║&lt;br /&gt;
║                                          ║&lt;br /&gt;
║ &amp;lt;Y                                      &amp;gt;║&lt;br /&gt;
╚══════════════════════════════════════════╝&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Do you want to remove &amp;quot;QUICKDEX&amp;quot;? [Y/N]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4&#039;&#039;&#039;. Press Enter to choose Yes.&lt;br /&gt;
&lt;br /&gt;
[[File:Record4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;5.&#039;&#039;&#039;Restart NEOSYS to see if the problem has been solved&lt;br /&gt;
&lt;br /&gt;
==Solving “page not found” or &amp;quot;HTTP Error 404.3 - Not Found&amp;quot; when downloading some file types after uploading them successfully==&lt;br /&gt;
&lt;br /&gt;
A user gets this error message when trying to download a file that has been uploaded into NEOSYS.&lt;br /&gt;
&lt;br /&gt;
Windows web server will not download file types that it is unaware of. You can enable the download of new file types.&lt;br /&gt;
&lt;br /&gt;
===Adding Mime Types in Windows Sever 2003=== &lt;br /&gt;
&lt;br /&gt;
====One by One====&lt;br /&gt;
&lt;br /&gt;
Follow below steps to enable the download of new file types one by one.&lt;br /&gt;
&lt;br /&gt;
This process is tedious and error-prone if you have to add many types.&lt;br /&gt;
&lt;br /&gt;
#Computer Management&lt;br /&gt;
#Services and Applications&lt;br /&gt;
#IIS properties&lt;br /&gt;
#Mime Types&lt;br /&gt;
#Add&lt;br /&gt;
&lt;br /&gt;
The added Mime type will not take effect unless IIS is restarted. This should be done only when users are offline because restarting IIS kills login sessions and therefore forces users to login again.&lt;br /&gt;
&lt;br /&gt;
Open command prompt and enter the following command&lt;br /&gt;
 iisreset&lt;br /&gt;
&lt;br /&gt;
====Many====&lt;br /&gt;
&lt;br /&gt;
Window Server 2003 is unaware of all the Office 2007+ file types. To add all Office 2007+ file types at once do the following:&lt;br /&gt;
&lt;br /&gt;
Stop IIS&lt;br /&gt;
&lt;br /&gt;
 iisreset /stop&lt;br /&gt;
&lt;br /&gt;
Open the list of mime types&lt;br /&gt;
&lt;br /&gt;
*Start, Run, notepad C:\WINDOWS\system32\inetsrv\MetaBase.xml&lt;br /&gt;
&lt;br /&gt;
Search the file for “xlsx” and quit the editor if already inserted.&lt;br /&gt;
&lt;br /&gt;
Otherwise, find the following line,&lt;br /&gt;
&lt;br /&gt;
  .xml,text/xml&lt;br /&gt;
&lt;br /&gt;
and insert after that line the following lines. They do not need to be indented.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
.docm,application/vnd.ms-word.document.macroEnabled.12&lt;br /&gt;
.docx,application/vnd.openxmlformats-officedocument.wordprocessingml.document&lt;br /&gt;
.dotm,application/vnd.ms-word.template.macroEnabled.12&lt;br /&gt;
.dotx,application/vnd.openxmlformats-officedocument.wordprocessingml.template&lt;br /&gt;
.potm,application/vnd.ms-powerpoint.template.macroEnabled.12&lt;br /&gt;
.potx,application/vnd.openxmlformats-officedocument.presentationml.template&lt;br /&gt;
.ppam,application/vnd.ms-powerpoint.addin.macroEnabled.12&lt;br /&gt;
.ppsm,application/vnd.ms-powerpoint.slideshow.macroEnabled.12&lt;br /&gt;
.ppsx,application/vnd.openxmlformats-officedocument.presentationml.slideshow&lt;br /&gt;
.pptm,application/vnd.ms-powerpoint.presentation.macroEnabled.12&lt;br /&gt;
.pptx,application/vnd.openxmlformats-officedocument.presentationml.presentation&lt;br /&gt;
.xlam,application/vnd.ms-excel.addin.macroEnabled.12&lt;br /&gt;
.xlsb,application/vnd.ms-excel.sheet.binary.macroEnabled.12&lt;br /&gt;
.xlsm,application/vnd.ms-excel.sheet.macroEnabled.12&lt;br /&gt;
.xlsx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet&lt;br /&gt;
.xltm,application/vnd.ms-excel.template.macroEnabled.12&lt;br /&gt;
.xltx,application/vnd.openxmlformats-officedocument.spreadsheetml.template&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save the file with File and Exit&lt;br /&gt;
&lt;br /&gt;
Restart IIS&lt;br /&gt;
&lt;br /&gt;
===Adding Mime Types in Windows Server 2008===&lt;br /&gt;
&lt;br /&gt;
&amp;quot;The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[file:mime2008.jpg]]&lt;br /&gt;
&lt;br /&gt;
This message shows when a user attempts to download a file that has been uploaded into NEOSYS and the file extension is not configured in IIS server Mime Maps.&lt;br /&gt;
&lt;br /&gt;
The user may also get the below error message:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[file:mimetype.jpg]]&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
Add mime mappings in IIS. Use the GUI or the servers command line.&lt;br /&gt;
The exact solution depends on the file type. Example for .msg files:&lt;br /&gt;
&lt;br /&gt;
 C:\windows\System32\inetsrv\appcmd set config /section:staticContent /+&amp;quot;[fileExtension=&#039;.msg&#039;,mimeType=&#039;application/vnd.ms-outlook&#039;]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The bit that varies in the above example is:&lt;br /&gt;
&lt;br /&gt;
*.msg&lt;br /&gt;
&lt;br /&gt;
*application/vnd.ms-outlook&lt;br /&gt;
&lt;br /&gt;
Other mime types can be found on the web eg https://www.thoughtco.com/file-extensions-and-mime-types-3469109&lt;br /&gt;
&lt;br /&gt;
Getting the 2nd part right enables the user to have the downloaded file open automatically in the right application for the file extension,  but only if they have the right application installed.&lt;br /&gt;
&lt;br /&gt;
==Handling Neosys Automatic Upgrade Error Messages==&lt;br /&gt;
&lt;br /&gt;
===Error Message===&lt;br /&gt;
We will receive an email from the NEOSYS client installation with the following message:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;quot;UPGRADEN.EXE&amp;quot; does not have expected exe MZ signature&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
This message is a note that the NEOSYS automatic update procedure failed to download an upgrade file correctly.&lt;br /&gt;
This happens sometimes due to network issues but can be ignored because the file will be probably be correctly downloaded on the next automatic update check.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This message is only informative to help with any problem with the automatic upgrade procedure and may be removed in a later version of neosys (currently Oct 2012)&lt;br /&gt;
&lt;br /&gt;
==Handling Duplicate Login Error E-mails==&lt;br /&gt;
&lt;br /&gt;
===Explanation===&lt;br /&gt;
When a user starts a new session on NEOSYS, any existing session is lost. If a user then tries to go back and work on the old session, they will receive a Duplicate Login Error email.&lt;br /&gt;
&lt;br /&gt;
This is because any user can have only one active session to work on. For example, if a user account is logged into NEOSYS from two different browsers or two different workstations at the same time, the user will receive this error e-mail.&lt;br /&gt;
&lt;br /&gt;
===Error E-mail===&lt;br /&gt;
[[File:dup-login.png]]&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
To avoid the Duplicate Login error e-mail, you must always logout from your active NEOSYS session before starting a new session elsewhere.&lt;br /&gt;
&lt;br /&gt;
==Testing https connection==&lt;br /&gt;
&lt;br /&gt;
The following procedure tests that the https server is operational and not blocked by firewall etc. It does not detect certificate errors.&lt;br /&gt;
&lt;br /&gt;
From a windows command prompt use the following telnet command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
telnet clientname.hosts.neosys.com 4430&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#4430 is the usual NEOSYS http port but replace it by whatever port is actually used for NEOSYS https on the system being tested. If there are multiple https installations on a particular server then different ports are probably used&lt;br /&gt;
#Replace clientname.hosts.neosys.com with the normal https login domain name of the client for whom we want to check the https service&lt;br /&gt;
&lt;br /&gt;
Normal behavior is that it should open a black screen. Pressing Enter or any key returns the _ character. (Close the window using the [X] since there is no keyboard command to do so)&lt;br /&gt;
&lt;br /&gt;
Hanging means that there is some connectivity issue (firewall/ip/server not running/https not installed etc)&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting &amp;quot;page not found&amp;quot; error while using https==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problem:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#The https service stops working and gives &amp;quot;Page not found&amp;quot; error.&lt;br /&gt;
#The https connection tests fine using telnet (see article above)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Reinstall https using the usual procedure (currently using selfssl)&lt;br /&gt;
#Email clients, requesting to reinstall the new security certificate by following the instructions for [http://userwiki.neosys.com/index.php/Setting_up_and_Configuring_NEOSYS_Generally#Fixing_HTTPS_certificate_error_when_logging_in_from_an_external_link_using_IE8.2C_IE9_and_IE10 Internet Explorer] or [http://userwiki.neosys.com/index.php/Configuring_Safari_for_MAC_OS#Fixing_HTTPS_certificate_error_when_logging_in_using_an_external_link_using_MAC_Operating_System Safari] browser.&lt;br /&gt;
&lt;br /&gt;
==Installing &amp;quot;QUICKDEX&amp;quot; on some files==&lt;br /&gt;
&amp;quot;Quickdex&amp;quot; is a type of index that keeps an alphabetical order on small files. In some maintenance procedures you may be asked to &amp;quot;install Quickdex&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For example to add a quickdex to the UNITS file.&lt;br /&gt;
&lt;br /&gt;
Maintenance mode press F5&lt;br /&gt;
&lt;br /&gt;
 DICT UNITS&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
г=================Dictionary=================┐&lt;br /&gt;
│                                            │&lt;br /&gt;
│  File name      UNITS                      │&lt;br /&gt;
│  Field name     .........................  │&lt;br /&gt;
│                                            │&lt;br /&gt;
│  Dict type                                 │&lt;br /&gt;
│  Single/Multi                              │&lt;br /&gt;
│  Data type                                 │&lt;br /&gt;
│  Output format                             │&lt;br /&gt;
│  Validation patterns                       │&lt;br /&gt;
│                                            │&lt;br /&gt;
│  Position              Key part            │&lt;br /&gt;
│                                            │&lt;br /&gt;
│  Column heading                            │&lt;br /&gt;
│                                            │&lt;br /&gt;
│                                            │&lt;br /&gt;
│  Justification     Display length          │&lt;br /&gt;
│  Description                               │&lt;br /&gt;
│                                            │&lt;br /&gt;
│                                            │&lt;br /&gt;
L============================================-&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Press Shift+F3.&lt;br /&gt;
&lt;br /&gt;
If it says &amp;quot;Do you want to remove ...&amp;quot; then Quickdex has already been installed and you should not continue. Press Esc to cancel, then Esc to quit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
г=[B202]==================================┐&lt;br /&gt;
│                                         │&lt;br /&gt;
│               &amp;quot;UNITS&amp;quot; has               │&lt;br /&gt;
│          &amp;quot;QUICKDEX&amp;quot; installed.          │&lt;br /&gt;
│                                         │&lt;br /&gt;
│ Do you want to remove &amp;quot;QUICKDEX&amp;quot;? [Y/N] │&lt;br /&gt;
│                                         │&lt;br /&gt;
│&amp;lt;Y                                      &amp;gt;│&lt;br /&gt;
L=========================================-&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Otherwise it should say &amp;quot;Do you want to install ...&amp;quot;. Press Enter to accept.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
г=[W963]============================┐&lt;br /&gt;
│                                   │&lt;br /&gt;
│     Do you want to install a      │&lt;br /&gt;
│ Quickdex or Rightdex index? [Q/R] │&lt;br /&gt;
│                                   │&lt;br /&gt;
│&amp;lt;Q                                &amp;gt;│&lt;br /&gt;
L===================================-&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It should then say &amp;quot;Do you want to update ...&amp;quot;. Press Enter to accept.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
г=[W901]========================================┐&lt;br /&gt;
│                                               │&lt;br /&gt;
│           The &amp;quot;UNITS&amp;quot; file has had            │&lt;br /&gt;
│ the &amp;quot;QUICKDEX&amp;quot; modifying filing system added. │&lt;br /&gt;
│        There are 0 records in &amp;quot;UNITS&amp;quot;.        │&lt;br /&gt;
│                                               │&lt;br /&gt;
│    Do you want to update &amp;quot;QUICKDEX&amp;quot;? [Y/N]    │&lt;br /&gt;
│                                               │&lt;br /&gt;
│&amp;lt;Y                                            &amp;gt;│&lt;br /&gt;
L===============================================-&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards it should return to the initial screen. Press Esc to quit.&lt;br /&gt;
&lt;br /&gt;
==Solving NEOSYS smtp server failure==&lt;br /&gt;
In case the neosys smtp server fails then we can just use the client&#039;s smtp server.&lt;br /&gt;
&lt;br /&gt;
The following information is required from the client&#039;s smtp server configuration:&lt;br /&gt;
&lt;br /&gt;
#hostname&lt;br /&gt;
#username&lt;br /&gt;
#password&lt;br /&gt;
#port no. (most likely = 25)&lt;br /&gt;
&lt;br /&gt;
These details should be entered in the &#039;&#039;&#039;System Configuration File&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
[[image:SYSCFGFILE-SMTP.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Strange characters in maintenance mode==&lt;br /&gt;
While in Maintenance mode, pressing keys on keyboard gives strange characters. Even Enter and Esc don’t work. &lt;br /&gt;
&lt;br /&gt;
This problem has been seen using RDP on:&lt;br /&gt;
&lt;br /&gt;
*Window Server 2003 Web Edition&lt;br /&gt;
*Windows Server 2003 R2 SP2&lt;br /&gt;
&lt;br /&gt;
[[image:strangecharmaint.jpg]] &lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
#Go to Windows -&amp;gt; control panel&lt;br /&gt;
#Go to Regional and Language Options&lt;br /&gt;
#Click on Languages tab then click on Details &amp;lt;br&amp;gt; [[image:lang1.jpg]] &amp;lt;br&amp;gt;&lt;br /&gt;
#Click on Settings Tab and Change default input language to English (United States)&amp;lt;br&amp;gt;(or perhaps something else depending on rdp keyboard) &amp;lt;br&amp;gt; [[image:lang2.jpg]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NEOSYS processes do not start after Windows Update==&lt;br /&gt;
&lt;br /&gt;
===Problem===&lt;br /&gt;
Scheduled Task to start the NEOSYS processes fail on Servers with Windows 2008 after Windows update. Support will have to log into the server to start the processes manually&lt;br /&gt;
Message on the Schedule Task displays &amp;quot; The operation being requested was not performed because the user has not logged on to the network. The specified service does not exit &amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[image:sti.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
&lt;br /&gt;
For clients who cannot tolerate manual intervention after server reboots for any reason (e.g.need to start work before NEOSYS support is available or on NEOSYS support weekends), tick &amp;quot;highest privileges&amp;quot; and &amp;quot;run whether the user is logged in or not&amp;quot;. This approach means that NEOSYS processes which are started by the windows scheduled task are not visible on the desktop and run hidden in the background and only listed in task manager, so avoid this approach on small clients (only few users). Avoiding this approach will also serve to act as an indicator of server restarts.&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting NEOSYS remote support port forwarding==&lt;br /&gt;
This assumes that you have already “port forwarded” tcp port 19580 from your public internet router to the NEOSYS server.&lt;br /&gt;
&lt;br /&gt;
===Tst 0 - Check if SSH is working on the NEOSYS Server===&lt;br /&gt;
Type in the following command in command prompt:&lt;br /&gt;
 telnet 127.0.0.1 19580&lt;br /&gt;
&lt;br /&gt;
IF ALL OK you will see the following:&lt;br /&gt;
&lt;br /&gt;
[[image:tr-pf-03.jpg]] &lt;br /&gt;
&lt;br /&gt;
===Test 1 - Check if SSH is basically working on NEOSYS server over the LAN===&lt;br /&gt;
You must know and use the NEOSYS SERVER LAN IP to do this.&lt;br /&gt;
&lt;br /&gt;
 telnet ???.???.???.??? 19580&lt;br /&gt;
&lt;br /&gt;
[[image:tr-pf-01.jpg]]&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If you have the WRONG SERVER LAN IP or NEOSYS server SSH is NOT working then it will hang for about 15 seconds and then say “Could not open connection to host …”&lt;br /&gt;
&lt;br /&gt;
[[image:tr-pf-02.jpg]]&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
OR IF ALL OK you will see the following:&lt;br /&gt;
&lt;br /&gt;
[[image:tr-pf-03.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Press Enter to Exit&lt;br /&gt;
&lt;br /&gt;
[[image:tr-pf-04.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test 2 - Check if can connect to the NEOSYS ssh from OUTSIDE the office===&lt;br /&gt;
From any internet connected computer OUTSIDE the office test if you can connect to NEOSYS ssh service. You cannot do this test from inside the office.&lt;br /&gt;
&lt;br /&gt;
You need to know the public ip or domain name of the router. If the router IP is dynamic then NEOSYS sets up dynamic name server so instead of a static ip number you will have a domain name something like clientxyz.redirectme.net.&lt;br /&gt;
&lt;br /&gt;
Enter the command .. using YOUR public internet IP number (NOT the LAN ip number) or the dynamic domain name.&lt;br /&gt;
&lt;br /&gt;
[[image:tr-pf-05.jpg]]  &lt;br /&gt;
&lt;br /&gt;
If everything is working OK you will get a black screen as follows. You will NOT get the “SSH-2.0-OpenSSH-4.7” banner” because NEOSYS ssh remote support is restricted to connect ONLY from LAN ip nos and NEOSYS office ip nos.&lt;br /&gt;
&lt;br /&gt;
[[image:tr-pf-06.jpg]]  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you press Enter a few times then the cursor will just go down. You have click the [X] to close the window.&lt;br /&gt;
&lt;br /&gt;
[[image:tr-pf-07.jpg]]  &lt;br /&gt;
&lt;br /&gt;
===Test 3 - Check that the ssh connection from step 2 was rejected===&lt;br /&gt;
On the NEOSYS server, check the Windows Application log to verify that an SSH connection was rejected.&lt;br /&gt;
&lt;br /&gt;
The rejected ip number will be of the system outside the office that you performed the test from.&lt;br /&gt;
&lt;br /&gt;
[[image:tr-pf-08.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Sample Email: Solving port 19580 port forwarding issues===&lt;br /&gt;
&lt;br /&gt;
Some IT people know how to troubleshoot port forwarding issues but others are mostly just power users who can configure a home router. If the IT person is in the second category then it is quicker for NEOSYS support to offer to configure their router from the NEOSYS server using Teamviewer. Ideally NEOSYS should not be doing client IT work but if client IT allows NEOSYS access to their router then NEOSYS support can make a brief attempt to do the configuration. If the issue is still unresolved then request the client to get a professional IT network expert to do the job and inform them that NEOSYS will not be able to provide them any support till connectivity is fixed. Below is a letter advising a more skilled person to check connections using telnet which is a low level test.&lt;br /&gt;
&lt;br /&gt;
You can usually determine the NEOSYS server LAN IP number from Nagios. If so then adjust the email text appropriately.&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
Dear XYZ,&lt;br /&gt;
&lt;br /&gt;
It is highly critical to fix the connectivity with the NEOSYS server because NEOSYS will not be able to provide any support until connectivity is fixed. User support issues will be delayed and remain unresolved if you do not fix this issue URGENTLY.&lt;br /&gt;
&lt;br /&gt;
At the moment there is no connection from the internet via your router to the NEOSYS server and when we do the following, we get no connection. &lt;br /&gt;
&lt;br /&gt;
   telnet CLIENTNAME.hosts.neosys.com 19580&lt;br /&gt;
&lt;br /&gt;
Normally it should connect and presents a black screen (saying SSH something after pressing Enter) which we close.&lt;br /&gt;
&lt;br /&gt;
Please check that you can connect to the NEOSYS server internally by using the NEOSYS server IP address in the following command on any computer in your LAN.&lt;br /&gt;
&lt;br /&gt;
   telnet 192.168.?.? 19580&lt;br /&gt;
&lt;br /&gt;
If you can connect to the NEOSYS server internally then please check port forwarding.&lt;br /&gt;
&lt;br /&gt;
Additionally check the following:&lt;br /&gt;
1. Has your router IP changed? The IP we have is x.x.x.x&lt;br /&gt;
2. Has your server’s LAN IP changed and are you forwarding to the correct LAN IP?&lt;br /&gt;
3. Is the configuration really correct?&lt;br /&gt;
4. Check router logs for clues&lt;br /&gt;
5. Check NAT settings in the router&lt;br /&gt;
&lt;br /&gt;
If you still cannot see the problem, do &amp;quot;telnet CLIENTNAME.hosts.neosys.com 19580&amp;quot; command from OUTSIDE your network to replicate the problem we are facing.&lt;br /&gt;
&lt;br /&gt;
For troubleshooting steps refer Troubleshooting NEOSYS remote support&lt;br /&gt;
http://techwiki.neosys.com/index.php/Troubleshooting_NEOSYS_Generally#Troubleshooting_NEOSYS_remote_support_port_forwarding&lt;br /&gt;
&lt;br /&gt;
If the problem still persists, please get a professional IT network expert to fix the issue.&lt;br /&gt;
&lt;br /&gt;
Best Regards,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Port mapping restricted by Source IP===&lt;br /&gt;
&lt;br /&gt;
On NEOSYS router, port forwarding has been setup only for specific source IP addresses. This means you will not be able to establish a TCP connection to NEOSYS server unless your server&#039;s outbound IP is mapped to the NEOSYS router. In other words unless the outbound i.e source IP/port of your server has been granted access on the NEOSYS router for all incoming connections you will not be able to make connections to NEOSYS server.&lt;br /&gt;
&lt;br /&gt;
Outbound IP is used whenever a server tries to make a connection to another server outside its network. On the other hand a server receives all incoming connections using it&#039;s Inbound IP.&lt;br /&gt;
&lt;br /&gt;
Therefore to setup ssh connection from a new Client server to NEOSYS server we need to grant access to its outbound IP on the NEOSYS router. See [[Troubleshooting_NEOSYS_Generally#If_Telnet_does_not_work | link]] to find the outbound server IP/ports of the server.&lt;br /&gt;
&lt;br /&gt;
==Solving “Cant login … INVALID DATA PATH … permission denied”==&lt;br /&gt;
===Error Message===&lt;br /&gt;
&lt;br /&gt;
[[image:error-invalid-data-path-1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Error Text:&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 Cannot login because:&lt;br /&gt;
 ERROR: INVALID DATA PATH&lt;br /&gt;
 “D:\HOSTS\HOSTNAME\DATA\HOSTNAME\~8746345.1$” Permission Denied&lt;br /&gt;
&lt;br /&gt;
===Problem Explained===&lt;br /&gt;
When installing NEOSYS on an existing “non-clean” Windows installation, the standard NEOSYS installation procedure can result in failure to login if the standard windows folder permissions have been modified.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
The solution is to grant IIS permission to write in the \neosys\DATA folder and subfolders as follows:&lt;br /&gt;
&lt;br /&gt;
#First add the IUSR_XXXXXXX user to the list of users. (XXXXXXXX is the server name and therefore varies per server) as follows:&lt;br /&gt;
#*Right Click on DATA Folder and click on Properties&lt;br /&gt;
#*Click on Security Tab -&amp;gt; Add -&amp;gt; Advanced&lt;br /&gt;
#*Click on Find Now, Select the IUSR_XXXXXXX user and Click on OK&amp;lt;br&amp;gt;[[image:error-invalid-data-path-2.jpg]]&amp;lt;br&amp;gt;[[image:error-invalid-data-path-3.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
#Second, for the newly added IUSR (IIS user) change the permissions as follows:&lt;br /&gt;
#*&#039;&#039;&#039;REMOVE&#039;&#039;&#039; the read and execute permission (for security, IIS should be unable to execute things that it might have uploaded)&lt;br /&gt;
#*&#039;&#039;&#039;ADD&#039;&#039;&#039; the write permission &amp;lt;br&amp;gt;[[image:error-invalid-data-path-4.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
#Login should now be possible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==NEOSYS process window displays message &amp;quot;Upgrade Downloading&amp;quot;==&lt;br /&gt;
&lt;br /&gt;
[[image:upgradedownloading.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Problem Explained===&lt;br /&gt;
NEOSYS thinks it sees an new neosys2.exe upgrade file on the location http://www.neosys.com/support/neosys2.exe which is accessed by http so attempts to download it.&lt;br /&gt;
&lt;br /&gt;
Http proxies and various internet issues can cause incorrect info to be sent and there is actually no upgrade available. In this case, eventually it realizes that it cant find an appropriate and it stops. &lt;br /&gt;
&lt;br /&gt;
You don’t have to worry about this case.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enabling EMS memory on Window 2003==&lt;br /&gt;
&lt;br /&gt;
Normally EMS memory is provided by Windows 2003 but this can vary depending on the server hardware/bios configuration&lt;br /&gt;
&lt;br /&gt;
If you get the following messages on Windows 2003&lt;br /&gt;
&lt;br /&gt;
#Backup File Size is 0&lt;br /&gt;
#RTP27. [B28] Not enough String Space – Out of Memory&lt;br /&gt;
&lt;br /&gt;
===Cause===&lt;br /&gt;
&lt;br /&gt;
On servers that had no problem previously, the problem is caused by a windows update in Oct 2012 that disables standard Windows EMS memory.&lt;br /&gt;
&lt;br /&gt;
The patch is issued by Microsoft on 9 Oct 2012 but the installation date in the server depends on when the update was actually installed.&lt;br /&gt;
&lt;br /&gt;
http://support.microsoft.com/kb/2724197&lt;br /&gt;
&lt;br /&gt;
===Solution 1 - maximum performance===&lt;br /&gt;
&lt;br /&gt;
To re-enable standard windows EMS on older slower servers or servers where NEOSYS performance must be maximized.&lt;br /&gt;
&lt;br /&gt;
The following link contains instructions how to remove the offending windows update&lt;br /&gt;
&lt;br /&gt;
It also shows how to prevent it being reinstalled automatically by Windows.&lt;br /&gt;
&lt;br /&gt;
http://www.columbia.edu/~em36/wpdos/emsxp.html&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to prevent it being reinstalled again automatically&lt;br /&gt;
&lt;br /&gt;
===Solution 2 – ease of installation===&lt;br /&gt;
&lt;br /&gt;
This option can also be used if Window 2003 is unable to provide EMS memory for example when the server hardware/bios configuration prevents it.&lt;br /&gt;
&lt;br /&gt;
Install EMSMAGIC in the same way as for Windows server 2008&lt;br /&gt;
&lt;br /&gt;
EMSMAGIC has higher memory consumption and makes NEOSYS processes slower so it is better to use Solution 1 above if NEOSYS performance is an issue.&lt;br /&gt;
&lt;br /&gt;
==Fixing no output file in XXX YYY Issue==&lt;br /&gt;
&lt;br /&gt;
===Error Message===&lt;br /&gt;
&lt;br /&gt;
[[File:Nooutputfile.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Problem Explained===&lt;br /&gt;
&lt;br /&gt;
The message “No output file in XXX YYY” can appear at several instances in NEOSYS, most often when generating reports or documents. &lt;br /&gt;
&lt;br /&gt;
This problem is usually caused by software error and it indicates that the NEOSYS server responded without any output and without any message. &lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
&lt;br /&gt;
*Find proof to check if the data required for the report actually exists. This way we can eliminate lack of data as a cause for this error.&lt;br /&gt;
*Check to see if a similar issue has been fixed in latest version of NEOSYS.&lt;br /&gt;
*Document HOW and WHERE the problem can be duplicated by NEOSYS programmers to identify and correct the software.&lt;br /&gt;
&lt;br /&gt;
==Fixing &amp;quot;Units file is missing&amp;quot; error==&lt;br /&gt;
&lt;br /&gt;
[[Image:unitsfile.png]]&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
&lt;br /&gt;
As the message mentions, the &#039;Units&#039; file is missing. This error can be fixed by copying the file from any other installation, since the Units file is the same in all installations.&lt;br /&gt;
&lt;br /&gt;
The Units file is found in the &#039;General&#039; folder. Path : neosys/NEOSYS/DATA/DATABASE/GENERAL/&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting Internet Connections==&lt;br /&gt;
&lt;br /&gt;
===Cannot Connect===&lt;br /&gt;
&lt;br /&gt;
While investigating as to why users are not able to access NEOSYS or http://www.neosys.com/ , you can check which ISP the connection issue is on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;whois ipno&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inspect very carefully to get clues as to which ISP and which AREA of the ISP the problematic ip numbers are and which do NOT have problems&lt;br /&gt;
&lt;br /&gt;
Doing tracert on windows command prompt on the user&#039;s computer may help locate which point on the route between the user and the server is blocking access&lt;br /&gt;
&lt;br /&gt;
 tracert xxxx.hosts.neosys.com&lt;br /&gt;
&lt;br /&gt;
where &amp;quot;xxxx&amp;quot; is the client name. In this example, the output will be something like shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Tracing route to xxxx.hosts.neosys.com [37.48.81.101]&lt;br /&gt;
over a maximum of 30 hops:&lt;br /&gt;
&lt;br /&gt;
  1     2 ms     1 ms     3 ms  ukr.sb.com [192.168.2.1]&lt;br /&gt;
  2    10 ms    10 ms    11 ms  losubs.subs.bng2.th-lon.zen.net.uk [62.3.80.21]&lt;br /&gt;
  3    12 ms    10 ms    67 ms  ae1-182.cr1.th-lon.zen.net.uk [62.3.86.80]&lt;br /&gt;
  4    10 ms    11 ms    11 ms  ae0-0.br2.th-lon.zen.net.uk [62.3.80.42]&lt;br /&gt;
  5    13 ms    14 ms    14 ms  peering.thn.lon.leaseweb.net [195.66.225.56]&lt;br /&gt;
  6    23 ms    23 ms    24 ms te-0-10-0-19.bb01.ams-01.leaseweb.net [31.31.32.71]&lt;br /&gt;
  7    22 ms    22 ms    23 ms xe-11-2-3.br01.ams-01.nl.leaseweb.net [31.31.38.89]&lt;br /&gt;
  8    25 ms    28 ms    26 ms  be-10.cr02.ams-01.nl.leaseweb.net [81.17.34.21]&lt;br /&gt;
  9    24 ms    20 ms    25 ms po-1002.ce02.ams-01.nl.leaseweb.net [37.48.95.195]&lt;br /&gt;
 10    24 ms    22 ms    22 ms  nl10r.neosys.com [37.48.81.101]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting TCP/IP Connections===&lt;br /&gt;
&lt;br /&gt;
====Telnet check====&lt;br /&gt;
 telnet &amp;lt;hostname&amp;gt; 19580&lt;br /&gt;
&lt;br /&gt;
If success then host is on web and port is open. &lt;br /&gt;
Otherwise if error: &amp;quot;Connection refused,&amp;quot; then either an intermediate firewall is blocking access or the port is closed on host machine. &lt;br /&gt;
Action: check with client if office firewall(s) allow connection on that port and if the port is open on the host server.&lt;br /&gt;
&lt;br /&gt;
====If Telnet does not work====&lt;br /&gt;
In case telnet does not work, login to the remote host server to investigate the issue. Run the following command simultaneously while doing Telnet from client server to the remote host to check if the TCP packets are reaching the Remote server.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tcpdump -v &#039;src host client-domain-name/ip&#039; &lt;br /&gt;
tcpdump -v portno &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check if packets are sent from the client server to the remote host, you can run the following command simultaneously while trying to ssh to the remote server.&lt;br /&gt;
&amp;lt;pre&amp;gt;netstat -an &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also check if the outbound ports are open from which you are trying to establish the TCP connection to the remote server.&lt;br /&gt;
&amp;lt;pre&amp;gt;telnet portquiz.net portno &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The outbound IP addresses at times can be different from the public IP of the Client server so be sure that the public IP of the client server is the same as its source IP (which represents an incoming connection from Client to Remote server). One way to find the source IP of the Client server is sending an email from Client server to &amp;quot;support@neosys.com&amp;quot;. On receiving the email in Thunderbird, select the email and press Ctrl+u. A new window Opens giving full details of the email received. The third &amp;quot;Received :from&amp;quot; gives the IP of the source.&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting DNS failure===&lt;br /&gt;
&lt;br /&gt;
NEOSYS clients routers are usually configured to use their ISP DNS service and the ISP DNS service is supposed to contact one of NEOSYS&#039;s DNS servers to convert server names like hosts.neosys.com into IP numbers. Misconfiguration of clients routers or problems in the ISP DNS server may cause CANNOT CONNECT problems. Often the connect fails quickly and immediately since if a name cannot be converted to an ip number then the connection cannot even be attempted and therefore there is little or no timeout to wait through.&lt;br /&gt;
&lt;br /&gt;
NEOSYS.COM name servers are listed publically and obtained by whois command.&lt;br /&gt;
&lt;br /&gt;
 whois neosys.com&lt;br /&gt;
&lt;br /&gt;
 Name Server: DNS1.EASYDNS.COM&lt;br /&gt;
 Name Server: DNS2.EASYDNS.NET&lt;br /&gt;
 Name Server: DNS3.EASYDNS.ORG&lt;br /&gt;
 Name Server: NS12.ZONEEDIT.COM&lt;br /&gt;
 Name Server: NS18.ZONEEDIT.COM&lt;br /&gt;
&lt;br /&gt;
In order to contact NEOSYS DNS servers the ISP&#039;s have to use a global DNS to obtain the ip addresses of NEOSYS DNS servers given the host names of NEOSYS DNS servers given in the whois info&lt;br /&gt;
&lt;br /&gt;
Here is an example of DU testing NEOSYS DNS servers. The NEOSYS DNS server ip addresses are listed in the Destination column.&lt;br /&gt;
&lt;br /&gt;
[[File:internet.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If one DNS server is down or unreachable REGARDLESS OF REASON, the ISP is supposed to use the other DNS servers. It is impossible for all NEOSYS DNS servers to be unreachable except in gross disconnection from the internet of the ISP since it is effectively impossible that all NEOSYS DNS servers which are carefully spread around the internet, to be unreachable.&lt;br /&gt;
&lt;br /&gt;
In the above test one of the NEOSYS DNS servers is unreachable but all the others are reachable therefore DU should have no problem providing DNS service to its clients.&lt;br /&gt;
&lt;br /&gt;
ISP are often worse at providing DNS server than the famous GOOGLE DNS servers, so re configuring client router to use GOOGLE DNS servers is a way to prove that the problem lies with the ISP&#039;s DNS service&lt;br /&gt;
&lt;br /&gt;
===Additional test for troubleshooting problems with uploading===&lt;br /&gt;
&lt;br /&gt;
====Verifying that upload.dll can run====&lt;br /&gt;
&lt;br /&gt;
This isnt a complete test of everything. It just checks if the upload program can be run by the web server. It doesnt check if uploads work or the image directory is correctly configured with the right permissions and uploads can actually be done.&lt;br /&gt;
&lt;br /&gt;
=====Error Message=====&lt;br /&gt;
&lt;br /&gt;
... to be added when discovered ...&lt;br /&gt;
&lt;br /&gt;
=====Test=====&lt;br /&gt;
&lt;br /&gt;
Test HTTP if accessible by LAN; Test HTTPS is accessible by Internet; Test both if both are available.&lt;br /&gt;
&lt;br /&gt;
On the server type the following into a browser&lt;br /&gt;
&lt;br /&gt;
LAN/HTTP:&lt;br /&gt;
&lt;br /&gt;
 http://localhost/neosys/neosys/dll/upload.dll&lt;br /&gt;
&lt;br /&gt;
WAN/HTTPS:&lt;br /&gt;
&lt;br /&gt;
 https://localhost:9999/neosys/dll/upload.dll&lt;br /&gt;
&lt;br /&gt;
=====Expected Result=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Upload Error. !&lt;br /&gt;
Please call me from a form !!!&lt;br /&gt;
The first param must be Filename= name of the uploaded file, TYPE=TEXT&lt;br /&gt;
The second param must be Filedata= uploaded file, TYPE=FILE&lt;br /&gt;
The third param is optional PathData= path to uploaded file, default c:\temp\, TYPE=HIDDEN&lt;br /&gt;
The forth param is optional RedirectPage= name of asp who receive the results, TYPE=HIDDEN&lt;br /&gt;
Add others params at the end with INPUT tag.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[image:Uerror.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Patching a NEOSYS program==&lt;br /&gt;
&lt;br /&gt;
Patches done to NEOSYS programs are not affected by live to test database copy, since the programs are on installation level and not database level.&lt;br /&gt;
&lt;br /&gt;
The patch provided will tell you the program name and contain either a whole replacement program text or just some changed lines which you will have to find and edit.&lt;br /&gt;
&lt;br /&gt;
For older versions of NEOSYS, you will need to know the file name which may be provided along with the patch or you can find it using the following code in maintenance mode:&lt;br /&gt;
&lt;br /&gt;
 ED VOC programname&lt;br /&gt;
&lt;br /&gt;
ED VOC XYZ tells you what program name is executed and from what file, when you type the command XYZ. Normally the program name is the same as the command.&lt;br /&gt;
&lt;br /&gt;
The file name will normally be BP for agency programs, GBP for general programs or ABP for finance programs.&lt;br /&gt;
&lt;br /&gt;
NEOSYS programs are stored in files just like records of ordinary database files. You can edit either with &amp;quot;ED filename programname&amp;quot; or &amp;quot;TED filename programname&amp;quot;. TED is better for editing source code as it opens the the code in a text editor, whereas ED opens the code in the same maintenance window.&lt;br /&gt;
&lt;br /&gt;
To test patches immediately, Support may have to clear cache by pressing CTRL+F5. Refer to [[Configuring_IIS#IIS_web_page_caching|Web Caching]] for more information.&lt;br /&gt;
&lt;br /&gt;
===Installing patch in live database===&lt;br /&gt;
&lt;br /&gt;
In the rare case that the programmer asks Support to install the patch directly on LIVE dataset, start by typing the following command in maintenance mode before commencing:&lt;br /&gt;
&lt;br /&gt;
 UTIL&lt;br /&gt;
&lt;br /&gt;
Follow the instructions mentioned in the [[Troubleshooting_NEOSYS_Generally#Installing_patch_in_test_database| next section]], but skip the instruction to TEST the patched program in test dataset.&lt;br /&gt;
&lt;br /&gt;
The instruction to INSTALL the patched program MUST be followed BEFORE testing the patch in live dataset. Otherwise the changes will not get reflected.&lt;br /&gt;
&lt;br /&gt;
===Installing patch in test database===&lt;br /&gt;
&lt;br /&gt;
1. EDIT the program source code.&lt;br /&gt;
&lt;br /&gt;
 TED programname&lt;br /&gt;
&lt;br /&gt;
If you have to edit or patch a program that starts with the word DICT. and the remainder of the program name is the same as a real file name e.g DICT.INVOICES, then you cannot omit and must type the actual source file name - in this case, &amp;quot;BP&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
Otherwise, if you just type &amp;quot;ED DICT.INVOICES&amp;quot; hoping to edit the DICT.INVOICES program in the BP file, then you will end up editing the dictionary of INVOICES, which is not what you are trying to do. Use the command below to edit such type of programs:&lt;br /&gt;
&lt;br /&gt;
 ED BP DICT.INVOICES&lt;br /&gt;
&lt;br /&gt;
If you want to patch line 8, i.e. the source code, of an S type dictionary then you can use TED for easier editing.&lt;br /&gt;
&lt;br /&gt;
 TED DICT.filename itemname &lt;br /&gt;
&lt;br /&gt;
Next either cut and paste to modify the whole program or edit the program text according to the patch/instructions provided.&lt;br /&gt;
&lt;br /&gt;
Save and close the program source code.&lt;br /&gt;
&lt;br /&gt;
2. COMPILE it. If you get errors then check your edits are correct and recompile otherwise return the patch to programming.&lt;br /&gt;
&lt;br /&gt;
In newer versions of NEOSYS, versions in and after April 2018, use the below command for compiling.&lt;br /&gt;
&lt;br /&gt;
 CO programname&lt;br /&gt;
&lt;br /&gt;
In older versions of NEOSYS, you will have to include the filename.&lt;br /&gt;
&lt;br /&gt;
 COMPILE filename programname&lt;br /&gt;
&lt;br /&gt;
3. TEST it. Ensure the patched program now works in TEST database.&lt;br /&gt;
&lt;br /&gt;
4. INSTALL the patched program in the LIVE database. &lt;br /&gt;
&lt;br /&gt;
For newer versions of NEOSYS, versions in and after April 2018, use the below command to copy from test to live.  &lt;br /&gt;
&lt;br /&gt;
 COPYBP programname&lt;br /&gt;
&lt;br /&gt;
For older versions of NEOSYS, depending on the filename that you patched, one of the following commands will have to be used.&lt;br /&gt;
&lt;br /&gt;
 COPYGBP programname&lt;br /&gt;
 COPYABP programname&lt;br /&gt;
 COPYBP programname&lt;br /&gt;
&lt;br /&gt;
==Patching NEOSYS dictionaries==&lt;br /&gt;
&lt;br /&gt;
A patch to a dictionary applies immediately when you save it and to all datasets regardless of which dataset you work in.&lt;br /&gt;
&lt;br /&gt;
You need:&lt;br /&gt;
&lt;br /&gt;
#the file name eg INVOICES&lt;br /&gt;
#the item name (column name) eg  DATETIME_AMENDED&lt;br /&gt;
#10 lines of data similar to the example below.&lt;br /&gt;
#if the item is an S type dictionary, then either the whole, or only the amended part, of the source code of the dictionary.&lt;br /&gt;
&lt;br /&gt;
 ED DICT INVOICES DATETIME_AMENDED&lt;br /&gt;
&lt;br /&gt;
TYPE everything below exactly on the corresponding line numbers except lines 3 and very commonly line 8, as these lines may contain multiple values separated by a superscript 2 (²). Line numbers in the below screen are only for illustrative purpose. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  ╔═══════════════════════════┤DATETIME_AMENDED├═════════════════════════╗&lt;br /&gt;
 1║S                                                                     ║&lt;br /&gt;
 2║                                                                      ║&lt;br /&gt;
 3║DateTime²Amended                                                      ║&lt;br /&gt;
 4║S                                                                     ║&lt;br /&gt;
 5║                                                                      ║&lt;br /&gt;
 6║                                                                      ║&lt;br /&gt;
 7║[DATETIME]                                                            ║&lt;br /&gt;
 8║updated=@record&amp;lt;28&amp;gt;²created=@record&amp;lt;31,1&amp;gt;²@ans=&#039;&#039;²if created and num(c║..actually this line continues off the screen to the right&lt;br /&gt;
 9║R                                                                     ║&lt;br /&gt;
10║10                                                                    ║&lt;br /&gt;
11║                                                                      ║&lt;br /&gt;
  :                                                                      :&lt;br /&gt;
  :                                                                      :&lt;br /&gt;
  ╚══════════════════════════════════════════════════════════════════════╝&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Press Ctrl+E on lines 3 or 8 in order to enter sub-lines. &lt;br /&gt;
&lt;br /&gt;
The multiple values (on line 3 and 8) separated by a superscript 2 (²) automatically appear when sub-lines are entered.&lt;br /&gt;
&lt;br /&gt;
For line 8, you will need to cut and paste the lines of below program to the Ctrl+E screen: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
╔═════════════════════════┤Field 8 of DATETIME_AMENDED├════════════════════════╗&lt;br /&gt;
║updated=@record&amp;lt;28&amp;gt;                                                           ║&lt;br /&gt;
║created=@record&amp;lt;31,1&amp;gt;                                                         ║&lt;br /&gt;
║@ans=&#039;&#039;                                                                       ║&lt;br /&gt;
║if created and num(created) and num(updated) then                             ║&lt;br /&gt;
║ createdsecs=field(created,&#039;.&#039;,1)*86400+field(created,&#039;.&#039;,2)                  ║&lt;br /&gt;
║ updatedsecs=field(updated,&#039;.&#039;,1)*86400+field(updated,&#039;.&#039;,2)                  ║&lt;br /&gt;
║ if abs(updatedsecs-createdsecs)&amp;gt;120 then                                     ║&lt;br /&gt;
║  @ans=updated                                                                ║&lt;br /&gt;
║  end                                                                         ║&lt;br /&gt;
║ end                                                                          ║&lt;br /&gt;
║                                                                              ║&lt;br /&gt;
║                                                                              ║&lt;br /&gt;
╚══════════════════════════════════════════════════════════════════════════════╝&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you save and exit the Ctrl+E screen, you will see the sublines separated by superscript 2 appear in one line in the ED screen. &lt;br /&gt;
&lt;br /&gt;
Similarly, for line 3, you need to enter its sub-lines in Ctrl+E screen.&lt;br /&gt;
&lt;br /&gt;
To ensure indenting remains nice (although indenting is not important and can be messed up without causing any problem) then copy the double bars at the front of the lines (if available, otherwise insert some char in position 1 of each line perhaps) and then remove them after you paste ... or just edit until the indenting is correct if you really want to.&lt;br /&gt;
&lt;br /&gt;
Press F9 and/or Esc to save and/or exit from Ctrl+E screen&lt;br /&gt;
&lt;br /&gt;
Press F9 and/or Esc to save and/or exit from ED&lt;br /&gt;
&lt;br /&gt;
==Linux Commands==&lt;br /&gt;
&lt;br /&gt;
This section is aimed teaching support, new to the Linux environment, how to navigate and use the most common useful commands.&lt;br /&gt;
&lt;br /&gt;
Use google or &amp;quot;man &amp;lt;programName&amp;gt;&amp;quot; to get the manual of a program. E.g &amp;quot;man man&amp;quot; gives you the MANual for the Manual program.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;|&amp;quot; use the pipe command to take output of one command and input into another. E.g Cmd: &amp;quot; Echo &amp;quot;ABC&amp;quot; | removeA | removeC &amp;quot;. Output = &amp;quot;B&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Typically commands assume you mean the current directory, if you don&#039;t specify which directory you want the command to perform in/on.&lt;br /&gt;
&lt;br /&gt;
Strings with spaces have to be wrapped in double quotation &amp;quot;May 14 01:30:55&amp;quot; before use as input to most commands.&lt;br /&gt;
&lt;br /&gt;
Follow this convention in wiki to understand the syntax (structure) of the Linux commands and options.&lt;br /&gt;
&lt;br /&gt;
Input wrapped in &amp;quot;&amp;lt;...&amp;gt;&amp;quot; is mandatory.&lt;br /&gt;
&lt;br /&gt;
Input wrapped in &amp;quot;[...]&amp;quot; is optional. &lt;br /&gt;
&lt;br /&gt;
===Searching for strings in one or many files using grep===&lt;br /&gt;
&lt;br /&gt;
Using the GUI with Ctrl + F is laborious and less powerful.&lt;br /&gt;
&lt;br /&gt;
Use grep command in Linux or Cygwin to search files especially when you are doing deep inspection of NEOSYS Logs. &lt;br /&gt;
&lt;br /&gt;
Use the following command to search for a string in any file or directory&lt;br /&gt;
&lt;br /&gt;
 grep &amp;lt;string&amp;gt; [path to file OR filename] [-r]&lt;br /&gt;
&lt;br /&gt;
Where &amp;quot;string&amp;quot; is the text to be searched and &amp;quot;-r&amp;quot; means recursive - check all files in all sub directories.&lt;br /&gt;
&lt;br /&gt;
 grep -i -a string path/file&lt;br /&gt;
&lt;br /&gt;
where &amp;quot;file&amp;quot; is the type of file you are looking for and &amp;quot;path&amp;quot; is the path of the directory you are looking into. Use &amp;quot;&amp;quot; when having spaces in your string.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;-i&amp;quot; means ignore upper/lower case characters in the string and &amp;quot;-a&amp;quot; means treat the file type as text and display the matching text)&lt;br /&gt;
&lt;br /&gt;
e.g when searching in NEOSYS logs the year/month/date is specified in the file name, so if you are looking for a file in year 2016 in the month of Feb, use&lt;br /&gt;
&lt;br /&gt;
 grep XXXX path/1602*&lt;br /&gt;
&lt;br /&gt;
In the above command * (asterisk) is a wildcard &amp;quot;means replace * with any thing&amp;quot; and is used when you don&#039;t know what that part of the command could be. &lt;br /&gt;
&lt;br /&gt;
E.g &amp;quot;*.jpg&amp;quot; means any file names that end with &amp;quot;.jpg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Sample below of grep command and its output where it is searching for &amp;quot;Dior&amp;quot; in 2016 march logs.&lt;br /&gt;
&lt;br /&gt;
 $ grep -i Dior /cygdrive/d/hosts/test/logs/test/2016/1603*&lt;br /&gt;
 Binary file path/16030301.XML matches&lt;br /&gt;
&lt;br /&gt;
Using * (asterisk), a string can also be searched globally across all installations on the server.&lt;br /&gt;
&lt;br /&gt;
Below example will search all files whose file names begin with &amp;quot;NEOS00&amp;quot;, in all client installation folders inside the &amp;quot;hosts&amp;quot; folder, for log entries containing text &amp;quot;5th June 2016&amp;quot;.&lt;br /&gt;
 $ grep -a &amp;quot;2016 JUN 05&amp;quot; /cygdrive/d/hosts/*/logs/NEOS00*|less&lt;br /&gt;
&lt;br /&gt;
Use the commands below to display the search string and required number of lines that come either after or before the search string, depending on what you enter in your command. It helps to get more information from files especially when you only know few words and the other information around the searched string also gets displayed. &lt;br /&gt;
&lt;br /&gt;
 grep -A&amp;lt;NUM&amp;gt; string file&lt;br /&gt;
&lt;br /&gt;
Above command will display the line where the searched string was found, and also display NUM lines after the searched text&lt;br /&gt;
&lt;br /&gt;
 grep -B&amp;lt;NUM&amp;gt; string file&lt;br /&gt;
&lt;br /&gt;
Above command will display the line where the searched string was found, and also display NUM lines before the searched text&lt;br /&gt;
&lt;br /&gt;
See the examples and their respective outputs below:&lt;br /&gt;
&lt;br /&gt;
 $ grep -A2 -i &amp;quot;Dior&amp;quot; 1603*&lt;br /&gt;
 Binary file 16032101.XML matches&lt;br /&gt;
 Binary file 16032901.XML matches&lt;br /&gt;
&lt;br /&gt;
 $ grep -A2 -a &amp;quot;Dior&amp;quot; 1603*&lt;br /&gt;
 16030301.XML:&amp;lt;DataOut&amp;gt;DIOR%FEPOI%FE&#039;&#039;&#039;Dior&#039;&#039;&#039; Poison%FE%FE%FE%FE%FEDubai,    UAE%FE%FE%FE%FEN%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FEN%FE%FE%FE17584.43592%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE1%FE%FE%FE%FE%FE%FE%FE%FE%FENEOSYS%FE17584.43592%FE94_200_49_146%FE1%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FEpaulson&amp;lt;/DataOut&amp;gt;&amp;lt;/Message&amp;gt;&lt;br /&gt;
 --&lt;br /&gt;
 16030301.XML:&amp;lt;DataOut&amp;gt;DIOR%FEPOI%FE&#039;&#039;&#039;Dior&#039;&#039;&#039; Poison%FE%FE%FE%FE%FEDubai,   UAE%FE%FE%FE%FEN%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FEN%FE%FE%FE17584.43592%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE1%FE%FE%FE%FE%FE%FE%FE%FE%FENEOSYS%FE17584.43592%FE94_200_49_146%FE1%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FEpaulson&amp;lt;/DataOut&amp;gt;&amp;lt;/Message&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some more examples of grep below:&lt;br /&gt;
&lt;br /&gt;
Use the command below when searching for more than one string&amp;lt;br&amp;gt;&lt;br /&gt;
 grep -a string1 *|grep string2&lt;br /&gt;
&lt;br /&gt;
Use the below command to omit the lines containing specific strings in your search:&lt;br /&gt;
 grep -B2 -a Processing 160329*|grep -v DataIn|grep -v Message|less&amp;lt;br&amp;gt;&lt;br /&gt;
Above command will display lines containing string &amp;quot;Processing&amp;quot; and exclude lines containing string &amp;quot;DataIn&amp;quot; and &amp;quot;Message&amp;quot;, |&amp;quot;less&amp;quot; displays the output in a new screen.&lt;br /&gt;
&lt;br /&gt;
Use &amp;quot;zgrep&amp;quot; command to search in zip files:&lt;br /&gt;
 zgrep string1 /path |zgrep string2 |less&lt;br /&gt;
&lt;br /&gt;
===FIND===&lt;br /&gt;
&lt;br /&gt;
Use this find command to list all files/directories modified after a certain date.&lt;br /&gt;
&lt;br /&gt;
 find [path, if omitted means = current directory] [-type f,d] [-newermt &#039;MM/DD/YYYY HH:MM:SS&#039;]&lt;br /&gt;
&lt;br /&gt;
Or use a filename instead of date:&lt;br /&gt;
 &lt;br /&gt;
 find  -newer filename&lt;br /&gt;
&lt;br /&gt;
==Managing the queue of reports being delivered by email==&lt;br /&gt;
&lt;br /&gt;
In maintenance mode.&lt;br /&gt;
&lt;br /&gt;
===Listing===&lt;br /&gt;
&lt;br /&gt;
 LIST DOCUMENTS WITH SCHEDULED_ONCE&lt;br /&gt;
&lt;br /&gt;
===Clearing===&lt;br /&gt;
&lt;br /&gt;
 SELECT DOCUMENTS WITH SCHEDULED_ONCE&lt;br /&gt;
 DELETE DOCUMENTS&lt;br /&gt;
&lt;br /&gt;
==Reduce used disk space on NEOSYS or client hosted servers==&lt;br /&gt;
Non essential files getting accumulated over time can take up a lot of space on the hard disk resulting in low free space on the server. NEOSYS Client Monitoring system alerts about low free space for win3 server as it monitors the Disk Space of both C &amp;amp; D drive. To fix it Support team will have to create free space on the server.&lt;br /&gt;
&lt;br /&gt;
Making space on the server is time taking and requires patience as you need to go through all the files/folders looking for non-essential files. Do not make any assumptions for not looking into a folder.&lt;br /&gt;
&lt;br /&gt;
Non-essential files are the ones without which we can work properly and will continue to work in future.&lt;br /&gt;
&lt;br /&gt;
Support team should keep in mind the below points while creating space on the server:&lt;br /&gt;
&lt;br /&gt;
#Look into the drive for which nagios is alerting and dig into all the folders.&lt;br /&gt;
#Right click Folder &amp;gt; Properties &amp;gt; Size on Disk, to find out the size of a folder.&lt;br /&gt;
#On d drive majority of the space is taken by d:\hosts and d:\data.bak folder and on c drive it&#039;s taken up by the important windows/cygwin folders.&lt;br /&gt;
#The space distribution will give you an idea about which folders to target that can free up a good amount of space on clean up.&lt;br /&gt;
#Following are the non essential files/folders which can create a lot of space on removal. Use your intelligence and presence of mind while deleting files/folders because once deleted the information is lost forever.&lt;br /&gt;
#*Folder: d\data.bak. Check for stopped clients&#039; backups and delete if present.&lt;br /&gt;
#*Folder: d\hosts\clientname\logs (where clientname stands for all the client folders in hosts) Look into logs prior to the current year and the year before and delete them. In the recent versions of NEOSYS, log folders are compressed and take up a lot less space on disk than presented as their size. You can see the difference in their properties.&lt;br /&gt;
#*Folder: d\hosts\clientname\downloads. This folder might contain lot of old versions of neosys.exe files. Keep the two latest versions and delete the rest. Do this for all client folders except test installation because Support maintains all the old versions of neosys.exe in it.&lt;br /&gt;
#*Folder: d\hosts\old. In this folder, delete all client folders that are older than 1 year.&lt;br /&gt;
#*Apart from above folders look for random backup.zip files present in c/d drive. This happens when Support restores data from a zip file and forgets to delete it after the restore.&lt;br /&gt;
&lt;br /&gt;
To quickly get an idea of which directories consume the largest space, SSH onto server and use the &amp;quot;du&amp;quot; command along with various options, combined with command &amp;quot;sort&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;du&amp;quot; Disk Usage is used to estimate file space usage under a particular directory. Look up &amp;quot;sort&amp;quot; and &amp;quot;head&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Use this to find the estimate disk usage of each sub directory of every log directory in /hosts and then sort -n umerically and -r everse sort from high to low:&lt;br /&gt;
&lt;br /&gt;
 du /*/LOGS/*/20* --time  | sort -n -r&lt;br /&gt;
&lt;br /&gt;
Go to /hosts or D:/NEOSYS folder. Use command to get the estimate disk usage for all sub directories excluding directories where you know for certain files cannot be deleted.&lt;br /&gt;
(sort the directories by highest to lowest estimated disk usage in kb and then shows the top 20)&lt;br /&gt;
&lt;br /&gt;
 du --exclude={*/NEOSYS,*/neosys.net,*path/to/another/dir/that/cannot/be/deleted} --time | sort -r -n | head -n 20&lt;br /&gt;
&lt;br /&gt;
===Reduce used disk space on backup servers===&lt;br /&gt;
&lt;br /&gt;
If a server is scheduled to daily delete backup files older than 30 days, then there may be random files that are left behind for longer than 30 days, which are:&lt;br /&gt;
&lt;br /&gt;
*any xx/xx/31 files on months than are followed by months with only 30 days, since the backup procedure deletes the previous month&#039;s file on the same day and day 31 does not exist in all months and&lt;br /&gt;
*any &amp;quot;same day last month&amp;quot; files that were not deleted by the backup procedure because it did not run or did not complete.&lt;br /&gt;
&lt;br /&gt;
Use &amp;quot;crontab -l&amp;quot; to list all scheduled tasks, to find the how old a file must be before it is deleted.&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting Scripting Disabled error message on browser==&lt;br /&gt;
 Error: NEOSYS requires             You have&lt;br /&gt;
       1. Internet Explorer 6+&lt;br /&gt;
         or Safari 3.1+&lt;br /&gt;
         or Firefox 3+&lt;br /&gt;
         or Chrome 8.0+&lt;br /&gt;
       2. Scripting enabled       Scripting disabled&lt;br /&gt;
       3. Cookies enabled         Unknown&lt;br /&gt;
&lt;br /&gt;
[[image:IEtrb1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Follow steps in given link to fix Script disable error on browsers : https://wmich.edu/helpdesk/internetenablecookies&lt;br /&gt;
&lt;br /&gt;
==[[Configuring_IIS#Solving_.22Service_unavailable.22_error_due_to_disabled_application_pool | Handling &#039;Service Unavailable&#039; on browser due to IIS issue]]==&lt;br /&gt;
&lt;br /&gt;
==Searching for users with a particular email address==&lt;br /&gt;
&lt;br /&gt;
In maintenance mode &lt;br /&gt;
 &lt;br /&gt;
 FIND USERS XX@YY.COM&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Troubleshooting_NEOSYS_Generally&amp;diff=3677</id>
		<title>Troubleshooting NEOSYS Generally</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Troubleshooting_NEOSYS_Generally&amp;diff=3677"/>
		<updated>2020-01-17T23:29:14Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* How to find the physical disk space occupied by logical files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Solving failure to start a NEOSYS server due to disk failure message==&lt;br /&gt;
===Problem===&lt;br /&gt;
During a reboot process (which maybe due to a Windows update or even done by a support personnel) the NEOSYS server gets hung on the startup and shows a message &amp;quot;Boot Failure - Abort, Retry&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
===Temporary solution===&lt;br /&gt;
This typically happens due to the USB being plugged into the server and the boot sequence being wrong - i.e. the server trying to boot from the USB first and fails. The immediate solution would be to unplug the USB and ask the client to reboot the server again and upon successfully rebooting the system, plug the USB back again.&lt;br /&gt;
&lt;br /&gt;
===Permanent solution===&lt;br /&gt;
The above problem will occur every time the computer is rebooted, so you need to immediately talk to the IT Administrator of the client and ask them to rectify the boot sequence to make it boot first from the CD ROM, then the HDD and last the USB.&lt;br /&gt;
&amp;lt;BR&amp;gt;Allowing &amp;quot;Boot from USB&amp;quot; causes a severe risk of infection by boot sector viruses since the first infected USB device inserted WILL infect the server immediately as anti-virus programs are not active during boot.&lt;br /&gt;
&lt;br /&gt;
==Replicate options used &amp;amp; error using sysmsg Data:==&lt;br /&gt;
&lt;br /&gt;
NEOSYS users will send screenshots with the error message which often blocks options used, slowing down the ability to replicate the problem.&lt;br /&gt;
&lt;br /&gt;
NEOSYS when a user faces a system error, NEOSYS sends a email with the error information, including texted that cann be used to recreate the optioned used at the time.&lt;br /&gt;
Thus avoiding the need to ask the user to send another screenshot without the error message. &lt;br /&gt;
&lt;br /&gt;
Find the form data in the raw text of the emailed error message. &lt;br /&gt;
&lt;br /&gt;
[[image:Rawformdatapng.png]]&lt;br /&gt;
&lt;br /&gt;
Sadly normal email view renders it useless by mangling it, treating ^ as formatting character superscript.&lt;br /&gt;
&lt;br /&gt;
The form raw data will be something like this:&lt;br /&gt;
&lt;br /&gt;
 1^^^1^3^3^^^^^^^^^^^^^^^3^^^^^^^^^18319^18319^^^^^^^^^4^^0^^^^^^^^^^^^^1}2&lt;br /&gt;
&lt;br /&gt;
First prepare a command by inserting the above form data into the following command in place of %FORMDATA%. Do it anywhere you can cut and paste text.&lt;br /&gt;
&lt;br /&gt;
 form_setdefault(&#039;%FORMDATA%&#039;)&lt;br /&gt;
&lt;br /&gt;
or in old versions of NEOSYS&lt;br /&gt;
&lt;br /&gt;
 gro.defaultrevstr=unescape(&#039;%FORMDATA%&#039;.neosysconvert(&#039;`^]}\~&#039;,rm+fm+vm+sm+tm+stm))&lt;br /&gt;
&lt;br /&gt;
Achieving the following command:&lt;br /&gt;
&lt;br /&gt;
 form_setdefault(&#039;1^^^1^3^3^^^^^^^^^^^^^^^3^^^^^^^^^18319^18319^^^^^^^^^4^^0^^^^^^^^^^^^^1}2&#039;)&lt;br /&gt;
&lt;br /&gt;
or in old versions of NEOSYS&lt;br /&gt;
&lt;br /&gt;
 gro.defaultrevstr=unescape(&#039;1^^^1^3^3^^^^^^^^^^^^^^^3^^^^^^^^^18319^18319^^^^^^^^^4^^0^^^^^^^^^^^^^1}2&#039;.neosysconvert(&#039;`^]}\~&#039;,rm+fm+vm+sm+tm+stm))&lt;br /&gt;
&lt;br /&gt;
Once you have constructed the command, do the following:&lt;br /&gt;
&lt;br /&gt;
#As NEOSYS user, get onto the exact same screen as the user was in when they got the message. (Using the screenshot they send)&lt;br /&gt;
#Press Ctrl+Shift+F12 - to get a NEOSYS javascript prompt&lt;br /&gt;
#Paste the command and Press Enter - to execute the command - it must confirm with &amp;quot;setdefaultform( ... ) = ok&amp;quot;&lt;br /&gt;
#Press Enter or click OK - to remove the confirmation&lt;br /&gt;
#Press Esc or click Cancel - to close the javascript prompt&lt;br /&gt;
#Press F8 or click Close - to refresh the form&lt;br /&gt;
#The form should now be filled in correctly including any hidden fields.&lt;br /&gt;
&lt;br /&gt;
==[[Administering_NEOSYS_Server#Clearing_File_Locks| Troubleshooting &amp;quot;Document is being updated&amp;quot; message]]==&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting the &amp;quot;Database not available&amp;quot; error message== &lt;br /&gt;
===Problem explained===&lt;br /&gt;
This error appears when you try to login to NEOSYS after you enter your username and password and click the Login button.&lt;br /&gt;
&lt;br /&gt;
[[image:database_unavailable.jpg]]&lt;br /&gt;
&lt;br /&gt;
Error message : &lt;br /&gt;
&lt;br /&gt;
 Cannot login because : &lt;br /&gt;
 Error :  The (database code) database is not available right now.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the error message appears post login i.e. when users are working on the system then check if processes are free to run user request.&lt;br /&gt;
&lt;br /&gt;
[[image:not_available.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Solution explained===&lt;br /&gt;
&lt;br /&gt;
#Determine if the processes are running. If they are running and you still get the same message that means that either the processes have [[Troubleshooting_NEOSYS_Generally#Troubleshooting_Hung_processes|hung]] and need to be [[Troubleshooting_NEOSYS_Generally#How_to_kill_hung_NEOSYS_processes|killed]].&lt;br /&gt;
#If the processes are not visible on the desktop, it is possible that they are running in the background and have hung for some reason. Check the windows task manager to see if any ‘ntvdm’ process is running and [[Troubleshooting_NEOSYS_Generally#If_NEOSYS_processes_are_not_visible_on_the_server_desktop|fix hung processes]].&lt;br /&gt;
#If not hung then the available processes may be busy running long reports and a new process needs to be started. Refer to [[Handling_Nagios_Client_Monitoring_System#Counting_current_active_users| counting current active users]] to get a sense of the processing requirements for an installation.&lt;br /&gt;
#If there are processes available which are not hung or busy running reports, then ensure that the URL is pointing to the correct IP address and not to a wrong one e.g. a backup server.&lt;br /&gt;
#If the process had not hung and no processes running, then the server might have restarted due to a power failure or a windows update and the administrator user had not logged in post the scheduled startup time of 6AM. To determine the cause of this, investigate in the Windows Event Viewer Log file.&lt;br /&gt;
#You can now start up the process by clicking on the respective desktop icons.&lt;br /&gt;
#Also check if the nightly backup took place successfully or not.&lt;br /&gt;
#Look into the logs at the date/time stated for the last transaction processed to investigate why process got hung. See [[Troubleshooting_NEOSYS_Generally#Inspecting_Database_LOGS_Folder| Inspecting logs]] for more information on logs.&lt;br /&gt;
&lt;br /&gt;
==Fixing missing ADAGENCY.VOL==&lt;br /&gt;
&lt;br /&gt;
The file contains database info required on Login Page and the directory paths of the NEOSYS programs and DATA required for maintenance mode.&lt;br /&gt;
&lt;br /&gt;
===Problem===&lt;br /&gt;
&lt;br /&gt;
When accessing NEOSYS Login Page: &amp;quot;Error: Cannot read D:\NEOSYS\NEOSYS\ADAGENCY.VOL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This error will occur when the ADAGENCY.VOL file has been deleted (has previously happened after failed backup and after upgrading NEOSYS) or the file has become corrupt after a bad disk block was &amp;quot;fixed&amp;quot; by windows CHKDISK.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
&lt;br /&gt;
Manually recreate the file and its text contents (or if installation is on win3 use the nl13 snapshots).&lt;br /&gt;
&lt;br /&gt;
In example below, only make changes to first line: (Maintenance mode login at dataset selection will display info)&lt;br /&gt;
&lt;br /&gt;
 Syntax: ZXC &amp;lt;DATASET NAME, DATASET CODE,,LAST BACKUP DATE&amp;gt;*..&amp;gt; (Separate each database&#039;s details with &#039;*&#039;)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ZXC TEST,TEST,,25 MAR 2019*XDEVTEST,XDEVTEST,,17 SEP 2018&lt;br /&gt;
.\ACCOUNTS&lt;br /&gt;
.\GENERAL&lt;br /&gt;
.\ADAGENCY&lt;br /&gt;
..\DATA\ZXC\GENERAL&lt;br /&gt;
..\DATA\ZXC\ACCOUNTS&lt;br /&gt;
..\DATA\ZXC\ADAGENCY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting &amp;quot;user not authorised to login from a location&amp;quot; error message==&lt;br /&gt;
[[image:IPerror.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Error message:&#039;&#039;&#039;&lt;br /&gt;
 xxx is not authorised to login form the location (IP Number. xx.xx.xx.xx)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution Explained:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Check the URL used and follow the steps below to check if it is correct and email the user accordingly.&lt;br /&gt;
&lt;br /&gt;
#If the Client installation is hosted on NEOSYS server then users can use only https link to access NEOSYS.&lt;br /&gt;
#*Check with the client&#039;s management if this particular IP is their public IP.&lt;br /&gt;
#*Add IP on management confirmation (Refer to [[Procedures#Handling_User_Requests_to_add_an_IP_or_range_of_IPs_to_access_NEOSYS|Handling User Requests to add IP/IPs]] )&lt;br /&gt;
#In case of Client hosted server, users should access NEOSYS via LAN using the http link.&lt;br /&gt;
#*There can be exceptional cases where user needs to access NEOSYS outside the office Network e.g a client installation with two companies at different locations and NEOSYS installed at one. In this case Support will have to add the IP number of the second company so that users can access NEOSYS.&amp;lt;br&amp;gt;But before you even suggest to add the IP, get the request from their management saying that the IP number is another office location and needs to be added. (Refer to [[Procedures#Handling_User_Requests_to_add_an_IP_or_range_of_IPs_to_access_NEOSYS|Handling User Requests to add IP/IPs]] )&lt;br /&gt;
&lt;br /&gt;
==Handling damaged files==&lt;br /&gt;
&lt;br /&gt;
[[Handling damaged files]]&lt;br /&gt;
&lt;br /&gt;
===Checking for corrupt database files===&lt;br /&gt;
Login to NEOSYS Maintenance. This can be done when users are online.&lt;br /&gt;
&lt;br /&gt;
Press F5&lt;br /&gt;
&lt;br /&gt;
 CHK.FILES&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 CHK.FILES filename&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Sizelock while performing chk.files &#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Fixing sizelock errors should not be done while other users are online to the same database.&lt;br /&gt;
&lt;br /&gt;
Sizelock errors are not critical and will be fixed automatically during the nightly backup.&lt;br /&gt;
&lt;br /&gt;
Sizelock errors occur if a program or process that is selecting records from a file is aborted in some abnormal way.&lt;br /&gt;
&lt;br /&gt;
Error message:&lt;br /&gt;
&lt;br /&gt;
 These Files/Tables have a Sizelock Value of 2 or greater. &lt;br /&gt;
 Tag/Select the Files/Tables to be Fixed.&lt;br /&gt;
 Press F9 to fix selected files&lt;br /&gt;
&lt;br /&gt;
Press F9 to proceed with fixing the selected files or press ESC to continue with chk.files without fixing sizelock as it gets automatically fixed during the nightly backup. &lt;br /&gt;
&lt;br /&gt;
Refer to the [http://techwiki.neosys.com/index.php/Backup_and_Restore#Error_Message:_Size_Lock Sizelock errors in backup emails] for more information.&lt;br /&gt;
&lt;br /&gt;
[[file:sizelock.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Determining Database File Name from Operating System File Name===&lt;br /&gt;
&lt;br /&gt;
To assess the potential damage and possible remedial measures you need to know the database file name. If the message only refers to the operating system file name you need to follow this procedure to determine the database file name.&lt;br /&gt;
&lt;br /&gt;
Once you have the database file name you can use CHK.FILES XXXXXXX to check if corrupt or not and various other procedures to fix the corruption.&lt;br /&gt;
&lt;br /&gt;
Remember that fixing the corrupt data does not solve the overall problem. The *cause* of the corruption must be identified and eliminated otherwise the problem may reoccur and in a more serious form perhaps with unrecoverable loss of data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
╒═══════════════════════════════════TCL - 2══════════════════════════════════╕&lt;br /&gt;
│                                                                            │&lt;br /&gt;
│ :list FILES WITH ALL CONTAINING &#039;REV76481&#039;                                 │&lt;br /&gt;
│                                                                            │&lt;br /&gt;
╘════════════════════════════════════════════════════════════════════════════╛&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:DBfilenamefromOSfilename.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Finding out when and by whom a record was deleted==&lt;br /&gt;
&lt;br /&gt;
In most cases, NEOSYS does not allow users to delete records and instead keeps a record of everything. In some cases however, things are deleted and the only way to get full details about the deletion is to search the logs. This is cumbersome, but there is a quick way to find out when, and by whom, a record was deleted. Prior to NEOSYS software versions dated Mar 2014, and deletions done before the same date, this procedure will only tell you when the record was deleted - but not who deleted it. Knowing exactly when it was deleted will nevertheless help you to search the logs for full details.&lt;br /&gt;
&lt;br /&gt;
In maintenance mode F5&lt;br /&gt;
&lt;br /&gt;
 ED SHADOW DELETED*filename*key&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
 ED SHADOW DELETED*BATCHES*L*JOU*2*U&lt;br /&gt;
&lt;br /&gt;
Journals are stored in the BATCHES file. The key of an unposted batch is x*y*999*U where x is the company code, y is the journal type code, 999 is UNPOSTED batch number and U is just U to indicate unposted batches. Note that unposted batches are normally deleted at the time they are posted - ie converted to posted batches.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
╔══════════════════════════┤DELETED*BATCHES*L*JOU*2*U├═════════════════════════╗&lt;br /&gt;
║16831.60706                                                                   ║&lt;br /&gt;
║BRUCEL                                                                        ║&lt;br /&gt;
║╒═══════════════════════════════════TCL - 6══════════════════════════════════╕║&lt;br /&gt;
║│                                                                            │║&lt;br /&gt;
║│ :EVAL PRINT 16831.60706 &#039;[DATETIME]&#039;                                       │║&lt;br /&gt;
║│                                                                            │║&lt;br /&gt;
║╘════════════════════════════════════════════════════════════════════════════╛║&lt;br /&gt;
║                                                                              ║&lt;br /&gt;
║                                                                              ║&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you see the number (in this case 16831.60706) you can convert it to a time and date by typing something like&lt;br /&gt;
&lt;br /&gt;
 PRINT 16831.60706 &#039;[DATETIME]&#039;&lt;br /&gt;
&lt;br /&gt;
Using this date and time you can search the logs more effectively to find out who did the deletion and in what circumstances.&lt;br /&gt;
&lt;br /&gt;
==How to find the physical disk space occupied by logical files==&lt;br /&gt;
Running the following command in NEOSYS maintenance mode will identify disk space used per file, largest files first.&lt;br /&gt;
 LIST FILES BY-DSND SIZE&lt;br /&gt;
or on old versions of NEOSYS&lt;br /&gt;
 LIST FILES BY-DSND SIZE ACCOUNT SIZE FILE.HANDLE&lt;br /&gt;
 &lt;br /&gt;
This will include all files not just those in the actual dataset in DATA\* folders.&lt;br /&gt;
&lt;br /&gt;
The file handle column shows the name of an .LK file however every .LK file has its .OV (overflow file) which is often larger than the .LK file.&lt;br /&gt;
&lt;br /&gt;
[[File:Physical file sizes.png]]&lt;br /&gt;
&lt;br /&gt;
==Fixing slow speed==&lt;br /&gt;
===[[Benchmarking NEOSYS]]===&lt;br /&gt;
===Investigating slow response in NEOSYS using NEOSYS logs===&lt;br /&gt;
If users complain about slow speed, but the server CPU performance looks normal, then support MUST investigate NEOSYS logs to find out why NEOSYS was slow at the time when the client complained about slow response.&lt;br /&gt;
&lt;br /&gt;
Search NEOSYS log entries around the time that the user complained about slow response and look for log entries with high response time. Make a note of what requests took long to respond. If multiple users were simultaneously requesting long reports from NEOSYS, then NEOSYS can be expected to respond slowly for other smaller requests that were processed at that time.&lt;br /&gt;
&lt;br /&gt;
Also refer to [http://userwiki.neosys.com/index.php/General_FAQ#Why_is_NEOSYS_taking_a_long_time_to_generate_a_report.3F why is NEOSYS taking a long time to generate a report].&lt;br /&gt;
&lt;br /&gt;
===Investigating CPU 100% using Windows Task Manager===&lt;br /&gt;
Email, to support, a screen-shot of task manager APPLICATIONS, PROCESSES and PERFORMANCE screens MAXIMIZED TO SHOW AS MUCH AS POSSIBLE. &lt;br /&gt;
&lt;br /&gt;
(Sort the processes to show ntvdm, waiting.exe and high cpu% processes clearly)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Steps:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Right Click on Windows Taskbar and click on Start Task Manager &amp;lt;br&amp;gt; [[image:starttaskmanager.jpg]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
#Click on Processes and then click on CPU &amp;lt;br&amp;gt;&#039;&#039;&#039;Note - The HIGH cpu% processes which should usually be the &amp;quot;process&amp;quot; called &amp;quot;System Idle Process&amp;quot; &#039;&#039;&#039;&amp;lt;br&amp;gt;[[image:cpu100percent1.jpg]] &amp;lt;br&amp;gt;&lt;br /&gt;
#Click on the Performance Tab &amp;lt;br&amp;gt; &#039;&#039;&#039;Note - PF Usage should typically be much less than Physical Memory otherwise there is insufficient real memory in the server to handle the load&#039;&#039;&#039; &amp;lt;br&amp;gt; [[image:cpu100percent3.jpg]] &amp;lt;br&amp;gt;&lt;br /&gt;
#Click on Application Tab then Right Click on a NEOSYS Process and Click on Bring to Front &amp;lt;br&amp;gt;&#039;&#039;&#039;See what the NEOSYS Process is doing &amp;lt;br&amp;gt; [[image:cpu100percent2.jpg]] &amp;lt;br&amp;gt; &#039;&#039;&#039;&lt;br /&gt;
#Right Click on a NEOSYS Process and Click on Go to Processes &amp;lt;br&amp;gt;&#039;&#039;&#039;Note the cpu% ntvdm process &amp;lt;br&amp;gt;[[image:cpu100percent2_2.jpg]]&amp;lt;br&amp;gt;  &#039;&#039;&#039;&lt;br /&gt;
#Normally NEOSYS application screens say &amp;quot;LISTENING&amp;quot; in the bottom line and those applications should have very low cpu%&amp;lt;br&amp;gt;[[image:normalneosysprocess.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
#Look at the difference between the screen of running NEOSYS processes (applications actually) which are idle (listening for requests) and active (processing a request from a user)&lt;br /&gt;
#Note the number of cpus or cpu threads in the server from the performance screen graphics&amp;lt;br&amp;gt;[[image:performance-taskmgr-cputhread.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
#Take screen-shots of any and ALL hung or long running processes (NEOSYS application screens) and email them to support. Even small details on the screens and user names, the user names may give clues to what problem caused the hanging.A Typical Hung NEOSYS process will look like this: &amp;lt;br&amp;gt; [[image:hungneosysprocess.jpg]] &amp;lt;br&amp;gt;&lt;br /&gt;
#Once all hung/long processes are closed then CPU should be low and not near 100%. If it is still 100% then check all high cpu% processes and send a screen-shot of processes sorted to show the high cpu% process names to support.&lt;br /&gt;
&lt;br /&gt;
===Solving server CPU% is 100 and all users are extremely slow/stopped===&lt;br /&gt;
&lt;br /&gt;
Get the screenshots of Task Manager and ALL processes on the server, the objective is to assess the true issue. No need to get the screens not in use obviously but you can send a parallel screen shot for them if you want to be pedantic or even a comment will do.&lt;br /&gt;
&lt;br /&gt;
====Too few CPUs/threads for the number of users====&lt;br /&gt;
In Windows task manager normally, you should see one ntvdm.exe and one waiting.exe process per NEOSYS process (application). A standard installation has three NEOSYS processes per main database and plus one per test database. This is configured in Support Menu, Configuration File.&lt;br /&gt;
&lt;br /&gt;
If there are MORE ntvdm processes than you expect from the configuration file, then perhaps NEOSYS is auto starting new NEOSYS processes to try and cater for a high number of concurrent users.&lt;br /&gt;
&lt;br /&gt;
If the number of concurrent NEOSYS processes significantly exceeds the number of cpus/hyperthreads available in the server then processing for everybody can become so slow for everybody and almost no work gets done.&lt;br /&gt;
&lt;br /&gt;
====Solution====&lt;br /&gt;
Stop NEOSYS creating new NEOSYS processes automatically. Create a text file with the first and only line as AUTOSTART=NO in the neosys\neosys folder something like this.&lt;br /&gt;
&lt;br /&gt;
notepad d:\neosys\neosys\NET.CFG&lt;br /&gt;
&lt;br /&gt;
AUTOSTART=NO&lt;br /&gt;
&lt;br /&gt;
==How do I troubleshoot email not received?==&lt;br /&gt;
&lt;br /&gt;
[[Troubleshooting email not received]]&lt;br /&gt;
&lt;br /&gt;
==Fixing permissions errors while logging in==&lt;br /&gt;
 &lt;br /&gt;
===Problem===&lt;br /&gt;
 &lt;br /&gt;
While logging in, you get the following error message:&lt;br /&gt;
[[Image:login_error_message.jpg]]&lt;br /&gt;
 &lt;br /&gt;
===Solution===&lt;br /&gt;
 &lt;br /&gt;
Add the internet guest account to the security list of the data folder with the default permission of list/read/write&lt;br /&gt;
 &lt;br /&gt;
Make sure the read&amp;amp;execute permission is removed&lt;br /&gt;
[[Image:permissions_on_data.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Fixing the &#039;HTTP Error 500.0 - Internal Server Error&#039; while logging in on IE on a Windows Vista system==&lt;br /&gt;
&lt;br /&gt;
===Problem===&lt;br /&gt;
After configuring IIS on Windows Vista you will get this error message while trying to login into NEOSYS from Internet Explorer:&lt;br /&gt;
&lt;br /&gt;
 HTTP Error 500.0 - Internal Server Error&lt;br /&gt;
 Description: This application is running in an application pool that uses the Integrated .NET  &lt;br /&gt;
 mode. This is the preferred mode for running ASP.NET applications on the current and future &lt;br /&gt;
 version of IIS.&lt;br /&gt;
 &lt;br /&gt;
 In this mode, the application using client impersonation configured with &amp;lt;identity &lt;br /&gt;
 impersonate=&amp;quot;true&amp;quot; /&amp;gt; may not behave correctly. Client impersonation is not available in early &lt;br /&gt;
 ASP.NET request processing stages and may lead modules in those stages to execute with process &lt;br /&gt;
 identity instead.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
&lt;br /&gt;
You can move the application to an application pool that uses the Classic .NET mode by using the following from a command line window (the window must be running as Administrator) &lt;br /&gt;
&lt;br /&gt;
 %systemroot%\system32\inetsrv\APPCMD.EXE set app &amp;quot;Default Web Site/neosys&amp;quot; /applicationPool:&amp;quot;Classic .NET AppPool&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use any other application pool on your system that is running in the Classic .NET mode. You can also use the IIS Administration tool to move this application to another application pool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Fixing the &#039;Class Not Registered&#039; error message while logging in==&lt;br /&gt;
&lt;br /&gt;
===Problem===&lt;br /&gt;
While logging into NEOSYS, you will get a popup window giving an error message saying &#039;Class Not Registered - Server Error&#039;. Typically, you will encounter this error with XP Pro IIS 5.1. As usual, there&#039;s way to solve it, however the root cause of this is still unknown.&lt;br /&gt;
&lt;br /&gt;
Anyway, you will get the proper message in the event log:&lt;br /&gt;
&lt;br /&gt;
 Event Type: Warning&lt;br /&gt;
 Event Source: W3SVC&lt;br /&gt;
 Event Category: None&lt;br /&gt;
 Event ID: 36&lt;br /&gt;
 Description: The server failed to load application &#039;/LM/W3SVC/1/ROOT/NEOSYS.&lt;br /&gt;
 The error was &#039;Class not registered&#039;. &lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
So, what do you do ? This problem is related to Component Services, and when you open Component Services MMC, you will most probably  get  Error Code 8004E00F COM + was unable to talk to Microsoft Distributed Transaction Coordinator. So, fix the COM+ services first by using the following KB from Microsoft (PRB: Cannot Expand &amp;quot;My Computer&amp;quot; in Component Services MMC Snap-In http://support.microsoft.com/?id=301919):&lt;br /&gt;
&lt;br /&gt;
To resolve this problem, reinstall Component Services as follows: WARNING: &lt;br /&gt;
&lt;br /&gt;
#Open registry editor, locate HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\COM3, and then delete this key.&lt;br /&gt;
#From the Start menu, point to Settings, click Control Panel, and then click Add/Remove Programs.&lt;br /&gt;
#Click Add/Remove Windows Components.&lt;br /&gt;
#Proceed through the wizard, and accept all of the defaults (including IIS)&lt;br /&gt;
#Restart the computer.&lt;br /&gt;
&lt;br /&gt;
If the above didn&#039;t solve it, and you still receive the &#039;Class not registered&#039; error message, then you need to recreate the IIS packages in COM+, try&lt;br /&gt;
&lt;br /&gt;
#Delete IIS related package in Component Services MMC&lt;br /&gt;
#IIS In-Process Applications&lt;br /&gt;
#IIS Out-of-Process Pooled Applications&lt;br /&gt;
#IIS Utilities&lt;br /&gt;
&lt;br /&gt;
Next, if you still get the message, try following before re-install IIS if you can&#039;t find Distributed Transaction Coordinator in your Services console.&lt;br /&gt;
&lt;br /&gt;
Launch command prompt and run the following command.&lt;br /&gt;
&lt;br /&gt;
#msdtc -install&lt;br /&gt;
#net start msdtc&lt;br /&gt;
&lt;br /&gt;
Then try re-install IIS.&lt;br /&gt;
&lt;br /&gt;
This should solve the problem&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enabling File Security option on Win XP Professional==&lt;br /&gt;
&lt;br /&gt;
===Problem===&lt;br /&gt;
&lt;br /&gt;
In the Properties of any folders, the Security option does not show, hence you cannot modify the Read, Write options.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
&lt;br /&gt;
The solution would be to untick the &#039;Simple File Sharing&#039; option from  Tools &amp;gt; Folder Options &amp;gt; View:&lt;br /&gt;
[[Image:simplefilesharingoff.jpg]]&lt;br /&gt;
&lt;br /&gt;
==%00%00%00%00 Errors==&lt;br /&gt;
&lt;br /&gt;
===Error Message===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SYSTEM ERROR in line 162. Amount &amp;quot;-2698.00AED&amp;quot; or base &amp;quot;%00%00%00%00&amp;quot; has been wrongly generated   &lt;br /&gt;
GET NEOSYS SUPPORT. DO NOT ATTEMPT TO CORRECT MANUALLY    &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Solution===&lt;br /&gt;
%00%00%00%00 indicates an internal error that NEOSYS programmer has to fix. It is usually random and can be hard to replicate unlike almost all other NEOSYS errors which usually replicate reliably once you find the cause.&lt;br /&gt;
&lt;br /&gt;
==B703 Errors==&lt;br /&gt;
&lt;br /&gt;
The B703 error is usually always related to something too big for NEOSYS to handle. &lt;br /&gt;
&lt;br /&gt;
These are the only B errors that NEOSYS cant always permanently prevent by fixing the software.&lt;br /&gt;
&lt;br /&gt;
For more information, check [[Troubleshooting_NEOSYS_Media_System#B703_Errors|B703 errors]]&lt;br /&gt;
&lt;br /&gt;
==Internet Explorer Menu, View, Text Size doesnt change font size as expected==&lt;br /&gt;
&lt;br /&gt;
Cause: This is because the font size is now user definable in NEOSYS and View, Text Size does not override predefined font sizes.&lt;br /&gt;
&lt;br /&gt;
Solution: If you are using Internet Explorer 7 you can scale the screen (including the font size  using ctrl + and ctrl - keyboard shortcuts or the font size button on the bottom right hand side of the window. &lt;br /&gt;
&lt;br /&gt;
You can adjust the font size on the User Details form when you login although this permanently applies to all forms not just the one that you are on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Uploaded jpg files fail to display in internet explorer==&lt;br /&gt;
&lt;br /&gt;
Some large jpg files &amp;gt; 2Mb cannot be viewed in internet explorer despite being viewable in image preview, ms paint and other viewers/editors. It is not an issue caused by uploading or downloading the files.&lt;br /&gt;
&lt;br /&gt;
These file appear to have been created on Photoshop CS Macintosh and may be a special type of uncompressed jpg used for production quality files.&lt;br /&gt;
&lt;br /&gt;
===Partial solution===&lt;br /&gt;
Before uploading the files, open them in some editor like MS Paint (right click, edit) and save them. However this results in a loss of quality. Perhaps there is some program that can convert these files to a format understandable by Internet explorer without any loss of quality.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;This document is currently read only&amp;quot;==&lt;br /&gt;
&lt;br /&gt;
===Cause===&lt;br /&gt;
The user attempting to modify this document does not have the authorization key to do so.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
Inform the user that he is not authorised to modify the document and give him the list of users within his company who are authorised to do so.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;You have attempted to write to a read-only file&amp;quot;==&lt;br /&gt;
&lt;br /&gt;
===Message===&lt;br /&gt;
&lt;br /&gt;
Error while writing data.&lt;br /&gt;
You have attempted to write to a read-only file.&lt;br /&gt;
- or -&lt;br /&gt;
access to the file has been denied by the operating system.&lt;br /&gt;
(operating system file name: &amp;quot;..\DATA\ADLINEC\ADAGENCY\REV76467.OV00012618&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
===Cause===&lt;br /&gt;
&lt;br /&gt;
It is almost certainly due to some third party backup or other maintenance software opening the NEOSYS database files when it shouldn&#039;t e.g. badly configured third party backup scheduled to backup NEOSYS while NEOSYS is still running. Note that the exact filename varies each time.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
&lt;br /&gt;
This can be a serious error that causes damaged files in NEOSYS especially if the filename ends in .OV. Use the usual methods of checking for damaged files e.g. do a backup which also looks for damaged files BUT DO NOT OVERWRITE THE LATEST BACKUP SINCE IT MAY BE REQUIRED for restoration. Then fix the damaged files using the usual methods e.g. by rebuilding/using&lt;br /&gt;
FIXFILE or restoring databases. For more info check [[Handling damaged files|Handling damaged files]]&lt;br /&gt;
&lt;br /&gt;
===Prevention===&lt;br /&gt;
&lt;br /&gt;
Remove the third party backup or other maintenance software or reschedule it to run at a time that NEOSYS is shutdown. Removal of software may require hunting through the windows process list for unexpected programs running.&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting Hung processes==&lt;br /&gt;
&lt;br /&gt;
===Investigating hung NEOSYS processes===&lt;br /&gt;
&lt;br /&gt;
To find out if a process is hung, check the time on the last line of the process which would be frozen since the time it first hung. This time can be cross-referenced with the current server time and you will notice the difference in time b/w the server and the hung process. You can also find the duration of hung processes in Nagios.&lt;br /&gt;
&lt;br /&gt;
Step 1&lt;br /&gt;
&lt;br /&gt;
Gather all the useful and necessary information about the current state of the system by taking screenshots of the NEOSYS process windows, server time and date, process list in Task Manager etc.&lt;br /&gt;
&lt;br /&gt;
Always remember to take screenshots of the whole screen, since every little detail is useful for investigation. &lt;br /&gt;
&lt;br /&gt;
Send an e-mail to Support with all the investigated details.&lt;br /&gt;
&lt;br /&gt;
Step 2&lt;br /&gt;
&lt;br /&gt;
Request a shutdown of all NEOSYS processes, which would leave only the hung processes open. &lt;br /&gt;
&lt;br /&gt;
Close the hung process/es.&lt;br /&gt;
&lt;br /&gt;
Step 3&lt;br /&gt;
&lt;br /&gt;
Process explorer can be installed from Microsoft Sysinternals and for a deeper inspection of the problem with a view to resolving it, should be used to gain information about what files are open.&lt;br /&gt;
&lt;br /&gt;
If already installed, procexp.exe can be found on the Desktop or from Start Menu-&amp;gt; Programs.&lt;br /&gt;
&lt;br /&gt;
In process explorer, Find -&amp;gt; Handle -&amp;gt; type d:\&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Submit the complete list (maybe more than one page) to support for records.&lt;br /&gt;
&lt;br /&gt;
[[Image:invhungprocess.jpg]]&lt;br /&gt;
&lt;br /&gt;
===[[Troubleshooting_NEOSYS_Generally#Investigating_CPU_100.25_using_Windows_Task_Manager|Investigating CPU 100% using Windows Task Manager]]===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===[[Troubleshooting_NEOSYS_Generally#Solving_server_CPU.25_is_100_and_all_users_are_extremely_slow.2Fstopped|Solving server CPU% is 100 and all users are extremely slow/stopped]]===&lt;br /&gt;
&lt;br /&gt;
===Error message: &amp;quot;Fatal Error in Rev Restart&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
[[image:fatal.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Error message: “Abort, Retry, Fail”===&lt;br /&gt;
====Problem====&lt;br /&gt;
The following messages may come on older versions of NEOSYS if there is a problem with the USB media inserted for backup.&lt;br /&gt;
&lt;br /&gt;
[[image:usberror.jpg]]&lt;br /&gt;
&lt;br /&gt;
This results in “NEOSYS has not checked in” message on Nagios since it hangs during the monitoring update and locks all other processes from monitoring too.&lt;br /&gt;
&lt;br /&gt;
General failure writing drive F&lt;br /&gt;
Abort, Retry, Fail?&lt;br /&gt;
&lt;br /&gt;
Not read reading drive F&lt;br /&gt;
Abort, Retry, Fail?&lt;br /&gt;
&lt;br /&gt;
Pressing A or F results in the problem happening again in about a minute, perhaps on a different process.&lt;br /&gt;
&lt;br /&gt;
====Solution====&lt;br /&gt;
Temporary solution is to do “Safely remove hardware” from the windows notification area. Using “Eject” from My Computer will not work.&lt;br /&gt;
&lt;br /&gt;
Permanent solution is to replace the defective USB memory stick. Sometime reformatting is sufficient.&lt;br /&gt;
&lt;br /&gt;
Upgrading NEOSYS will probably stop the defective media from causing NEOSYS to hang but the USB will still be useless for backup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Error message: &amp;quot;Read error in the operating system file&amp;quot;===&lt;br /&gt;
====Problem====&lt;br /&gt;
Nagios reports a hung process and on the server a process has the following message popup.&lt;br /&gt;
&lt;br /&gt;
 Read error in the operating system file &amp;quot;..\DATA\PT0833\ACCOUNTS\REV20049&lt;br /&gt;
 The file does not exist or the filename is&lt;br /&gt;
 not valid for the operating system.&lt;br /&gt;
&lt;br /&gt;
[[Image:readerrorintheoperatingsystemfile.png]]&lt;br /&gt;
&lt;br /&gt;
====Cause====&lt;br /&gt;
Some non-NEOSYS program is directly accessing the NEOSYS database files while NEOSYS processes are running and using the files as well.&lt;br /&gt;
&lt;br /&gt;
*Client IT staff using a backup program to perform backup without ensuring that NEOSYS processes are shutdown.&lt;br /&gt;
*A NEOSYS rsync process taking longer than expected due to new USB.&lt;br /&gt;
&lt;br /&gt;
====Solution====&lt;br /&gt;
Kill the NEOSYS process eg with the X button. It is advisable NOT to let it run further while it cannot properly access one of its files.&lt;br /&gt;
&lt;br /&gt;
====Prevention====&lt;br /&gt;
Remove the third party program or arrange for it to operate only while NEOSYS processes are shutdown eg from 3am-6am.&lt;br /&gt;
&lt;br /&gt;
===Error message: &amp;quot;Not enough string space - Out of Memory&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
====Message====&lt;br /&gt;
&lt;br /&gt;
‘RTP27’ Line 1. [B29] Not enough string space – Out of Memory.&lt;br /&gt;
&lt;br /&gt;
Not enough memory to execute Debugger; current program aborted.&lt;br /&gt;
Press any key to continue&lt;br /&gt;
&lt;br /&gt;
[[Image:out_of_memory.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Cause====&lt;br /&gt;
Unknown perhaps related to some large document or report&lt;br /&gt;
&lt;br /&gt;
====Solution====&lt;br /&gt;
Ask users for any hanging transactions.&lt;br /&gt;
None other than closing and starting another process.&lt;br /&gt;
&lt;br /&gt;
Also refer [[Troubleshooting NEOSYS Generally#Enabling EMS memory on Window 2003|Enabling EMS memory on Window 2003]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Error message: B521===&lt;br /&gt;
&lt;br /&gt;
[[Image:B521.jpg]] &lt;br /&gt;
&lt;br /&gt;
 Another user is currently updating indexes. &lt;br /&gt;
 Waiting to make your updates...&lt;br /&gt;
 If you interrupt this process,&lt;br /&gt;
 you may have to rebuild all the indexes&lt;br /&gt;
&lt;br /&gt;
B521 message is usually temporary and goes away by itself. If it does not then, as the text of the B521 message makes clear, some OTHER process is holding up the system, preventing the process with B521 message from continuing.&lt;br /&gt;
&lt;br /&gt;
B521 message is a symptom of other problem so it does not itself have some one simple solution. You must find which other process or issue is causing the hold up and solve whatever problem is causing the hold up, which could be anything.&lt;br /&gt;
&lt;br /&gt;
===Error message: &amp;quot; NTVDM encountered a hard error &amp;quot;===&lt;br /&gt;
&lt;br /&gt;
The following error message appears:&lt;br /&gt;
&lt;br /&gt;
[[Image:ntvdm.jpg]]&lt;br /&gt;
&lt;br /&gt;
 NTVDM encountered a hard error&lt;br /&gt;
&lt;br /&gt;
====Solution====&lt;br /&gt;
 &lt;br /&gt;
This error is caused by missing or corrupt Windows system files (i.e. command.com, autoexec.nt and config.nt). The solution is to run a program called XP FIX which will reinstall these missing files. You can download it form http://www.visualtour.com/downloads/xp_fix.exe&lt;br /&gt;
&lt;br /&gt;
Sometimes even after running the XP FIX program the error still appears. Then you need to copy all the files under C:/windows/repair to C:/windows/system32 and in the autoexec.nt and config.nt put REM before any lines there which don&#039;t have it.&lt;br /&gt;
&lt;br /&gt;
====Possible fix for some NTVDM errors====&lt;br /&gt;
&lt;br /&gt;
=====Error message===== &lt;br /&gt;
&lt;br /&gt;
[[Image:Ntvdm1.jpg]]&lt;br /&gt;
&lt;br /&gt;
 NTVDM has encountered a System error.&lt;br /&gt;
 The system cannot find the file specified.&lt;br /&gt;
 Choose close to terminate the application.&lt;br /&gt;
&lt;br /&gt;
=====Possible solution===== &lt;br /&gt;
&lt;br /&gt;
#Change the TEMP and TMP environment variables to C:\WINDOWS\TEMP. This should be for the user that runs NEOSYS processes - normally administrator.&lt;br /&gt;
#Close all NEOSYS processes&lt;br /&gt;
#Logout/Login again&lt;br /&gt;
#Restart NEOSYS processes&lt;br /&gt;
&lt;br /&gt;
[[image:Ntvdmsoln.png]]&lt;br /&gt;
&lt;br /&gt;
=====Check solution done properly===== &lt;br /&gt;
&lt;br /&gt;
You can check that by typing ECHO %TEMP% and ECHO %TMP% at a console prompt after logging out and in again. &lt;br /&gt;
&lt;br /&gt;
Note that windows will actually set the windows environment variables to something like C:\WINDOWS\TEMP\2 for some unknown reason. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
d:\hosts&amp;gt;ECHO %temp% &lt;br /&gt;
C:\WINDOWS\TEMP\2 &lt;br /&gt;
&lt;br /&gt;
d:\hosts&amp;gt;ECHO %tmp% &lt;br /&gt;
C:\WINDOWS\TEMP\2 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Error message: [[Troubleshooting_NEOSYS_Generally#Troubleshooting_the_.22Database_not_available.22_error_message|&amp;quot;Database not available&amp;quot; post login]]===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Error message: [[Backup_and_Restore#Error_Message:_.22Cannot_backup.2Frestore_because_PROCESS1_PROCESS2_.28etc.29_is.2Fare_online.22_message|&amp;quot;Cannot backup/restore because PROCESS1 PROCESS2 (etc) is/are online&amp;quot;]]===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How to kill hung NEOSYS processes===&lt;br /&gt;
 &lt;br /&gt;
NOTE WELL: If you kill actively working NEOSYS processes (those which are &amp;quot;listening&amp;quot; and not hung/crashed) there is a reasonable chance that the database will be damaged and might need a restore losing possibly large amounts of work.&lt;br /&gt;
 &lt;br /&gt;
====If NEOSYS processes are visible on the server desktop====&lt;br /&gt;
 &lt;br /&gt;
Look for processes which don&#039;t have &amp;quot;Listening ...&amp;quot; on the last but one line. The times on the left hand side are frozen as at the time of the hang.&lt;br /&gt;
 &lt;br /&gt;
You can then click the X to kill the process and confirm that this is OK.&lt;br /&gt;
 &lt;br /&gt;
Example of a NEOSYS process that has hung due to a software error resulting in a failure to handle a complex query with a lot of brand codes.&lt;br /&gt;
&lt;br /&gt;
[[Image:hungprocess.jpg]]&lt;br /&gt;
 &lt;br /&gt;
====If NEOSYS processes are not visible on the server desktop====&lt;br /&gt;
&lt;br /&gt;
NEOSYS processes are most of the time visible on the desktop (i.e. the black dos windows) in Windows 2003 OS, except in the case that the process has been scheduled to start on computer restart and no one has logged into the server. In this case it would be running in the background. TODO&lt;br /&gt;
&lt;br /&gt;
You can check if there are any hung processes from the NEOSYS Support Menu, List of Database Processes. &lt;br /&gt;
[[Image:databaseprocesseslist.jpg]]&lt;br /&gt;
&lt;br /&gt;
In this case you should follow the below instructions - however all of them need to be done within 30 seconds of starting the first instruction to avoid inconvenience to the users. It is recommend that you keep relevant windows open before proceeding with the same:&lt;br /&gt;
&lt;br /&gt;
#Shutdown NEOSYS by TEMPORARILY putting a file called GLOBAL.END in the parent directory of NEOSYS (if there is already a GLOBAL.END.TEMP file then rename it to GLOBAL.END). Leaving the file there would prevent NEOSYS from starting up again. Shutting down NEOSYS from the Support menu will not work because of the hung processes.&lt;br /&gt;
#Use Windows Task Manager to kill all the NTVDM processes - assuming that you have closed all the visible NEOSYS processes, then the NTVDM processes in the task manager would be the hung one.&lt;br /&gt;
#Delete GLOBAL.END or rename it to GLOBAL.END.TEMP&lt;br /&gt;
#Restart the processes back again. If there are many datasets then you need to restart them all well within the 30 seconds period. Restarting a process will not be noticed by users, if started immediately.&lt;br /&gt;
#*Create a [[Configuring_STARTALL.cmd_command_to_auto_start_all_processess | STARTALL.cmd]] file for future cases, where you may need to quickly start many processes for clients with multiple datasets.&lt;br /&gt;
&lt;br /&gt;
In case of Patsalides, where we have a thousand datasets which start &amp;quot;on demand&amp;quot; i.e. usually on login; all you need to do is start one dataset which will restart all the other datasets &amp;quot;on demand&amp;quot;. If there is no response within 30 seconds then one of the running datasets will start it up so there appears to be a 30 second delay when you login to one of the thousand datasets the first time on any one day.&lt;br /&gt;
&lt;br /&gt;
===Temporary workarounds for hung NEOSYS processes===&lt;br /&gt;
Until the error in the software is fixed users can often get their results by simplifying their requirements. For example select individual clients instead of selecting all the brands for a particular client. If the user has repeated his request (in forlorn hope that it would work finally) then the number of working NEOSYS processes will drop causing severe slowdown for other users and complete stop if all the NEOSYS processes hang.&lt;br /&gt;
&lt;br /&gt;
==Fixing &amp;quot; You do not have sufficient privilege to access this file &amp;quot;==&lt;br /&gt;
&lt;br /&gt;
This error message may come up while NEOSYS processes start up at the same time.&lt;br /&gt;
&lt;br /&gt;
Error message on:  &lt;br /&gt;
16 bit MS-DOS Subsystem&lt;br /&gt;
D:\hosts\Client_nam\NEOSYS\AREV.EXE&lt;br /&gt;
C:\Windows\SYSTEM32\CONFIG.NT. Error Code 0x20. You do not have sufficient privilige to access this file. See your system administrator. Choose &#039;Close&#039; to terminate the application.&lt;br /&gt;
&lt;br /&gt;
Close the error message window and look for NEOSYS processes for that client. In case there is no process, start the NEOSYS process.&lt;br /&gt;
&lt;br /&gt;
[[image:Errormsg.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Fixing wrong default program assigned to open a file type==&lt;br /&gt;
&lt;br /&gt;
The NEOSYS process (cmd file) might open up in a notepad, instead of the usual black colour DOS window. This may happen if a JavaScript file is opened using notepad. Support MUST be very CAREFUL when accessing  .JS and .JSE files and double check that the default program remains wscript.exe and not changed to notepad/wordpad. The issue can be fixed by the following:&lt;br /&gt;
&lt;br /&gt;
#Check if Windows Script 5.6/5.7 is installed, IF NOT download and install it from the Microsoft Website.&lt;br /&gt;
#Go to Control Panel -&amp;gt; Default Programs -&amp;gt; Associate a file type or protocol with a program and then change the default program for .JS and .JSE to &amp;quot;Microsoft Windows Based Script Host&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For file types that must not have any default program to open them (e.g. .vol file type):&lt;br /&gt;
&lt;br /&gt;
#Right click the concerned file (e.g. ADAGENCY.vol) &amp;gt; Open with &amp;gt; Choose another app &amp;gt; More apps&lt;br /&gt;
#Select &amp;quot;Always use this app to open XXXX files&amp;quot;&lt;br /&gt;
#Click &amp;quot;Look for another app on this PC&amp;quot;&lt;br /&gt;
#Locate and select the concerned file (ADAGENCY.vol in this example). An error should appear &amp;quot;This app can&#039;t be run on your PC&amp;quot;. Click OK.&lt;br /&gt;
&lt;br /&gt;
==Fixing a &#039;Could not start&#039; error on Scheduled Tasks in Windows Server 2000 SP4==&lt;br /&gt;
&lt;br /&gt;
This error occurs because of a change that is made to the data that is stored in the credentials database when you install Windows 2000 SP4. Hence installing SP4 causes the the data that is stored in the credentials database to get converted to an SP4-compatible format. A registry key is configured to indicate that the data has been converted to the SP4 format.&lt;br /&gt;
&lt;br /&gt;
Hence the Scheduled Tasks do not work sometimes. However the Scheduled Tasks works fine sometimes, but when you uninstall SP4, it does not work.&lt;br /&gt;
&lt;br /&gt;
The best solution is to:&lt;br /&gt;
&lt;br /&gt;
#Incase Scheduled Tasks do not work after installing SP4, then uninstall SP4 and it should be fine.&lt;br /&gt;
#Incase Scheduled Tasks works after installing SP4, and later after uninstalling SP4, it does not work, then install SP4 and it should be fine.&lt;br /&gt;
&lt;br /&gt;
==Checking for server or NEOSYS crashes==&lt;br /&gt;
 &lt;br /&gt;
#NEOSYS Maintenance Mode&lt;br /&gt;
#General Menu, Setup, Processes&lt;br /&gt;
#Select the dates and the option Detailed&lt;br /&gt;
 &lt;br /&gt;
This report shows a list of dates and times that NEOSYS logged in but did not log out properly.&lt;br /&gt;
 &lt;br /&gt;
Ignore the very latest entries since they represent the current NEOSYS processes. For example, if you have four NEOSYS processes running at the time that you get the report (including any in maintenance mode) then you can ignore the last four entries.&lt;br /&gt;
 &lt;br /&gt;
The date and time shows for each process that has failed to shutdown correctly when the process logged in. Versions of NEOSYS from January 2008 will also show the date and time that each crashed NEOSYS process was last active (heartbeat) so that the time of failure can be known.&lt;br /&gt;
 &lt;br /&gt;
If you see a bunch of NEOSYS processes all started up at around the same time but all failed to shutdown correctly then the cause will be a server failure - usually power failure.&lt;br /&gt;
 &lt;br /&gt;
Isolated one-off failures will be related to individual NEOSYS process crashes - most commonly caused by one of the following:&lt;br /&gt;
 &lt;br /&gt;
#NEOSYS hanging to due to software failure&lt;br /&gt;
#Manually exiting a NEOSYS process on the server either by pressing Ctrl+Alt+Del or clicking the &amp;quot;X&amp;quot; close icon/box and ignoring the warning&lt;br /&gt;
#Random server failures eg memory, disk etc&lt;br /&gt;
 &lt;br /&gt;
Example:&lt;br /&gt;
 &lt;br /&gt;
 LOGIN 22/12/2007 06:02 NEOSYS SERVER ADAGENCY         Current workstation &lt;br /&gt;
 LOGIN 23/12/2007 06:00 NEOSYS SERVER ADAGENCY         Current workstation  &lt;br /&gt;
 LOGIN 23/12/2007 06:01 NEOSYS SERVER ADAGENCY         Current workstation  &lt;br /&gt;
 LOGIN 23/12/2007 06:02 NEOSYS SERVER ADAGENCY         Current workstation  &lt;br /&gt;
 LOGIN 23/12/2007 08:52 NEOSYS SERVER ADAGENCY         Current workstation  &lt;br /&gt;
 LOGIN 23/12/2007 08:52 NEOSYS SERVER ADAGENCY         Current workstation  &lt;br /&gt;
 LOGIN 23/12/2007 08:53 NEOSYS SERVER ADAGENCY         Current workstation  &lt;br /&gt;
 LOGIN 8/1/2008 06:00 NEOSYS SERVER ADAGENCY         Current workstation  &lt;br /&gt;
 LOGIN 8/1/2008 06:01 NEOSYS SERVER ADAGENCY         Current workstation  &lt;br /&gt;
 LOGIN 8/1/2008 06:02 NEOSYS SERVER ADAGENCY         Current workstation  &lt;br /&gt;
 LOGIN 8/1/2008 13:51 NEOSYS SERVER NEOSYS         Current user session  &lt;br /&gt;
&lt;br /&gt;
Interpretation:&lt;br /&gt;
 &lt;br /&gt;
The first four entries indicate that all four NEOSYS processes started at 06am were suddenly killed probably by power failure&lt;br /&gt;
 &lt;br /&gt;
The next four entries indicate that NEOSYS was restarted at around 08:52 and all these processes were AGAIN killed probably by power failure&lt;br /&gt;
 &lt;br /&gt;
The last four entries can be ignored because there were four NEOSYS processes running at the time that the report was generated&lt;br /&gt;
&lt;br /&gt;
==Searching for word/number in the database files using maintenance mode==&lt;br /&gt;
&lt;br /&gt;
You can search for any word/number in the database files of NEOSYS, using the following command line:&lt;br /&gt;
&lt;br /&gt;
 F5&lt;br /&gt;
 FIND FILENAME WORDWITHOUTANYSPACES&lt;br /&gt;
 &lt;br /&gt;
 For eg:&lt;br /&gt;
 FIND CURRENCIES 1.1&lt;br /&gt;
 (here you are searching for the number 1.1 in the currencies file) You CANNOT search for a phrase ie include spaces like this.&lt;br /&gt;
 &lt;br /&gt;
 Or you can also type:&lt;br /&gt;
 FIND FILENAME &amp;lt;enter&amp;gt;&lt;br /&gt;
 and it will ask you what you want do to search. You can enter an exact phrase with spaces.&lt;br /&gt;
&lt;br /&gt;
Incase you do not know the filenames, you can enter the following command to see all the filenames in the system:&lt;br /&gt;
&lt;br /&gt;
 F5&lt;br /&gt;
 LF&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting a Service Unavailable message on Internet Explorer when opening up NEOSYS==&lt;br /&gt;
&lt;br /&gt;
===Error Message===&lt;br /&gt;
&lt;br /&gt;
The following error message appears in Internet Explorer when you try to open up NEOSYS:&lt;br /&gt;
&lt;br /&gt;
 Service Unavailable&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
 &lt;br /&gt;
Open the IIS Manager, right click Web Sites and select properties:&lt;br /&gt;
[[Image:serviceunavailable1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Switch to the Service Tab and tick the &amp;quot;Run WWW Service in IIS 5.0 Isolation Mode&amp;quot;.&lt;br /&gt;
[[Image:serviceunavailable2.jpg]]&lt;br /&gt;
&lt;br /&gt;
You will be asked for Restart of IIS. Click yes to restart IIS. If you are not asked just restart IIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Inspecting IIS log files==&lt;br /&gt;
&lt;br /&gt;
At a windows command prompt:&lt;br /&gt;
&lt;br /&gt;
 c:&lt;br /&gt;
 cd \Windows\system32\LogFiles\W3SVC1&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 %SystemDrive%&lt;br /&gt;
 cd %SystemRoot%&lt;br /&gt;
 cd system32\LogFiles\W3SVC1&lt;br /&gt;
&lt;br /&gt;
then (substituting the ip number you are interested in)&lt;br /&gt;
&lt;br /&gt;
 find &amp;quot;192.168.1.55&amp;quot; *|sort&amp;gt;temp.log&lt;br /&gt;
&lt;br /&gt;
Open temp.log in Excel and use Tools, Data, Text to Columns to split into columns using options &amp;quot;Delimited&amp;quot; and check split on Space.&lt;br /&gt;
&lt;br /&gt;
Autowidth all columns by clicking on the top left box just outside the data to the left of column A and above column 1 then double click the column separator to the right of column &amp;quot;A&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note that times and dates are in UTC/GMT so you have to add/subtract your timezone offset to get local times.&lt;br /&gt;
&lt;br /&gt;
==Inspecting Database LOGS Folder==&lt;br /&gt;
NEOSYS log files e.g. 15123103.xml are created by the database processes and contain user requests to the NEOSYS database. Each XML file represents commands executed by each NEOSYS process.&lt;br /&gt;
&lt;br /&gt;
If the database is not available according to the website then no entry will appear in that log. (The request will appear in the IIS website log but that log is nothing to do with database processes)&lt;br /&gt;
&lt;br /&gt;
It is often quicker and easier to do a preliminary search for database requests using the Request Log in NEOSYS UI, although more specific details such as Session No, Host IP, Filename and DataOut/In are only available in the XML logs.&lt;br /&gt;
&lt;br /&gt;
Find log files in neosys/LOGS. The file naming format is yymmdd(log created by process No.) E.g 18060402 = 4th of July 2018 process02.&lt;br /&gt;
&lt;br /&gt;
Use simple text editor to view the log files. &lt;br /&gt;
&lt;br /&gt;
Details found in XML log files:&amp;lt;br&amp;gt;&lt;br /&gt;
Message: Date, Time, User, Filename, WorkstationIP, HostIP, HTTP and Session. &amp;lt;br&amp;gt;&lt;br /&gt;
Request: Req1, Req2, Req..&amp;lt;br&amp;gt;&lt;br /&gt;
Response: ProcessingSecs&amp;lt;br&amp;gt;&lt;br /&gt;
DataOut/DataIn:&lt;br /&gt;
&lt;br /&gt;
===Understanding Log Entries===&lt;br /&gt;
Inspecting and searching through Logs file allows NEOSYS staff to answer clients queries like &amp;quot;Who deleted schedule XXXX&amp;quot; etc.&lt;br /&gt;
&lt;br /&gt;
To read and understand the log file with more ease, copy the portion of the log file required to be analysed into another text editor.&lt;br /&gt;
&lt;br /&gt;
While going through the log file you may come across a request &amp;quot;EXECUTE GENERAL GETTASKS NOT&amp;quot;, this request is concerned with getting a list of tasks that the user is *not* allowed to do.&lt;br /&gt;
&lt;br /&gt;
To read and understand the log file with more ease, copy the portion of the log file required to be analysed into another text editor.&lt;br /&gt;
&lt;br /&gt;
The text that appears as %FE, %FC, %FD, etc. are basically separators. Replace %FE, %FD, %FC, etc. with a separator like &amp;quot;--&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Once replacing all these characters is done, the log file will be more easily readable and vital information will be clearer. &lt;br /&gt;
&lt;br /&gt;
In the log file, you may find numbers like 17290, 17195, etc. These numbers denote dates selected or entered by the NEOSYS user. These are basically the number of days from 31st December 1967 till the date chosen by the user. For example, to convert 17290 to actual date, 31/12/1967 + 17290 = 3/5/2015. So the actual date is 3rd May 2015.&lt;br /&gt;
&lt;br /&gt;
To convert these numbers to dates using maintenance mode, refer to the article [http://techwiki.neosys.com/index.php/Troubleshooting_NEOSYS_Generally#Finding_out_when_and_by_whom_a_record_was_deleted Finding out when and by whom a record was deleted]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:NEOSYS Logs.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Fixing NEOSYS processes that do not auto start / Recovering from incorrect advanced date or time==&lt;br /&gt;
This solution is applicable to live database processes only. Test database processes don’t auto-start any other processes.&lt;br /&gt;
&lt;br /&gt;
===Problem explained===&lt;br /&gt;
After starting up the 1st process, the rest of the processes don&#039;t start up.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
&lt;br /&gt;
The possible cause for this could be that the system date/time might have been changed - either manually or by the auto synchronization. Do the following checks in the sequence of order:&lt;br /&gt;
&lt;br /&gt;
#Check for any *.$* files (* after dollar sign should show a number, the highest being the latest one). If it shows OK, then proceed ahead.&lt;br /&gt;
#Check for any .end files and delete it to rename to .end.temp&lt;br /&gt;
#Check the System Event Viewer log for any 520 or 577 error message (refer http://128.175.24.251/forensics/timechange.htm). Also check for any out of sequence / ahead of today date or time.&lt;br /&gt;
#In case of no 520 or 577 error message, go to Administrative Tools &amp;gt; Local Security Policy &amp;gt; Local Policies &amp;gt; Audit Policy &amp;gt; Audit Privilege use - make sure that Success and Failure are selected under this (this will ensure that future changes to the date/time are recorded in the System Log).&lt;br /&gt;
#In NEOSYS maintenance mode - F5 ED PROCESSES %UPDATE% - and see what it says, incase of any text (only text, not numbers) there, that means that for sure the system date has been changed. To fix this, exit the editor by pressing the ESCAPE key and then type DELETE PROCESSES &amp;quot;%UPDATE%&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Fixing starting issues with NEOSYS processes or Maintenance Mode==&lt;br /&gt;
&lt;br /&gt;
===Fixing &amp;quot;UNABLE TO OPEN BOOT MEDIA MAP&amp;quot; error===&lt;br /&gt;
&lt;br /&gt;
Opening NEOSYS process or maintenance mode just opens and closes the window instantly.&lt;br /&gt;
&lt;br /&gt;
Running ADAGENCY.BAT from a windows CMD shows an error message&lt;br /&gt;
&lt;br /&gt;
 Unable to open boot media map.&lt;br /&gt;
&lt;br /&gt;
Cause:&lt;br /&gt;
&lt;br /&gt;
AREV.EXE is unable to access the  REVMEDIA.LK file.&lt;br /&gt;
&lt;br /&gt;
Possibly due to windows permissions problems. For example after using CYGWIN RSYNC without the --no-perms option.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
If cygwin rsync has screwed up the permissions you can reset the permissions for all files on the D: disk&lt;br /&gt;
&lt;br /&gt;
D: disk properties, security tab, Advanced button&lt;br /&gt;
&lt;br /&gt;
#Owner: change to administrator&lt;br /&gt;
#Check &amp;quot;Replace owner on subcontainers and objects&amp;quot;&lt;br /&gt;
#Check &amp;quot;Replace all child object permission entries with ... &amp;quot;&lt;br /&gt;
#Apply and confirm all questions&lt;br /&gt;
#Repeat and change BACK to Owner: SYSTEM&lt;br /&gt;
&lt;br /&gt;
[[Image:Unableopenbootmediamap.png]]&lt;br /&gt;
&lt;br /&gt;
===Fixing issue where NEOSYS processes do not start-up at all or start-up and close immediately===&lt;br /&gt;
&lt;br /&gt;
Fixing issue where NEOSYS processes do not start-up at all or start-up and close immediately.&lt;br /&gt;
&lt;br /&gt;
#Check if a file with the name global.end exists in the root directory of the NEOSYS installation. Eg D:\global.end . If you find such a file, rename it to global.end.temp - for more information on global.end and what it does, refer to [[Administering_NEOSYS_Server#Closing_NEOSYS_Services|Closing NEOSYS Services]]&lt;br /&gt;
#If the above didn&#039;t fix the problem and NEOSYS still does not start, do a windows search for the entire NEOSYS folder for *.end (i.e. any file ending with .end extension). You may find a (databasecode).end file in D:\neosys\neosys folder which is created by the NEOSYS program during backup at 1 am and later on removed automatically. In this case NEOSYS program might have crashed during the backup and left this file behind. (databasecode).end files prevent other other NEOSYS processes starting up on the database while exclusive processes (like backup) are being done.&lt;br /&gt;
&lt;br /&gt;
Or try: Delete the read-only file REVBOOT file (under d:/neosys/neosys folder). REVBOOT file is recreated when you start maintenance mode.&lt;br /&gt;
&lt;br /&gt;
In case the above didn&#039;t fix the problem then escalate to the programmer immediately.&lt;br /&gt;
&lt;br /&gt;
==Recognising and Solving Low Memory Problems==&lt;br /&gt;
&lt;br /&gt;
Quick Note: Installing a server class operating system on a workstation class computer with the intention of NEOSYS serving a heavy load is likely to cause problems with low memory.&lt;br /&gt;
&lt;br /&gt;
Quick Fix: Disable *ALL* non-essential features in the power-on setup menu.&lt;br /&gt;
&lt;br /&gt;
===Effects===&lt;br /&gt;
&lt;br /&gt;
It is speculated but not proven that low memory may cause NEOSYS to fail by hanging, causing damaged files etc.&lt;br /&gt;
&lt;br /&gt;
===Checking===&lt;br /&gt;
&lt;br /&gt;
 F5&lt;br /&gt;
 MEMORY&lt;br /&gt;
&lt;br /&gt;
On server class machines it should say somewhere around 350Kb to 370Kb Free&lt;br /&gt;
&lt;br /&gt;
Some server class machines have around 330Kb and sometimes even less with no reported problems&lt;br /&gt;
&lt;br /&gt;
The actual effect of low memory is supposed to make NEOSYS slower and perhaps cause hanging and damaged files however this has not been proven in an specific case so far.&lt;br /&gt;
&lt;br /&gt;
On workstation class machines it may often say around 280Kb to 300Kb.&lt;br /&gt;
&lt;br /&gt;
===Cause===&lt;br /&gt;
&lt;br /&gt;
Although there is plenty of real memory in virtually all computers now, NEOSYS runs in the legacy 16 bit virtual memory space of a windows mode called NTVDM. This is limited to 1Mb plus 4Mb of EMS memory.&lt;br /&gt;
&lt;br /&gt;
The 1Mb memory space is shared with:&lt;br /&gt;
&lt;br /&gt;
#Various non-essential windows drivers which NEOSYS automatically disables them in autoexec.nt&lt;br /&gt;
#Various plug and play hardware device drivers for the various adapters in the computer like video, network adapters and various other items that NEOSYS is unable to disable.&lt;br /&gt;
&lt;br /&gt;
In a server class computer the hardware device drivers are usually minimally present in the 1Mb base memory and do not therefore DOESNT a low memory situation for NEOSYS.&lt;br /&gt;
&lt;br /&gt;
In workstation class computers there are often many hardware device drivers present in the 1Mb base memory and this DOES causes a low memory situation for NEOSYS.&lt;br /&gt;
&lt;br /&gt;
When NEOSYS is installed on workstation class computers with XP there is usually not a heavy load expectation and therefore the low memory does not cause a problem.&lt;br /&gt;
&lt;br /&gt;
If Windows Server OS is installed on a workstation class computer NEOSYS may well be expected to serve a heavy load with limited amounts of memory.&lt;br /&gt;
&lt;br /&gt;
Workstation class computers: hardware drivers present and EMS is installed in low memory (0000-9FFF) causing low memory for NEOSYS and possible inability to &lt;br /&gt;
&lt;br /&gt;
Server class computers: Usually few hardware drivers are present in high part (A000-FFFF) of the 1Mb base memory and EMS is able to occupy the high memory leaving the low part (0000-9FFFF) of the 1Mb memory free for NEOSYS. You can find out how much memory is available to NEOSYS and whether EMS is occuping high or low memory using the following sections.&lt;br /&gt;
&lt;br /&gt;
===Fixing Low Memory===&lt;br /&gt;
&lt;br /&gt;
Start, Run, notepad c:\windows\system32\autoexec.nt&lt;br /&gt;
&lt;br /&gt;
Every time NEOSYS starts it tries to make some changes as follow:&lt;br /&gt;
&lt;br /&gt;
#replaces all lines in C:/WINDOWS/SYSTEM32/AUTOEXEC.NT starting with &#039;lh &#039; to start with &#039;rem NEOSYS LH &#039; instead.&lt;br /&gt;
#changes the line in C:/WINDOWS/SYSTEM32/CONFIG.NT &amp;quot;files=...&amp;quot; to &amp;quot;FILES=200&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The replacement is case sensitive triggered on &#039;lh&#039; and &#039;files&#039; so if you manually edit the files and remove the rem or change the number of files and leave the LH and FILES in uppercase then NEOSYS will NOT make further changes. This allows you to do manual amendments to the files without NEOSYS overwriting them.&lt;br /&gt;
&lt;br /&gt;
Check that NEOSYS has successfully disabled all the drivers in the lines starting with LH.&lt;br /&gt;
&lt;br /&gt;
They should be commented out (prefixed) with REM or REM NEOSYS as follows.&lt;br /&gt;
&lt;br /&gt;
After making changes reopen NEOSYS in maintenance mode to use the MEMORY and WHO commands again.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
REM Install CD ROM extensions&lt;br /&gt;
REM NEOSYS LH %SystemRoot%\system32\mscdexnt.exe&lt;br /&gt;
&lt;br /&gt;
REM Install network redirector (load before dosx.exe)&lt;br /&gt;
REM NEOSYS LH %SystemRoot%\system32\redir&lt;br /&gt;
&lt;br /&gt;
REM Install DPMI support&lt;br /&gt;
REM NEOSYS LH %SYSTEMROOT%\SYSTEM32\DOSX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Low Memory Issues in Windows 2003 server can be fixed using instructions mentioned at [http://techwiki.neosys.com/index.php/Troubleshooting_NEOSYS_Generally#Enabling_EMS_memory_on_Window_2003 Fixing Low Memory in Windows 2003 Server]&lt;br /&gt;
&lt;br /&gt;
===Allowing DOS programs that require DOSX to run on the same computer as NEOSYS===&lt;br /&gt;
&lt;br /&gt;
The automatic commenting out DOSX by NEOSYS will prevent some other DOS-like programs from running. If NEOSYS is on dedicated server then there should be no other such programs to fail. However, if you must allow DOS-like programs to work as well as NEOSYS you can do the following configuration:&lt;br /&gt;
&lt;br /&gt;
#leave or restore the original AUTOEXEC.NT and CONFIG.NT files where they are&lt;br /&gt;
#copy them to another folder eg neosys folder&lt;br /&gt;
#make the necessary REM changes there by hand&lt;br /&gt;
#right click the NEOSYS\NEOSYS\AREV.PIF and select properties&lt;br /&gt;
#change the location of the AUTOEXEC.NT and CONFIG.NT files in the following location&lt;br /&gt;
&lt;br /&gt;
[[image:pifsettings.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Checking EMS Memory Configuration===&lt;br /&gt;
&lt;br /&gt;
====Inspection====&lt;br /&gt;
&lt;br /&gt;
 F5&lt;br /&gt;
 WHO&lt;br /&gt;
&lt;br /&gt;
 press the up arrow to get to the last part/page&lt;br /&gt;
&lt;br /&gt;
=====Example of Typical Server EMS Memory=====&lt;br /&gt;
[[image:serveremm.jpg]]&lt;br /&gt;
&lt;br /&gt;
=====Example of Typical Workstation EMS Memory=====&lt;br /&gt;
[[image:workstationemm.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Correction====&lt;br /&gt;
&lt;br /&gt;
No easy way&lt;br /&gt;
&lt;br /&gt;
Removal of hardware adapters designed for workstations instead of servers eg graphics cards and network cards.&lt;br /&gt;
&lt;br /&gt;
Many of the devices may be located on the motherboard and not relocatable except possibly by BIOS configuration or special manufacturer information.&lt;br /&gt;
&lt;br /&gt;
Use windows device manager, View: Resources by Connection, Open the Memory item and look for items between 000A0000 up to 000FFFFF that might give you a clue as to what hardware could be removed or reconfigured. Actually only 000C0000 to 000FFFFF is candidate for EMS memory since 000A000-000BFFFF is mandatory video memory in all systems.&lt;br /&gt;
&lt;br /&gt;
[[image:devicemanager.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Fixing issue where NEOSYS processes do not start-up at all or start-up and close immediately==&lt;br /&gt;
&lt;br /&gt;
#Find if a file with the name global.end exists in the root directory of the NEOSYS installation. Eg D:\global.end . If you find such a file, rename it to global.end.temp - for more information on global.end and what it does refer to [[Administering_NEOSYS_Server#Closing_NEOSYS_Services|Closing NEOSYS Services]]&lt;br /&gt;
#If the above didn&#039;t fix the problem and NEOSYS still does not start, do a windows search for the entire NEOSYS folder for *.end (i.e. any file ending with .end extension). You may find a (databasecode).end file in D:\neosys\neosys folder which is created by the NEOSYS program during backup at 1 am and later on removed automatically. In this case NEOSYS program might have crashed during the backup and left this file behind. (databasecode).end files prevent other other NEOSYS processes starting up on the database while exclusive processes (like backup) are being done.&lt;br /&gt;
&lt;br /&gt;
In case the above didn&#039;t fix the problem then escalate to the programmer immediately.&lt;br /&gt;
&lt;br /&gt;
===Solving &amp;quot;Control Record&amp;quot; error in maintenance mode===&lt;br /&gt;
&lt;br /&gt;
If processes dont start after you log into maintenance mode and you get an error message&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
╔════[FS152]═══════════════════════════════════════╗&lt;br /&gt;
║          The control record &amp;quot;RECORDS&amp;quot;            ║&lt;br /&gt;
║           is too long to be saved.               ║&lt;br /&gt;
║   The current record length is 65539 characters. ║&lt;br /&gt;
║                                                  ║&lt;br /&gt;
║               &amp;lt; Press any key &amp;gt;                  ║&lt;br /&gt;
╚══════════════════════════════════════════════════╝  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[File:Record1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1&#039;&#039;&#039;. Press space to get rid of the error message and you should then get this menu&lt;br /&gt;
&lt;br /&gt;
[[File:Record2.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2&#039;&#039;&#039;. Press F5 and run this command (case sensitive)&lt;br /&gt;
&lt;br /&gt;
 DICT DEFINITIONS&lt;br /&gt;
&lt;br /&gt;
or Press Alt+S and run this command (case sensitive)&lt;br /&gt;
&lt;br /&gt;
 EXECUTE DICT DEFINITIONS&lt;br /&gt;
&lt;br /&gt;
[[File:Record3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3&#039;&#039;&#039;. Press Shift+F3 to get the following message&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
╔══[B202]══════════════════════════════════╗&lt;br /&gt;
║            &amp;quot;DEFINITIONS&amp;quot; has             ║&lt;br /&gt;
║          &amp;quot;QUICKDEX&amp;quot; installed            ║&lt;br /&gt;
║                                          ║&lt;br /&gt;
║ Do you want to remove &amp;quot;QUICKDEX&amp;quot;? [Y/N]  ║&lt;br /&gt;
║                                          ║&lt;br /&gt;
║ &amp;lt;Y                                      &amp;gt;║&lt;br /&gt;
╚══════════════════════════════════════════╝&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Do you want to remove &amp;quot;QUICKDEX&amp;quot;? [Y/N]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4&#039;&#039;&#039;. Press Enter to choose Yes.&lt;br /&gt;
&lt;br /&gt;
[[File:Record4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;5.&#039;&#039;&#039;Restart NEOSYS to see if the problem has been solved&lt;br /&gt;
&lt;br /&gt;
==Solving “page not found” or &amp;quot;HTTP Error 404.3 - Not Found&amp;quot; when downloading some file types after uploading them successfully==&lt;br /&gt;
&lt;br /&gt;
A user gets this error message when trying to download a file that has been uploaded into NEOSYS.&lt;br /&gt;
&lt;br /&gt;
Windows web server will not download file types that it is unaware of. You can enable the download of new file types.&lt;br /&gt;
&lt;br /&gt;
===Adding Mime Types in Windows Sever 2003=== &lt;br /&gt;
&lt;br /&gt;
====One by One====&lt;br /&gt;
&lt;br /&gt;
Follow below steps to enable the download of new file types one by one.&lt;br /&gt;
&lt;br /&gt;
This process is tedious and error-prone if you have to add many types.&lt;br /&gt;
&lt;br /&gt;
#Computer Management&lt;br /&gt;
#Services and Applications&lt;br /&gt;
#IIS properties&lt;br /&gt;
#Mime Types&lt;br /&gt;
#Add&lt;br /&gt;
&lt;br /&gt;
The added Mime type will not take effect unless IIS is restarted. This should be done only when users are offline because restarting IIS kills login sessions and therefore forces users to login again.&lt;br /&gt;
&lt;br /&gt;
Open command prompt and enter the following command&lt;br /&gt;
 iisreset&lt;br /&gt;
&lt;br /&gt;
====Many====&lt;br /&gt;
&lt;br /&gt;
Window Server 2003 is unaware of all the Office 2007+ file types. To add all Office 2007+ file types at once do the following:&lt;br /&gt;
&lt;br /&gt;
Stop IIS&lt;br /&gt;
&lt;br /&gt;
 iisreset /stop&lt;br /&gt;
&lt;br /&gt;
Open the list of mime types&lt;br /&gt;
&lt;br /&gt;
*Start, Run, notepad C:\WINDOWS\system32\inetsrv\MetaBase.xml&lt;br /&gt;
&lt;br /&gt;
Search the file for “xlsx” and quit the editor if already inserted.&lt;br /&gt;
&lt;br /&gt;
Otherwise, find the following line,&lt;br /&gt;
&lt;br /&gt;
  .xml,text/xml&lt;br /&gt;
&lt;br /&gt;
and insert after that line the following lines. They do not need to be indented.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
.docm,application/vnd.ms-word.document.macroEnabled.12&lt;br /&gt;
.docx,application/vnd.openxmlformats-officedocument.wordprocessingml.document&lt;br /&gt;
.dotm,application/vnd.ms-word.template.macroEnabled.12&lt;br /&gt;
.dotx,application/vnd.openxmlformats-officedocument.wordprocessingml.template&lt;br /&gt;
.potm,application/vnd.ms-powerpoint.template.macroEnabled.12&lt;br /&gt;
.potx,application/vnd.openxmlformats-officedocument.presentationml.template&lt;br /&gt;
.ppam,application/vnd.ms-powerpoint.addin.macroEnabled.12&lt;br /&gt;
.ppsm,application/vnd.ms-powerpoint.slideshow.macroEnabled.12&lt;br /&gt;
.ppsx,application/vnd.openxmlformats-officedocument.presentationml.slideshow&lt;br /&gt;
.pptm,application/vnd.ms-powerpoint.presentation.macroEnabled.12&lt;br /&gt;
.pptx,application/vnd.openxmlformats-officedocument.presentationml.presentation&lt;br /&gt;
.xlam,application/vnd.ms-excel.addin.macroEnabled.12&lt;br /&gt;
.xlsb,application/vnd.ms-excel.sheet.binary.macroEnabled.12&lt;br /&gt;
.xlsm,application/vnd.ms-excel.sheet.macroEnabled.12&lt;br /&gt;
.xlsx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet&lt;br /&gt;
.xltm,application/vnd.ms-excel.template.macroEnabled.12&lt;br /&gt;
.xltx,application/vnd.openxmlformats-officedocument.spreadsheetml.template&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save the file with File and Exit&lt;br /&gt;
&lt;br /&gt;
Restart IIS&lt;br /&gt;
&lt;br /&gt;
===Adding Mime Types in Windows Server 2008===&lt;br /&gt;
&lt;br /&gt;
&amp;quot;The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[file:mime2008.jpg]]&lt;br /&gt;
&lt;br /&gt;
This message shows when a user attempts to download a file that has been uploaded into NEOSYS and the file extension is not configured in IIS server Mime Maps.&lt;br /&gt;
&lt;br /&gt;
The user may also get the below error message:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[file:mimetype.jpg]]&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
Add mime mappings in IIS. Use the GUI or the servers command line.&lt;br /&gt;
The exact solution depends on the file type. Example for .msg files:&lt;br /&gt;
&lt;br /&gt;
 C:\windows\System32\inetsrv\appcmd set config /section:staticContent /+&amp;quot;[fileExtension=&#039;.msg&#039;,mimeType=&#039;application/vnd.ms-outlook&#039;]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The bit that varies in the above example is:&lt;br /&gt;
&lt;br /&gt;
*.msg&lt;br /&gt;
&lt;br /&gt;
*application/vnd.ms-outlook&lt;br /&gt;
&lt;br /&gt;
Other mime types can be found on the web eg https://www.thoughtco.com/file-extensions-and-mime-types-3469109&lt;br /&gt;
&lt;br /&gt;
Getting the 2nd part right enables the user to have the downloaded file open automatically in the right application for the file extension,  but only if they have the right application installed.&lt;br /&gt;
&lt;br /&gt;
==Handling Neosys Automatic Upgrade Error Messages==&lt;br /&gt;
&lt;br /&gt;
===Error Message===&lt;br /&gt;
We will receive an email from the NEOSYS client installation with the following message:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;quot;UPGRADEN.EXE&amp;quot; does not have expected exe MZ signature&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
This message is a note that the NEOSYS automatic update procedure failed to download an upgrade file correctly.&lt;br /&gt;
This happens sometimes due to network issues but can be ignored because the file will be probably be correctly downloaded on the next automatic update check.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This message is only informative to help with any problem with the automatic upgrade procedure and may be removed in a later version of neosys (currently Oct 2012)&lt;br /&gt;
&lt;br /&gt;
==Handling Duplicate Login Error E-mails==&lt;br /&gt;
&lt;br /&gt;
===Explanation===&lt;br /&gt;
When a user starts a new session on NEOSYS, any existing session is lost. If a user then tries to go back and work on the old session, they will receive a Duplicate Login Error email.&lt;br /&gt;
&lt;br /&gt;
This is because any user can have only one active session to work on. For example, if a user account is logged into NEOSYS from two different browsers or two different workstations at the same time, the user will receive this error e-mail.&lt;br /&gt;
&lt;br /&gt;
===Error E-mail===&lt;br /&gt;
[[File:dup-login.png]]&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
To avoid the Duplicate Login error e-mail, you must always logout from your active NEOSYS session before starting a new session elsewhere.&lt;br /&gt;
&lt;br /&gt;
==Testing https connection==&lt;br /&gt;
&lt;br /&gt;
The following procedure tests that the https server is operational and not blocked by firewall etc. It does not detect certificate errors.&lt;br /&gt;
&lt;br /&gt;
From a windows command prompt use the following telnet command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
telnet clientname.hosts.neosys.com 4430&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#4430 is the usual NEOSYS http port but replace it by whatever port is actually used for NEOSYS https on the system being tested. If there are multiple https installations on a particular server then different ports are probably used&lt;br /&gt;
#Replace clientname.hosts.neosys.com with the normal https login domain name of the client for whom we want to check the https service&lt;br /&gt;
&lt;br /&gt;
Normal behavior is that it should open a black screen. Pressing Enter or any key returns the _ character. (Close the window using the [X] since there is no keyboard command to do so)&lt;br /&gt;
&lt;br /&gt;
Hanging means that there is some connectivity issue (firewall/ip/server not running/https not installed etc)&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting &amp;quot;page not found&amp;quot; error while using https==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Problem:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#The https service stops working and gives &amp;quot;Page not found&amp;quot; error.&lt;br /&gt;
#The https connection tests fine using telnet (see article above)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Reinstall https using the usual procedure (currently using selfssl)&lt;br /&gt;
#Email clients, requesting to reinstall the new security certificate by following the instructions for [http://userwiki.neosys.com/index.php/Setting_up_and_Configuring_NEOSYS_Generally#Fixing_HTTPS_certificate_error_when_logging_in_from_an_external_link_using_IE8.2C_IE9_and_IE10 Internet Explorer] or [http://userwiki.neosys.com/index.php/Configuring_Safari_for_MAC_OS#Fixing_HTTPS_certificate_error_when_logging_in_using_an_external_link_using_MAC_Operating_System Safari] browser.&lt;br /&gt;
&lt;br /&gt;
==Installing &amp;quot;QUICKDEX&amp;quot; on some files==&lt;br /&gt;
&amp;quot;Quickdex&amp;quot; is a type of index that keeps an alphabetical order on small files. In some maintenance procedures you may be asked to &amp;quot;install Quickdex&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For example to add a quickdex to the UNITS file.&lt;br /&gt;
&lt;br /&gt;
Maintenance mode press F5&lt;br /&gt;
&lt;br /&gt;
 DICT UNITS&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
г=================Dictionary=================┐&lt;br /&gt;
│                                            │&lt;br /&gt;
│  File name      UNITS                      │&lt;br /&gt;
│  Field name     .........................  │&lt;br /&gt;
│                                            │&lt;br /&gt;
│  Dict type                                 │&lt;br /&gt;
│  Single/Multi                              │&lt;br /&gt;
│  Data type                                 │&lt;br /&gt;
│  Output format                             │&lt;br /&gt;
│  Validation patterns                       │&lt;br /&gt;
│                                            │&lt;br /&gt;
│  Position              Key part            │&lt;br /&gt;
│                                            │&lt;br /&gt;
│  Column heading                            │&lt;br /&gt;
│                                            │&lt;br /&gt;
│                                            │&lt;br /&gt;
│  Justification     Display length          │&lt;br /&gt;
│  Description                               │&lt;br /&gt;
│                                            │&lt;br /&gt;
│                                            │&lt;br /&gt;
L============================================-&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Press Shift+F3.&lt;br /&gt;
&lt;br /&gt;
If it says &amp;quot;Do you want to remove ...&amp;quot; then Quickdex has already been installed and you should not continue. Press Esc to cancel, then Esc to quit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
г=[B202]==================================┐&lt;br /&gt;
│                                         │&lt;br /&gt;
│               &amp;quot;UNITS&amp;quot; has               │&lt;br /&gt;
│          &amp;quot;QUICKDEX&amp;quot; installed.          │&lt;br /&gt;
│                                         │&lt;br /&gt;
│ Do you want to remove &amp;quot;QUICKDEX&amp;quot;? [Y/N] │&lt;br /&gt;
│                                         │&lt;br /&gt;
│&amp;lt;Y                                      &amp;gt;│&lt;br /&gt;
L=========================================-&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Otherwise it should say &amp;quot;Do you want to install ...&amp;quot;. Press Enter to accept.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
г=[W963]============================┐&lt;br /&gt;
│                                   │&lt;br /&gt;
│     Do you want to install a      │&lt;br /&gt;
│ Quickdex or Rightdex index? [Q/R] │&lt;br /&gt;
│                                   │&lt;br /&gt;
│&amp;lt;Q                                &amp;gt;│&lt;br /&gt;
L===================================-&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It should then say &amp;quot;Do you want to update ...&amp;quot;. Press Enter to accept.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
г=[W901]========================================┐&lt;br /&gt;
│                                               │&lt;br /&gt;
│           The &amp;quot;UNITS&amp;quot; file has had            │&lt;br /&gt;
│ the &amp;quot;QUICKDEX&amp;quot; modifying filing system added. │&lt;br /&gt;
│        There are 0 records in &amp;quot;UNITS&amp;quot;.        │&lt;br /&gt;
│                                               │&lt;br /&gt;
│    Do you want to update &amp;quot;QUICKDEX&amp;quot;? [Y/N]    │&lt;br /&gt;
│                                               │&lt;br /&gt;
│&amp;lt;Y                                            &amp;gt;│&lt;br /&gt;
L===============================================-&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Afterwards it should return to the initial screen. Press Esc to quit.&lt;br /&gt;
&lt;br /&gt;
==Solving NEOSYS smtp server failure==&lt;br /&gt;
In case the neosys smtp server fails then we can just use the client&#039;s smtp server.&lt;br /&gt;
&lt;br /&gt;
The following information is required from the client&#039;s smtp server configuration:&lt;br /&gt;
&lt;br /&gt;
#hostname&lt;br /&gt;
#username&lt;br /&gt;
#password&lt;br /&gt;
#port no. (most likely = 25)&lt;br /&gt;
&lt;br /&gt;
These details should be entered in the &#039;&#039;&#039;System Configuration File&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
[[image:SYSCFGFILE-SMTP.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Strange characters in maintenance mode==&lt;br /&gt;
While in Maintenance mode, pressing keys on keyboard gives strange characters. Even Enter and Esc don’t work. &lt;br /&gt;
&lt;br /&gt;
This problem has been seen using RDP on:&lt;br /&gt;
&lt;br /&gt;
*Window Server 2003 Web Edition&lt;br /&gt;
*Windows Server 2003 R2 SP2&lt;br /&gt;
&lt;br /&gt;
[[image:strangecharmaint.jpg]] &lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
#Go to Windows -&amp;gt; control panel&lt;br /&gt;
#Go to Regional and Language Options&lt;br /&gt;
#Click on Languages tab then click on Details &amp;lt;br&amp;gt; [[image:lang1.jpg]] &amp;lt;br&amp;gt;&lt;br /&gt;
#Click on Settings Tab and Change default input language to English (United States)&amp;lt;br&amp;gt;(or perhaps something else depending on rdp keyboard) &amp;lt;br&amp;gt; [[image:lang2.jpg]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NEOSYS processes do not start after Windows Update==&lt;br /&gt;
&lt;br /&gt;
===Problem===&lt;br /&gt;
Scheduled Task to start the NEOSYS processes fail on Servers with Windows 2008 after Windows update. Support will have to log into the server to start the processes manually&lt;br /&gt;
Message on the Schedule Task displays &amp;quot; The operation being requested was not performed because the user has not logged on to the network. The specified service does not exit &amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[image:sti.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
&lt;br /&gt;
For clients who cannot tolerate manual intervention after server reboots for any reason (e.g.need to start work before NEOSYS support is available or on NEOSYS support weekends), tick &amp;quot;highest privileges&amp;quot; and &amp;quot;run whether the user is logged in or not&amp;quot;. This approach means that NEOSYS processes which are started by the windows scheduled task are not visible on the desktop and run hidden in the background and only listed in task manager, so avoid this approach on small clients (only few users). Avoiding this approach will also serve to act as an indicator of server restarts.&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting NEOSYS remote support port forwarding==&lt;br /&gt;
This assumes that you have already “port forwarded” tcp port 19580 from your public internet router to the NEOSYS server.&lt;br /&gt;
&lt;br /&gt;
===Tst 0 - Check if SSH is working on the NEOSYS Server===&lt;br /&gt;
Type in the following command in command prompt:&lt;br /&gt;
 telnet 127.0.0.1 19580&lt;br /&gt;
&lt;br /&gt;
IF ALL OK you will see the following:&lt;br /&gt;
&lt;br /&gt;
[[image:tr-pf-03.jpg]] &lt;br /&gt;
&lt;br /&gt;
===Test 1 - Check if SSH is basically working on NEOSYS server over the LAN===&lt;br /&gt;
You must know and use the NEOSYS SERVER LAN IP to do this.&lt;br /&gt;
&lt;br /&gt;
 telnet ???.???.???.??? 19580&lt;br /&gt;
&lt;br /&gt;
[[image:tr-pf-01.jpg]]&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
If you have the WRONG SERVER LAN IP or NEOSYS server SSH is NOT working then it will hang for about 15 seconds and then say “Could not open connection to host …”&lt;br /&gt;
&lt;br /&gt;
[[image:tr-pf-02.jpg]]&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
OR IF ALL OK you will see the following:&lt;br /&gt;
&lt;br /&gt;
[[image:tr-pf-03.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Press Enter to Exit&lt;br /&gt;
&lt;br /&gt;
[[image:tr-pf-04.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test 2 - Check if can connect to the NEOSYS ssh from OUTSIDE the office===&lt;br /&gt;
From any internet connected computer OUTSIDE the office test if you can connect to NEOSYS ssh service. You cannot do this test from inside the office.&lt;br /&gt;
&lt;br /&gt;
You need to know the public ip or domain name of the router. If the router IP is dynamic then NEOSYS sets up dynamic name server so instead of a static ip number you will have a domain name something like clientxyz.redirectme.net.&lt;br /&gt;
&lt;br /&gt;
Enter the command .. using YOUR public internet IP number (NOT the LAN ip number) or the dynamic domain name.&lt;br /&gt;
&lt;br /&gt;
[[image:tr-pf-05.jpg]]  &lt;br /&gt;
&lt;br /&gt;
If everything is working OK you will get a black screen as follows. You will NOT get the “SSH-2.0-OpenSSH-4.7” banner” because NEOSYS ssh remote support is restricted to connect ONLY from LAN ip nos and NEOSYS office ip nos.&lt;br /&gt;
&lt;br /&gt;
[[image:tr-pf-06.jpg]]  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you press Enter a few times then the cursor will just go down. You have click the [X] to close the window.&lt;br /&gt;
&lt;br /&gt;
[[image:tr-pf-07.jpg]]  &lt;br /&gt;
&lt;br /&gt;
===Test 3 - Check that the ssh connection from step 2 was rejected===&lt;br /&gt;
On the NEOSYS server, check the Windows Application log to verify that an SSH connection was rejected.&lt;br /&gt;
&lt;br /&gt;
The rejected ip number will be of the system outside the office that you performed the test from.&lt;br /&gt;
&lt;br /&gt;
[[image:tr-pf-08.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Sample Email: Solving port 19580 port forwarding issues===&lt;br /&gt;
&lt;br /&gt;
Some IT people know how to troubleshoot port forwarding issues but others are mostly just power users who can configure a home router. If the IT person is in the second category then it is quicker for NEOSYS support to offer to configure their router from the NEOSYS server using Teamviewer. Ideally NEOSYS should not be doing client IT work but if client IT allows NEOSYS access to their router then NEOSYS support can make a brief attempt to do the configuration. If the issue is still unresolved then request the client to get a professional IT network expert to do the job and inform them that NEOSYS will not be able to provide them any support till connectivity is fixed. Below is a letter advising a more skilled person to check connections using telnet which is a low level test.&lt;br /&gt;
&lt;br /&gt;
You can usually determine the NEOSYS server LAN IP number from Nagios. If so then adjust the email text appropriately.&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
Dear XYZ,&lt;br /&gt;
&lt;br /&gt;
It is highly critical to fix the connectivity with the NEOSYS server because NEOSYS will not be able to provide any support until connectivity is fixed. User support issues will be delayed and remain unresolved if you do not fix this issue URGENTLY.&lt;br /&gt;
&lt;br /&gt;
At the moment there is no connection from the internet via your router to the NEOSYS server and when we do the following, we get no connection. &lt;br /&gt;
&lt;br /&gt;
   telnet CLIENTNAME.hosts.neosys.com 19580&lt;br /&gt;
&lt;br /&gt;
Normally it should connect and presents a black screen (saying SSH something after pressing Enter) which we close.&lt;br /&gt;
&lt;br /&gt;
Please check that you can connect to the NEOSYS server internally by using the NEOSYS server IP address in the following command on any computer in your LAN.&lt;br /&gt;
&lt;br /&gt;
   telnet 192.168.?.? 19580&lt;br /&gt;
&lt;br /&gt;
If you can connect to the NEOSYS server internally then please check port forwarding.&lt;br /&gt;
&lt;br /&gt;
Additionally check the following:&lt;br /&gt;
1. Has your router IP changed? The IP we have is x.x.x.x&lt;br /&gt;
2. Has your server’s LAN IP changed and are you forwarding to the correct LAN IP?&lt;br /&gt;
3. Is the configuration really correct?&lt;br /&gt;
4. Check router logs for clues&lt;br /&gt;
5. Check NAT settings in the router&lt;br /&gt;
&lt;br /&gt;
If you still cannot see the problem, do &amp;quot;telnet CLIENTNAME.hosts.neosys.com 19580&amp;quot; command from OUTSIDE your network to replicate the problem we are facing.&lt;br /&gt;
&lt;br /&gt;
For troubleshooting steps refer Troubleshooting NEOSYS remote support&lt;br /&gt;
http://techwiki.neosys.com/index.php/Troubleshooting_NEOSYS_Generally#Troubleshooting_NEOSYS_remote_support_port_forwarding&lt;br /&gt;
&lt;br /&gt;
If the problem still persists, please get a professional IT network expert to fix the issue.&lt;br /&gt;
&lt;br /&gt;
Best Regards,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Port mapping restricted by Source IP===&lt;br /&gt;
&lt;br /&gt;
On NEOSYS router, port forwarding has been setup only for specific source IP addresses. This means you will not be able to establish a TCP connection to NEOSYS server unless your server&#039;s outbound IP is mapped to the NEOSYS router. In other words unless the outbound i.e source IP/port of your server has been granted access on the NEOSYS router for all incoming connections you will not be able to make connections to NEOSYS server.&lt;br /&gt;
&lt;br /&gt;
Outbound IP is used whenever a server tries to make a connection to another server outside its network. On the other hand a server receives all incoming connections using it&#039;s Inbound IP.&lt;br /&gt;
&lt;br /&gt;
Therefore to setup ssh connection from a new Client server to NEOSYS server we need to grant access to its outbound IP on the NEOSYS router. See [[Troubleshooting_NEOSYS_Generally#If_Telnet_does_not_work | link]] to find the outbound server IP/ports of the server.&lt;br /&gt;
&lt;br /&gt;
==Solving “Cant login … INVALID DATA PATH … permission denied”==&lt;br /&gt;
===Error Message===&lt;br /&gt;
&lt;br /&gt;
[[image:error-invalid-data-path-1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Error Text:&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 Cannot login because:&lt;br /&gt;
 ERROR: INVALID DATA PATH&lt;br /&gt;
 “D:\HOSTS\HOSTNAME\DATA\HOSTNAME\~8746345.1$” Permission Denied&lt;br /&gt;
&lt;br /&gt;
===Problem Explained===&lt;br /&gt;
When installing NEOSYS on an existing “non-clean” Windows installation, the standard NEOSYS installation procedure can result in failure to login if the standard windows folder permissions have been modified.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
The solution is to grant IIS permission to write in the \neosys\DATA folder and subfolders as follows:&lt;br /&gt;
&lt;br /&gt;
#First add the IUSR_XXXXXXX user to the list of users. (XXXXXXXX is the server name and therefore varies per server) as follows:&lt;br /&gt;
#*Right Click on DATA Folder and click on Properties&lt;br /&gt;
#*Click on Security Tab -&amp;gt; Add -&amp;gt; Advanced&lt;br /&gt;
#*Click on Find Now, Select the IUSR_XXXXXXX user and Click on OK&amp;lt;br&amp;gt;[[image:error-invalid-data-path-2.jpg]]&amp;lt;br&amp;gt;[[image:error-invalid-data-path-3.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
#Second, for the newly added IUSR (IIS user) change the permissions as follows:&lt;br /&gt;
#*&#039;&#039;&#039;REMOVE&#039;&#039;&#039; the read and execute permission (for security, IIS should be unable to execute things that it might have uploaded)&lt;br /&gt;
#*&#039;&#039;&#039;ADD&#039;&#039;&#039; the write permission &amp;lt;br&amp;gt;[[image:error-invalid-data-path-4.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
#Login should now be possible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==NEOSYS process window displays message &amp;quot;Upgrade Downloading&amp;quot;==&lt;br /&gt;
&lt;br /&gt;
[[image:upgradedownloading.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Problem Explained===&lt;br /&gt;
NEOSYS thinks it sees an new neosys2.exe upgrade file on the location http://www.neosys.com/support/neosys2.exe which is accessed by http so attempts to download it.&lt;br /&gt;
&lt;br /&gt;
Http proxies and various internet issues can cause incorrect info to be sent and there is actually no upgrade available. In this case, eventually it realizes that it cant find an appropriate and it stops. &lt;br /&gt;
&lt;br /&gt;
You don’t have to worry about this case.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enabling EMS memory on Window 2003==&lt;br /&gt;
&lt;br /&gt;
Normally EMS memory is provided by Windows 2003 but this can vary depending on the server hardware/bios configuration&lt;br /&gt;
&lt;br /&gt;
If you get the following messages on Windows 2003&lt;br /&gt;
&lt;br /&gt;
#Backup File Size is 0&lt;br /&gt;
#RTP27. [B28] Not enough String Space – Out of Memory&lt;br /&gt;
&lt;br /&gt;
===Cause===&lt;br /&gt;
&lt;br /&gt;
On servers that had no problem previously, the problem is caused by a windows update in Oct 2012 that disables standard Windows EMS memory.&lt;br /&gt;
&lt;br /&gt;
The patch is issued by Microsoft on 9 Oct 2012 but the installation date in the server depends on when the update was actually installed.&lt;br /&gt;
&lt;br /&gt;
http://support.microsoft.com/kb/2724197&lt;br /&gt;
&lt;br /&gt;
===Solution 1 - maximum performance===&lt;br /&gt;
&lt;br /&gt;
To re-enable standard windows EMS on older slower servers or servers where NEOSYS performance must be maximized.&lt;br /&gt;
&lt;br /&gt;
The following link contains instructions how to remove the offending windows update&lt;br /&gt;
&lt;br /&gt;
It also shows how to prevent it being reinstalled automatically by Windows.&lt;br /&gt;
&lt;br /&gt;
http://www.columbia.edu/~em36/wpdos/emsxp.html&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to prevent it being reinstalled again automatically&lt;br /&gt;
&lt;br /&gt;
===Solution 2 – ease of installation===&lt;br /&gt;
&lt;br /&gt;
This option can also be used if Window 2003 is unable to provide EMS memory for example when the server hardware/bios configuration prevents it.&lt;br /&gt;
&lt;br /&gt;
Install EMSMAGIC in the same way as for Windows server 2008&lt;br /&gt;
&lt;br /&gt;
EMSMAGIC has higher memory consumption and makes NEOSYS processes slower so it is better to use Solution 1 above if NEOSYS performance is an issue.&lt;br /&gt;
&lt;br /&gt;
==Fixing no output file in XXX YYY Issue==&lt;br /&gt;
&lt;br /&gt;
===Error Message===&lt;br /&gt;
&lt;br /&gt;
[[File:Nooutputfile.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Problem Explained===&lt;br /&gt;
&lt;br /&gt;
The message “No output file in XXX YYY” can appear at several instances in NEOSYS, most often when generating reports or documents. &lt;br /&gt;
&lt;br /&gt;
This problem is usually caused by software error and it indicates that the NEOSYS server responded without any output and without any message. &lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
&lt;br /&gt;
*Find proof to check if the data required for the report actually exists. This way we can eliminate lack of data as a cause for this error.&lt;br /&gt;
*Check to see if a similar issue has been fixed in latest version of NEOSYS.&lt;br /&gt;
*Document HOW and WHERE the problem can be duplicated by NEOSYS programmers to identify and correct the software.&lt;br /&gt;
&lt;br /&gt;
==Fixing &amp;quot;Units file is missing&amp;quot; error==&lt;br /&gt;
&lt;br /&gt;
[[Image:unitsfile.png]]&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
&lt;br /&gt;
As the message mentions, the &#039;Units&#039; file is missing. This error can be fixed by copying the file from any other installation, since the Units file is the same in all installations.&lt;br /&gt;
&lt;br /&gt;
The Units file is found in the &#039;General&#039; folder. Path : neosys/NEOSYS/DATA/DATABASE/GENERAL/&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting Internet Connections==&lt;br /&gt;
&lt;br /&gt;
===Cannot Connect===&lt;br /&gt;
&lt;br /&gt;
While investigating as to why users are not able to access NEOSYS or http://www.neosys.com/ , you can check which ISP the connection issue is on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;whois ipno&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inspect very carefully to get clues as to which ISP and which AREA of the ISP the problematic ip numbers are and which do NOT have problems&lt;br /&gt;
&lt;br /&gt;
Doing tracert on windows command prompt on the user&#039;s computer may help locate which point on the route between the user and the server is blocking access&lt;br /&gt;
&lt;br /&gt;
 tracert xxxx.hosts.neosys.com&lt;br /&gt;
&lt;br /&gt;
where &amp;quot;xxxx&amp;quot; is the client name. In this example, the output will be something like shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Tracing route to xxxx.hosts.neosys.com [37.48.81.101]&lt;br /&gt;
over a maximum of 30 hops:&lt;br /&gt;
&lt;br /&gt;
  1     2 ms     1 ms     3 ms  ukr.sb.com [192.168.2.1]&lt;br /&gt;
  2    10 ms    10 ms    11 ms  losubs.subs.bng2.th-lon.zen.net.uk [62.3.80.21]&lt;br /&gt;
  3    12 ms    10 ms    67 ms  ae1-182.cr1.th-lon.zen.net.uk [62.3.86.80]&lt;br /&gt;
  4    10 ms    11 ms    11 ms  ae0-0.br2.th-lon.zen.net.uk [62.3.80.42]&lt;br /&gt;
  5    13 ms    14 ms    14 ms  peering.thn.lon.leaseweb.net [195.66.225.56]&lt;br /&gt;
  6    23 ms    23 ms    24 ms te-0-10-0-19.bb01.ams-01.leaseweb.net [31.31.32.71]&lt;br /&gt;
  7    22 ms    22 ms    23 ms xe-11-2-3.br01.ams-01.nl.leaseweb.net [31.31.38.89]&lt;br /&gt;
  8    25 ms    28 ms    26 ms  be-10.cr02.ams-01.nl.leaseweb.net [81.17.34.21]&lt;br /&gt;
  9    24 ms    20 ms    25 ms po-1002.ce02.ams-01.nl.leaseweb.net [37.48.95.195]&lt;br /&gt;
 10    24 ms    22 ms    22 ms  nl10r.neosys.com [37.48.81.101]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting TCP/IP Connections===&lt;br /&gt;
&lt;br /&gt;
====Telnet check====&lt;br /&gt;
 telnet &amp;lt;hostname&amp;gt; 19580&lt;br /&gt;
&lt;br /&gt;
If success then host is on web and port is open. &lt;br /&gt;
Otherwise if error: &amp;quot;Connection refused,&amp;quot; then either an intermediate firewall is blocking access or the port is closed on host machine. &lt;br /&gt;
Action: check with client if office firewall(s) allow connection on that port and if the port is open on the host server.&lt;br /&gt;
&lt;br /&gt;
====If Telnet does not work====&lt;br /&gt;
In case telnet does not work, login to the remote host server to investigate the issue. Run the following command simultaneously while doing Telnet from client server to the remote host to check if the TCP packets are reaching the Remote server.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tcpdump -v &#039;src host client-domain-name/ip&#039; &lt;br /&gt;
tcpdump -v portno &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check if packets are sent from the client server to the remote host, you can run the following command simultaneously while trying to ssh to the remote server.&lt;br /&gt;
&amp;lt;pre&amp;gt;netstat -an &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also check if the outbound ports are open from which you are trying to establish the TCP connection to the remote server.&lt;br /&gt;
&amp;lt;pre&amp;gt;telnet portquiz.net portno &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The outbound IP addresses at times can be different from the public IP of the Client server so be sure that the public IP of the client server is the same as its source IP (which represents an incoming connection from Client to Remote server). One way to find the source IP of the Client server is sending an email from Client server to &amp;quot;support@neosys.com&amp;quot;. On receiving the email in Thunderbird, select the email and press Ctrl+u. A new window Opens giving full details of the email received. The third &amp;quot;Received :from&amp;quot; gives the IP of the source.&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting DNS failure===&lt;br /&gt;
&lt;br /&gt;
NEOSYS clients routers are usually configured to use their ISP DNS service and the ISP DNS service is supposed to contact one of NEOSYS&#039;s DNS servers to convert server names like hosts.neosys.com into IP numbers. Misconfiguration of clients routers or problems in the ISP DNS server may cause CANNOT CONNECT problems. Often the connect fails quickly and immediately since if a name cannot be converted to an ip number then the connection cannot even be attempted and therefore there is little or no timeout to wait through.&lt;br /&gt;
&lt;br /&gt;
NEOSYS.COM name servers are listed publically and obtained by whois command.&lt;br /&gt;
&lt;br /&gt;
 whois neosys.com&lt;br /&gt;
&lt;br /&gt;
 Name Server: DNS1.EASYDNS.COM&lt;br /&gt;
 Name Server: DNS2.EASYDNS.NET&lt;br /&gt;
 Name Server: DNS3.EASYDNS.ORG&lt;br /&gt;
 Name Server: NS12.ZONEEDIT.COM&lt;br /&gt;
 Name Server: NS18.ZONEEDIT.COM&lt;br /&gt;
&lt;br /&gt;
In order to contact NEOSYS DNS servers the ISP&#039;s have to use a global DNS to obtain the ip addresses of NEOSYS DNS servers given the host names of NEOSYS DNS servers given in the whois info&lt;br /&gt;
&lt;br /&gt;
Here is an example of DU testing NEOSYS DNS servers. The NEOSYS DNS server ip addresses are listed in the Destination column.&lt;br /&gt;
&lt;br /&gt;
[[File:internet.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If one DNS server is down or unreachable REGARDLESS OF REASON, the ISP is supposed to use the other DNS servers. It is impossible for all NEOSYS DNS servers to be unreachable except in gross disconnection from the internet of the ISP since it is effectively impossible that all NEOSYS DNS servers which are carefully spread around the internet, to be unreachable.&lt;br /&gt;
&lt;br /&gt;
In the above test one of the NEOSYS DNS servers is unreachable but all the others are reachable therefore DU should have no problem providing DNS service to its clients.&lt;br /&gt;
&lt;br /&gt;
ISP are often worse at providing DNS server than the famous GOOGLE DNS servers, so re configuring client router to use GOOGLE DNS servers is a way to prove that the problem lies with the ISP&#039;s DNS service&lt;br /&gt;
&lt;br /&gt;
===Additional test for troubleshooting problems with uploading===&lt;br /&gt;
&lt;br /&gt;
====Verifying that upload.dll can run====&lt;br /&gt;
&lt;br /&gt;
This isnt a complete test of everything. It just checks if the upload program can be run by the web server. It doesnt check if uploads work or the image directory is correctly configured with the right permissions and uploads can actually be done.&lt;br /&gt;
&lt;br /&gt;
=====Error Message=====&lt;br /&gt;
&lt;br /&gt;
... to be added when discovered ...&lt;br /&gt;
&lt;br /&gt;
=====Test=====&lt;br /&gt;
&lt;br /&gt;
Test HTTP if accessible by LAN; Test HTTPS is accessible by Internet; Test both if both are available.&lt;br /&gt;
&lt;br /&gt;
On the server type the following into a browser&lt;br /&gt;
&lt;br /&gt;
LAN/HTTP:&lt;br /&gt;
&lt;br /&gt;
 http://localhost/neosys/neosys/dll/upload.dll&lt;br /&gt;
&lt;br /&gt;
WAN/HTTPS:&lt;br /&gt;
&lt;br /&gt;
 https://localhost:9999/neosys/dll/upload.dll&lt;br /&gt;
&lt;br /&gt;
=====Expected Result=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Upload Error. !&lt;br /&gt;
Please call me from a form !!!&lt;br /&gt;
The first param must be Filename= name of the uploaded file, TYPE=TEXT&lt;br /&gt;
The second param must be Filedata= uploaded file, TYPE=FILE&lt;br /&gt;
The third param is optional PathData= path to uploaded file, default c:\temp\, TYPE=HIDDEN&lt;br /&gt;
The forth param is optional RedirectPage= name of asp who receive the results, TYPE=HIDDEN&lt;br /&gt;
Add others params at the end with INPUT tag.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[image:Uerror.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Patching a NEOSYS program==&lt;br /&gt;
&lt;br /&gt;
Patches done to NEOSYS programs are not affected by live to test database copy, since the programs are on installation level and not database level.&lt;br /&gt;
&lt;br /&gt;
The patch provided will tell you the program name and contain either a whole replacement program text or just some changed lines which you will have to find and edit.&lt;br /&gt;
&lt;br /&gt;
For older versions of NEOSYS, you will need to know the file name which may be provided along with the patch or you can find it using the following code in maintenance mode:&lt;br /&gt;
&lt;br /&gt;
 ED VOC programname&lt;br /&gt;
&lt;br /&gt;
ED VOC XYZ tells you what program name is executed and from what file, when you type the command XYZ. Normally the program name is the same as the command.&lt;br /&gt;
&lt;br /&gt;
The file name will normally be BP for agency programs, GBP for general programs or ABP for finance programs.&lt;br /&gt;
&lt;br /&gt;
NEOSYS programs are stored in files just like records of ordinary database files. You can edit either with &amp;quot;ED filename programname&amp;quot; or &amp;quot;TED filename programname&amp;quot;. TED is better for editing source code as it opens the the code in a text editor, whereas ED opens the code in the same maintenance window.&lt;br /&gt;
&lt;br /&gt;
To test patches immediately, Support may have to clear cache by pressing CTRL+F5. Refer to [[Configuring_IIS#IIS_web_page_caching|Web Caching]] for more information.&lt;br /&gt;
&lt;br /&gt;
===Installing patch in live database===&lt;br /&gt;
&lt;br /&gt;
In the rare case that the programmer asks Support to install the patch directly on LIVE dataset, start by typing the following command in maintenance mode before commencing:&lt;br /&gt;
&lt;br /&gt;
 UTIL&lt;br /&gt;
&lt;br /&gt;
Follow the instructions mentioned in the [[Troubleshooting_NEOSYS_Generally#Installing_patch_in_test_database| next section]], but skip the instruction to TEST the patched program in test dataset.&lt;br /&gt;
&lt;br /&gt;
The instruction to INSTALL the patched program MUST be followed BEFORE testing the patch in live dataset. Otherwise the changes will not get reflected.&lt;br /&gt;
&lt;br /&gt;
===Installing patch in test database===&lt;br /&gt;
&lt;br /&gt;
1. EDIT the program source code.&lt;br /&gt;
&lt;br /&gt;
 TED programname&lt;br /&gt;
&lt;br /&gt;
If you have to edit or patch a program that starts with the word DICT. and the remainder of the program name is the same as a real file name e.g DICT.INVOICES, then you cannot omit and must type the actual source file name - in this case, &amp;quot;BP&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
Otherwise, if you just type &amp;quot;ED DICT.INVOICES&amp;quot; hoping to edit the DICT.INVOICES program in the BP file, then you will end up editing the dictionary of INVOICES, which is not what you are trying to do. Use the command below to edit such type of programs:&lt;br /&gt;
&lt;br /&gt;
 ED BP DICT.INVOICES&lt;br /&gt;
&lt;br /&gt;
If you want to patch line 8, i.e. the source code, of an S type dictionary then you can use TED for easier editing.&lt;br /&gt;
&lt;br /&gt;
 TED DICT.filename itemname &lt;br /&gt;
&lt;br /&gt;
Next either cut and paste to modify the whole program or edit the program text according to the patch/instructions provided.&lt;br /&gt;
&lt;br /&gt;
Save and close the program source code.&lt;br /&gt;
&lt;br /&gt;
2. COMPILE it. If you get errors then check your edits are correct and recompile otherwise return the patch to programming.&lt;br /&gt;
&lt;br /&gt;
In newer versions of NEOSYS, versions in and after April 2018, use the below command for compiling.&lt;br /&gt;
&lt;br /&gt;
 CO programname&lt;br /&gt;
&lt;br /&gt;
In older versions of NEOSYS, you will have to include the filename.&lt;br /&gt;
&lt;br /&gt;
 COMPILE filename programname&lt;br /&gt;
&lt;br /&gt;
3. TEST it. Ensure the patched program now works in TEST database.&lt;br /&gt;
&lt;br /&gt;
4. INSTALL the patched program in the LIVE database. &lt;br /&gt;
&lt;br /&gt;
For newer versions of NEOSYS, versions in and after April 2018, use the below command to copy from test to live.  &lt;br /&gt;
&lt;br /&gt;
 COPYBP programname&lt;br /&gt;
&lt;br /&gt;
For older versions of NEOSYS, depending on the filename that you patched, one of the following commands will have to be used.&lt;br /&gt;
&lt;br /&gt;
 COPYGBP programname&lt;br /&gt;
 COPYABP programname&lt;br /&gt;
 COPYBP programname&lt;br /&gt;
&lt;br /&gt;
==Patching NEOSYS dictionaries==&lt;br /&gt;
&lt;br /&gt;
A patch to a dictionary applies immediately when you save it and to all datasets regardless of which dataset you work in.&lt;br /&gt;
&lt;br /&gt;
You need:&lt;br /&gt;
&lt;br /&gt;
#the file name eg INVOICES&lt;br /&gt;
#the item name (column name) eg  DATETIME_AMENDED&lt;br /&gt;
#10 lines of data similar to the example below.&lt;br /&gt;
#if the item is an S type dictionary, then either the whole, or only the amended part, of the source code of the dictionary.&lt;br /&gt;
&lt;br /&gt;
 ED DICT INVOICES DATETIME_AMENDED&lt;br /&gt;
&lt;br /&gt;
TYPE everything below exactly on the corresponding line numbers except lines 3 and very commonly line 8, as these lines may contain multiple values separated by a superscript 2 (²). Line numbers in the below screen are only for illustrative purpose. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  ╔═══════════════════════════┤DATETIME_AMENDED├═════════════════════════╗&lt;br /&gt;
 1║S                                                                     ║&lt;br /&gt;
 2║                                                                      ║&lt;br /&gt;
 3║DateTime²Amended                                                      ║&lt;br /&gt;
 4║S                                                                     ║&lt;br /&gt;
 5║                                                                      ║&lt;br /&gt;
 6║                                                                      ║&lt;br /&gt;
 7║[DATETIME]                                                            ║&lt;br /&gt;
 8║updated=@record&amp;lt;28&amp;gt;²created=@record&amp;lt;31,1&amp;gt;²@ans=&#039;&#039;²if created and num(c║..actually this line continues off the screen to the right&lt;br /&gt;
 9║R                                                                     ║&lt;br /&gt;
10║10                                                                    ║&lt;br /&gt;
11║                                                                      ║&lt;br /&gt;
  :                                                                      :&lt;br /&gt;
  :                                                                      :&lt;br /&gt;
  ╚══════════════════════════════════════════════════════════════════════╝&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Press Ctrl+E on lines 3 or 8 in order to enter sub-lines. &lt;br /&gt;
&lt;br /&gt;
The multiple values (on line 3 and 8) separated by a superscript 2 (²) automatically appear when sub-lines are entered.&lt;br /&gt;
&lt;br /&gt;
For line 8, you will need to cut and paste the lines of below program to the Ctrl+E screen: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
╔═════════════════════════┤Field 8 of DATETIME_AMENDED├════════════════════════╗&lt;br /&gt;
║updated=@record&amp;lt;28&amp;gt;                                                           ║&lt;br /&gt;
║created=@record&amp;lt;31,1&amp;gt;                                                         ║&lt;br /&gt;
║@ans=&#039;&#039;                                                                       ║&lt;br /&gt;
║if created and num(created) and num(updated) then                             ║&lt;br /&gt;
║ createdsecs=field(created,&#039;.&#039;,1)*86400+field(created,&#039;.&#039;,2)                  ║&lt;br /&gt;
║ updatedsecs=field(updated,&#039;.&#039;,1)*86400+field(updated,&#039;.&#039;,2)                  ║&lt;br /&gt;
║ if abs(updatedsecs-createdsecs)&amp;gt;120 then                                     ║&lt;br /&gt;
║  @ans=updated                                                                ║&lt;br /&gt;
║  end                                                                         ║&lt;br /&gt;
║ end                                                                          ║&lt;br /&gt;
║                                                                              ║&lt;br /&gt;
║                                                                              ║&lt;br /&gt;
╚══════════════════════════════════════════════════════════════════════════════╝&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you save and exit the Ctrl+E screen, you will see the sublines separated by superscript 2 appear in one line in the ED screen. &lt;br /&gt;
&lt;br /&gt;
Similarly, for line 3, you need to enter its sub-lines in Ctrl+E screen.&lt;br /&gt;
&lt;br /&gt;
To ensure indenting remains nice (although indenting is not important and can be messed up without causing any problem) then copy the double bars at the front of the lines (if available, otherwise insert some char in position 1 of each line perhaps) and then remove them after you paste ... or just edit until the indenting is correct if you really want to.&lt;br /&gt;
&lt;br /&gt;
Press F9 and/or Esc to save and/or exit from Ctrl+E screen&lt;br /&gt;
&lt;br /&gt;
Press F9 and/or Esc to save and/or exit from ED&lt;br /&gt;
&lt;br /&gt;
==Linux Commands==&lt;br /&gt;
&lt;br /&gt;
This section is aimed teaching support, new to the Linux environment, how to navigate and use the most common useful commands.&lt;br /&gt;
&lt;br /&gt;
Use google or &amp;quot;man &amp;lt;programName&amp;gt;&amp;quot; to get the manual of a program. E.g &amp;quot;man man&amp;quot; gives you the MANual for the Manual program.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;|&amp;quot; use the pipe command to take output of one command and input into another. E.g Cmd: &amp;quot; Echo &amp;quot;ABC&amp;quot; | removeA | removeC &amp;quot;. Output = &amp;quot;B&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Typically commands assume you mean the current directory, if you don&#039;t specify which directory you want the command to perform in/on.&lt;br /&gt;
&lt;br /&gt;
Strings with spaces have to be wrapped in double quotation &amp;quot;May 14 01:30:55&amp;quot; before use as input to most commands.&lt;br /&gt;
&lt;br /&gt;
Follow this convention in wiki to understand the syntax (structure) of the Linux commands and options.&lt;br /&gt;
&lt;br /&gt;
Input wrapped in &amp;quot;&amp;lt;...&amp;gt;&amp;quot; is mandatory.&lt;br /&gt;
&lt;br /&gt;
Input wrapped in &amp;quot;[...]&amp;quot; is optional. &lt;br /&gt;
&lt;br /&gt;
===Searching for strings in one or many files using grep===&lt;br /&gt;
&lt;br /&gt;
Using the GUI with Ctrl + F is laborious and less powerful.&lt;br /&gt;
&lt;br /&gt;
Use grep command in Linux or Cygwin to search files especially when you are doing deep inspection of NEOSYS Logs. &lt;br /&gt;
&lt;br /&gt;
Use the following command to search for a string in any file or directory&lt;br /&gt;
&lt;br /&gt;
 grep &amp;lt;string&amp;gt; [path to file OR filename] [-r]&lt;br /&gt;
&lt;br /&gt;
Where &amp;quot;string&amp;quot; is the text to be searched and &amp;quot;-r&amp;quot; means recursive - check all files in all sub directories.&lt;br /&gt;
&lt;br /&gt;
 grep -i -a string path/file&lt;br /&gt;
&lt;br /&gt;
where &amp;quot;file&amp;quot; is the type of file you are looking for and &amp;quot;path&amp;quot; is the path of the directory you are looking into. Use &amp;quot;&amp;quot; when having spaces in your string.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;-i&amp;quot; means ignore upper/lower case characters in the string and &amp;quot;-a&amp;quot; means treat the file type as text and display the matching text)&lt;br /&gt;
&lt;br /&gt;
e.g when searching in NEOSYS logs the year/month/date is specified in the file name, so if you are looking for a file in year 2016 in the month of Feb, use&lt;br /&gt;
&lt;br /&gt;
 grep XXXX path/1602*&lt;br /&gt;
&lt;br /&gt;
In the above command * (asterisk) is a wildcard &amp;quot;means replace * with any thing&amp;quot; and is used when you don&#039;t know what that part of the command could be. &lt;br /&gt;
&lt;br /&gt;
E.g &amp;quot;*.jpg&amp;quot; means any file names that end with &amp;quot;.jpg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Sample below of grep command and its output where it is searching for &amp;quot;Dior&amp;quot; in 2016 march logs.&lt;br /&gt;
&lt;br /&gt;
 $ grep -i Dior /cygdrive/d/hosts/test/logs/test/2016/1603*&lt;br /&gt;
 Binary file path/16030301.XML matches&lt;br /&gt;
&lt;br /&gt;
Using * (asterisk), a string can also be searched globally across all installations on the server.&lt;br /&gt;
&lt;br /&gt;
Below example will search all files whose file names begin with &amp;quot;NEOS00&amp;quot;, in all client installation folders inside the &amp;quot;hosts&amp;quot; folder, for log entries containing text &amp;quot;5th June 2016&amp;quot;.&lt;br /&gt;
 $ grep -a &amp;quot;2016 JUN 05&amp;quot; /cygdrive/d/hosts/*/logs/NEOS00*|less&lt;br /&gt;
&lt;br /&gt;
Use the commands below to display the search string and required number of lines that come either after or before the search string, depending on what you enter in your command. It helps to get more information from files especially when you only know few words and the other information around the searched string also gets displayed. &lt;br /&gt;
&lt;br /&gt;
 grep -A&amp;lt;NUM&amp;gt; string file&lt;br /&gt;
&lt;br /&gt;
Above command will display the line where the searched string was found, and also display NUM lines after the searched text&lt;br /&gt;
&lt;br /&gt;
 grep -B&amp;lt;NUM&amp;gt; string file&lt;br /&gt;
&lt;br /&gt;
Above command will display the line where the searched string was found, and also display NUM lines before the searched text&lt;br /&gt;
&lt;br /&gt;
See the examples and their respective outputs below:&lt;br /&gt;
&lt;br /&gt;
 $ grep -A2 -i &amp;quot;Dior&amp;quot; 1603*&lt;br /&gt;
 Binary file 16032101.XML matches&lt;br /&gt;
 Binary file 16032901.XML matches&lt;br /&gt;
&lt;br /&gt;
 $ grep -A2 -a &amp;quot;Dior&amp;quot; 1603*&lt;br /&gt;
 16030301.XML:&amp;lt;DataOut&amp;gt;DIOR%FEPOI%FE&#039;&#039;&#039;Dior&#039;&#039;&#039; Poison%FE%FE%FE%FE%FEDubai,    UAE%FE%FE%FE%FEN%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FEN%FE%FE%FE17584.43592%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE1%FE%FE%FE%FE%FE%FE%FE%FE%FENEOSYS%FE17584.43592%FE94_200_49_146%FE1%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FEpaulson&amp;lt;/DataOut&amp;gt;&amp;lt;/Message&amp;gt;&lt;br /&gt;
 --&lt;br /&gt;
 16030301.XML:&amp;lt;DataOut&amp;gt;DIOR%FEPOI%FE&#039;&#039;&#039;Dior&#039;&#039;&#039; Poison%FE%FE%FE%FE%FEDubai,   UAE%FE%FE%FE%FEN%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FEN%FE%FE%FE17584.43592%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE1%FE%FE%FE%FE%FE%FE%FE%FE%FENEOSYS%FE17584.43592%FE94_200_49_146%FE1%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FE%FEpaulson&amp;lt;/DataOut&amp;gt;&amp;lt;/Message&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some more examples of grep below:&lt;br /&gt;
&lt;br /&gt;
Use the command below when searching for more than one string&amp;lt;br&amp;gt;&lt;br /&gt;
 grep -a string1 *|grep string2&lt;br /&gt;
&lt;br /&gt;
Use the below command to omit the lines containing specific strings in your search:&lt;br /&gt;
 grep -B2 -a Processing 160329*|grep -v DataIn|grep -v Message|less&amp;lt;br&amp;gt;&lt;br /&gt;
Above command will display lines containing string &amp;quot;Processing&amp;quot; and exclude lines containing string &amp;quot;DataIn&amp;quot; and &amp;quot;Message&amp;quot;, |&amp;quot;less&amp;quot; displays the output in a new screen.&lt;br /&gt;
&lt;br /&gt;
Use &amp;quot;zgrep&amp;quot; command to search in zip files:&lt;br /&gt;
 zgrep string1 /path |zgrep string2 |less&lt;br /&gt;
&lt;br /&gt;
===FIND===&lt;br /&gt;
&lt;br /&gt;
Use this find command to list all files/directories modified after a certain date.&lt;br /&gt;
&lt;br /&gt;
 find [path, if omitted means = current directory] [-type f,d] [-newermt &#039;MM/DD/YYYY HH:MM:SS&#039;]&lt;br /&gt;
&lt;br /&gt;
Or use a filename instead of date:&lt;br /&gt;
 &lt;br /&gt;
 find  -newer filename&lt;br /&gt;
&lt;br /&gt;
==Managing the queue of reports being delivered by email==&lt;br /&gt;
&lt;br /&gt;
In maintenance mode.&lt;br /&gt;
&lt;br /&gt;
===Listing===&lt;br /&gt;
&lt;br /&gt;
 LIST DOCUMENTS WITH SCHEDULED_ONCE&lt;br /&gt;
&lt;br /&gt;
===Clearing===&lt;br /&gt;
&lt;br /&gt;
 SELECT DOCUMENTS WITH SCHEDULED_ONCE&lt;br /&gt;
 DELETE DOCUMENTS&lt;br /&gt;
&lt;br /&gt;
==Reduce used disk space on NEOSYS or client hosted servers==&lt;br /&gt;
Non essential files getting accumulated over time can take up a lot of space on the hard disk resulting in low free space on the server. NEOSYS Client Monitoring system alerts about low free space for win3 server as it monitors the Disk Space of both C &amp;amp; D drive. To fix it Support team will have to create free space on the server.&lt;br /&gt;
&lt;br /&gt;
Making space on the server is time taking and requires patience as you need to go through all the files/folders looking for non-essential files. Do not make any assumptions for not looking into a folder.&lt;br /&gt;
&lt;br /&gt;
Non-essential files are the ones without which we can work properly and will continue to work in future.&lt;br /&gt;
&lt;br /&gt;
Support team should keep in mind the below points while creating space on the server:&lt;br /&gt;
&lt;br /&gt;
#Look into the drive for which nagios is alerting and dig into all the folders.&lt;br /&gt;
#Right click Folder &amp;gt; Properties &amp;gt; Size on Disk, to find out the size of a folder.&lt;br /&gt;
#On d drive majority of the space is taken by d:\hosts and d:\data.bak folder and on c drive it&#039;s taken up by the important windows/cygwin folders.&lt;br /&gt;
#The space distribution will give you an idea about which folders to target that can free up a good amount of space on clean up.&lt;br /&gt;
#Following are the non essential files/folders which can create a lot of space on removal. Use your intelligence and presence of mind while deleting files/folders because once deleted the information is lost forever.&lt;br /&gt;
#*Folder: d\data.bak. Check for stopped clients&#039; backups and delete if present.&lt;br /&gt;
#*Folder: d\hosts\clientname\logs (where clientname stands for all the client folders in hosts) Look into logs prior to the current year and the year before and delete them. In the recent versions of NEOSYS, log folders are compressed and take up a lot less space on disk than presented as their size. You can see the difference in their properties.&lt;br /&gt;
#*Folder: d\hosts\clientname\downloads. This folder might contain lot of old versions of neosys.exe files. Keep the two latest versions and delete the rest. Do this for all client folders except test installation because Support maintains all the old versions of neosys.exe in it.&lt;br /&gt;
#*Folder: d\hosts\old. In this folder, delete all client folders that are older than 1 year.&lt;br /&gt;
#*Apart from above folders look for random backup.zip files present in c/d drive. This happens when Support restores data from a zip file and forgets to delete it after the restore.&lt;br /&gt;
&lt;br /&gt;
To quickly get an idea of which directories consume the largest space, SSH onto server and use the &amp;quot;du&amp;quot; command along with various options, combined with command &amp;quot;sort&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;du&amp;quot; Disk Usage is used to estimate file space usage under a particular directory. Look up &amp;quot;sort&amp;quot; and &amp;quot;head&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Use this to find the estimate disk usage of each sub directory of every log directory in /hosts and then sort -n umerically and -r everse sort from high to low:&lt;br /&gt;
&lt;br /&gt;
 du /*/LOGS/*/20* --time  | sort -n -r&lt;br /&gt;
&lt;br /&gt;
Go to /hosts or D:/NEOSYS folder. Use command to get the estimate disk usage for all sub directories excluding directories where you know for certain files cannot be deleted.&lt;br /&gt;
(sort the directories by highest to lowest estimated disk usage in kb and then shows the top 20)&lt;br /&gt;
&lt;br /&gt;
 du --exclude={*/NEOSYS,*/neosys.net,*path/to/another/dir/that/cannot/be/deleted} --time | sort -r -n | head -n 20&lt;br /&gt;
&lt;br /&gt;
===Reduce used disk space on backup servers===&lt;br /&gt;
&lt;br /&gt;
If a server is scheduled to daily delete backup files older than 30 days, then there may be random files that are left behind for longer than 30 days, which are:&lt;br /&gt;
&lt;br /&gt;
*any xx/xx/31 files on months than are followed by months with only 30 days, since the backup procedure deletes the previous month&#039;s file on the same day and day 31 does not exist in all months and&lt;br /&gt;
*any &amp;quot;same day last month&amp;quot; files that were not deleted by the backup procedure because it did not run or did not complete.&lt;br /&gt;
&lt;br /&gt;
Use &amp;quot;crontab -l&amp;quot; to list all scheduled tasks, to find the how old a file must be before it is deleted.&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting Scripting Disabled error message on browser==&lt;br /&gt;
 Error: NEOSYS requires             You have&lt;br /&gt;
       1. Internet Explorer 6+&lt;br /&gt;
         or Safari 3.1+&lt;br /&gt;
         or Firefox 3+&lt;br /&gt;
         or Chrome 8.0+&lt;br /&gt;
       2. Scripting enabled       Scripting disabled&lt;br /&gt;
       3. Cookies enabled         Unknown&lt;br /&gt;
&lt;br /&gt;
[[image:IEtrb1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Follow steps in given link to fix Script disable error on browsers : https://wmich.edu/helpdesk/internetenablecookies&lt;br /&gt;
&lt;br /&gt;
==[[Configuring_IIS#Solving_.22Service_unavailable.22_error_due_to_disabled_application_pool | Handling &#039;Service Unavailable&#039; on browser due to IIS issue]]==&lt;br /&gt;
&lt;br /&gt;
==Searching for users with a particular email address==&lt;br /&gt;
&lt;br /&gt;
In maintenance mode &lt;br /&gt;
 &lt;br /&gt;
 FIND USERS XX@YY.COM&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Configuring_IIS&amp;diff=3658</id>
		<title>Configuring IIS</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Configuring_IIS&amp;diff=3658"/>
		<updated>2019-12-02T21:34:15Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Solving &amp;quot;HTTP Error 503. The service is unavailable.&amp;quot; */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;After you have installed all the NEOSYS program files you need to configure IIS so that you can operate NEOSYS. Instructions are below.&lt;br /&gt;
&lt;br /&gt;
== Configuring IIS for windows 2003 ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a new website in IIS ===&lt;br /&gt;
&lt;br /&gt;
First step is to stop the default website in IIS. Right click on Default Web Site and select &amp;quot;Stop&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Create a website called neosys linked to D:\neosys\neosys.net:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3 Server:&#039;&#039;&#039; Create a website called &amp;quot;clientname&amp;quot; linked to D:\hosts\clientfolder\neosys.net &lt;br /&gt;
&lt;br /&gt;
[[image:figure1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[image:figure3.jpg]]&lt;br /&gt;
&lt;br /&gt;
A new window will pop up &amp;quot;IP Address and Port Setting&amp;quot; after completion of the above step.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039;  Select *(All Unassigned)* from the drop down list of &amp;quot;Enter the IP address to use for the Web site&amp;quot; and keep the default port as 80. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3 Server:&#039;&#039;&#039; Select the static Ip from the drop down list of &amp;quot;Enter the IP address to use for the Web site&amp;quot; and enter then next port available and click on next.&lt;br /&gt;
&lt;br /&gt;
[[image:Figure_2.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Within the above neosys web site folder create a virtual directory called data linked to D:\neosys\data: &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3 Server:&#039;&#039;&#039; Within the above clientwebsite folder create a virtual directory called data linked to D:\hosts\clientfolder\data:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;(I haven’t got the screenshot because I can only get it once I create the above)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== To allow file uploads ===&lt;br /&gt;
&lt;br /&gt;
==== Create IMAGES directory ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client server:&#039;&#039;&#039; create a folder IMAGES under D:\neosys and within the neosys web site folder create a virtual directory called images linked to D:\neosys\images: Modes: READ and WRITE&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3 Server:&#039;&#039;&#039; create a folder IMAGES under D:\hosts\clientfolder and within the client web site folder create a virtual directory called images linked to D:\hosts\clientfolder\images: Modes: READ and WRITE&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;(I haven’t got the screenshot because I can only get it once I create the above)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Permit upload.dll ====&lt;br /&gt;
&lt;br /&gt;
# Right click on dll ( Default Web Site, neosys, NEOSYS, dll) &lt;br /&gt;
# Under Permissions set Execute Permissions: Scripts and Executables&lt;br /&gt;
&lt;br /&gt;
# Internet Information Services (IIS) Manager&lt;br /&gt;
# Web Service Extensions&lt;br /&gt;
# All Unknown ISAPI Extensions: Allowed&lt;br /&gt;
&lt;br /&gt;
=== Create &amp;quot;Cache-Control&amp;quot; HTTP Header ===&lt;br /&gt;
&lt;br /&gt;
This custom HTTP Header is created so that users will not have to clear browser cache after a NEOSYS upgrade.&lt;br /&gt;
&lt;br /&gt;
#Right click on neosys (Web Sites, neosys)&lt;br /&gt;
#Select Properties and click on the HTTP Headers tab&lt;br /&gt;
#Add a new custom HTTP Header with &amp;quot;Cache-Control&amp;quot; as header name and &amp;quot;public,max-age=300&amp;quot; as the header value.&lt;br /&gt;
&lt;br /&gt;
[[File:cacheheader.png]]&lt;br /&gt;
&lt;br /&gt;
===[[Backing_up_and_Restoring_IIS_configuration#Set_IIS_automatic_backup_location_to_d:| Set IIS automatic backup location to D:]] ===&lt;br /&gt;
&lt;br /&gt;
== Installing IIS for Windows 2008 ==&lt;br /&gt;
&lt;br /&gt;
First install IIS from Control Panel &amp;gt; Programs &amp;amp; Features &amp;gt; Turn Windows Features ON or OFF &amp;gt; Add Roles:&lt;br /&gt;
&lt;br /&gt;
[[image:iis1.jpg]]&lt;br /&gt;
&lt;br /&gt;
On the window that pops up click on next and you will get this screen, tick Web Server (IIS) - on the prompt click on Add Required Resources and then on Next:&lt;br /&gt;
&lt;br /&gt;
[[image:iis2.jpg]]&lt;br /&gt;
&lt;br /&gt;
On the next window, click on next until you get this window - tick ASP and ISAPI Extensions:&lt;br /&gt;
&lt;br /&gt;
[[image:iis3.jpg]]&lt;br /&gt;
&lt;br /&gt;
Click on Next and Finish&lt;br /&gt;
&lt;br /&gt;
== Configuring IIS for Windows 2008 and Windows 10==&lt;br /&gt;
===Create a new Website===&lt;br /&gt;
After successfully installing IIS, go to Control Panel &amp;gt; Administrative Tools &amp;gt; Computer Management &amp;gt; Services and Applications &amp;gt; Internet Information Services (IIS) &amp;gt; Machine Name &amp;gt; Sites &amp;gt; Default Website. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; &lt;br /&gt;
#Stop the Default Website.&lt;br /&gt;
#Right click on Sites folder and click on Add Website.&lt;br /&gt;
#Create a website called &#039;&#039;&#039;neosys&#039;&#039;&#039; and linked to {{Client server Installation Location}}neosys.net as shown in the screenshot below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; &lt;br /&gt;
#Right click on Sites folder and click on Add Website. &lt;br /&gt;
#Create a website called &amp;quot;clientname&amp;quot; linked to {{NEOSYS server Installation Location}}neosys.net as shown in screenshot below.&lt;br /&gt;
#Since win3 is not connected to any LAN and exclusively serves https only, therefore setup a https binding only with a port number which is unique, unused and one greater than the previous port used in the series which is 4431 onwards. The highest port number used in this series can be found by checking IIS manager -&amp;gt; NEOSYS -&amp;gt;Sites.&lt;br /&gt;
&lt;br /&gt;
Refer to [[Setting_up_HTTPS#Creating_multiple_HTTPS_web_sites_on_NEOSYS_hosted_server| setting up the https for a site on NEOSYS hosted server]] for details.&lt;br /&gt;
&lt;br /&gt;
[[image:iis4.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Link Data Folder===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Within the neosys website folder create a virtual directory called &#039;&#039;&#039;data&#039;&#039;&#039; linked to {{Client server Installation Location}}data&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; Within the &amp;quot;clientname&amp;quot; website folder create a virtual directory called &#039;&#039;&#039;data&#039;&#039;&#039; linked to {{NEOSYS server Installation Location}}data &lt;br /&gt;
&lt;br /&gt;
[[image:iis5.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Allow file uploads===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; create a folder &#039;&#039;&#039;images&#039;&#039;&#039; under D:\neosys and within the neosys web site folder create a virtual directory called &#039;&#039;&#039;images&#039;&#039;&#039; linked to {{Client server Installation Location}}images&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; create a folder &#039;&#039;&#039;images&#039;&#039;&#039; under D:\hosts\clientfolder and within the &amp;quot;clientname&amp;quot; website folder create a virtual directory called &#039;&#039;&#039;images&#039;&#039;&#039; linked to {{NEOSYS server Installation Location}}images&lt;br /&gt;
&lt;br /&gt;
[[image:iis7.jpg]]&lt;br /&gt;
&lt;br /&gt;
After you add all virtual directories the tree map of the website should look as follows:&lt;br /&gt;
&lt;br /&gt;
[[image:iis8.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Configure file uploads besides adding the images directory===&lt;br /&gt;
&lt;br /&gt;
#In IIS open Handler mappings in the top server level&lt;br /&gt;
#Right click ISAPI-dll and choose Edit Feature Permissions&lt;br /&gt;
#Check Execute and save.&lt;br /&gt;
&lt;br /&gt;
This is already setup for win3&lt;br /&gt;
&lt;br /&gt;
[[image: iisisapi.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For single site servers follow the steps below only if file upload does not work in NEOSYS after doing the above.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Go under IIS &amp;gt; Default Website &amp;gt; neosys&lt;br /&gt;
&lt;br /&gt;
Click on Handler Mappings and delete the ISAPI you see there&lt;br /&gt;
&lt;br /&gt;
[[image:iis9a.jpg]]&lt;br /&gt;
&lt;br /&gt;
Thereafter click on Add Script Map and fill in the details as follows – &lt;br /&gt;
&lt;br /&gt;
Request path: *.dll &lt;br /&gt;
&lt;br /&gt;
Executable: {{Client server Installation Location}}neosys.net\NEOSYS\dll\upload.dll&lt;br /&gt;
&lt;br /&gt;
Name: ISAPI &lt;br /&gt;
&lt;br /&gt;
Click on OK and on YES in the confirmation box&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:iis9b.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[image:hm.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Editing the hosts file===&lt;br /&gt;
Edit the hosts file under c:\windows\system32\drivers\etc\ - delete the # sign next to 127.0.0.1 localhost and include the # sign before ::1 localhost&lt;br /&gt;
&lt;br /&gt;
[[image:iis10.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== IIS web page caching ===&lt;br /&gt;
&lt;br /&gt;
Webpage cache is set to 5 mins in neosys.net/web.config on Windows 2008/10 and in IIS configuration on Windows 2003.&lt;br /&gt;
&lt;br /&gt;
If a NEOSYS user opens a web page 5 mins after the file was updated then their computer will get the latest version.&lt;br /&gt;
&lt;br /&gt;
If support team is patching and wants to test without waiting for 5 mins then they will have to press Ctrl+F5 to refresh or perhaps even clear their cache using the usual methods.&lt;br /&gt;
&lt;br /&gt;
===[[Backing_up_and_Restoring_IIS_configuration#Set_IIS_automatic_backup_location_to_d:| Set IIS automatic backup location to D:]] ===&lt;br /&gt;
&lt;br /&gt;
== Disabling unsecure SSL3 protocol on Windows IIS web server ==&lt;br /&gt;
&lt;br /&gt;
POODLE is an information leakage attack on client browsers while accessing web server that support the older SSL3 protocol. It is easy to prevent it by reconfiguring web servers to not support SSL3.&lt;br /&gt;
&lt;br /&gt;
=== Securing IIS web server on win2003 and 2008 by disabling unsafe SSL3 protocol ===&lt;br /&gt;
&lt;br /&gt;
#For Systems with https installed check if the web server is vulnerable (see [[Configuring_IIS#Testing_for_IIS_vulnerability| Testing for IIS vulnerability]] ). For systems with no https installed,continue to step2 to prevent SSL3 accidentally being enabled if https is installed in the server in future and then test for vulnerability.&lt;br /&gt;
# run the following commands on the server&lt;br /&gt;
#reg add &amp;quot;HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Server&amp;quot;  /t REG_DWORD  /v Enabled  /d 0 /f&lt;br /&gt;
#reg add &amp;quot;HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server&amp;quot;  /t REG_DWORD  /v Enabled  /d 0 /f&lt;br /&gt;
#reg add &amp;quot;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 40/128&amp;quot;  /t REG_DWORD  /v Enabled  /d 0 /f&lt;br /&gt;
#reg add &amp;quot;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 56/128&amp;quot;  /t REG_DWORD  /v Enabled  /d 0 /f&lt;br /&gt;
#reg add &amp;quot;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 64/128&amp;quot;  /t REG_DWORD  /v Enabled  /d 0 /f&lt;br /&gt;
#reg add &amp;quot;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 128/128&amp;quot;  /t REG_DWORD  /v Enabled  /d 0 /f&lt;br /&gt;
#Reboot the server (at any time later using standard NEOSYS rebooting procedure without disturbing users)&lt;br /&gt;
#Perform the diagnostic for vulnerability&lt;br /&gt;
&lt;br /&gt;
=== Testing for IIS vulnerability ===&lt;br /&gt;
==== A. Determine host and port and where to test from ==== &lt;br /&gt;
If you have a public https server that you can access like https://demo.neosys.com:443, in a linux command prompt eg nagios login:&lt;br /&gt;
&lt;br /&gt;
*$HOST for host name like demo.neosys.com&lt;br /&gt;
*$PORT with something like 443 or 4430 depending on port forwarding on the public router&lt;br /&gt;
&lt;br /&gt;
or if testing a private https server with no public access, using a cygwin installation on the same server in the cygwin prompt:&lt;br /&gt;
&lt;br /&gt;
*$HOST for host name like 127.0.0.1&lt;br /&gt;
*$PORT with something like 443 or 4430 as per IIS manager configuration&lt;br /&gt;
&lt;br /&gt;
If https is enabled on the server/website and you are able to access the website via https using a browser, then you must be able to test for openssl on the same browsed host and port. You must also test this locally to ensure that the right server is being fixed. If the website is not public, then https must not be enabled, which means there is no reason for using cygwin openssl.&lt;br /&gt;
&lt;br /&gt;
==== B. Check you CAN connect to https server using TLS ====&lt;br /&gt;
&lt;br /&gt;
 openssl s_client -host $HOST -port $PORT&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nagios@vm1m:~$ echo|openssl s_client -host demo.neosys.com -port 443&lt;br /&gt;
CONNECTED(00000003)&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=20:unable to get local issuer certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=21:unable to verify the first certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
---&lt;br /&gt;
Certificate chain&lt;br /&gt;
 0 s:/CN=demo.neosys.com&lt;br /&gt;
   i:/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
Server certificate&lt;br /&gt;
-----BEGIN CERTIFICATE-----&lt;br /&gt;
MIIB2DCCAUWgAwIBAgIQd0J0l4kJrpJHonAv5U8VLjAJBgUrDgMCHQUAMBoxGDAW&lt;br /&gt;
BgNVBAMTD2RlbW8ubmVvc3lzLmNvbTAeFw0wODA3MjcxOTUxMDNaFw0zNTEyMTIx&lt;br /&gt;
OTUxMDNaMBoxGDAWBgNVBAMTD2RlbW8ubmVvc3lzLmNvbTCBnzANBgkqhkiG9w0B&lt;br /&gt;
AQEFAAOBjQAwgYkCgYEAxzwtoqq49vV7pyBQ6Ej+PvbB1QxkdsxNn5EZSLSOppCb&lt;br /&gt;
jNjV8fFa98unPR0pGM0UdjWMUYodj12c2pnIrfrtXv7pYf+iC1corPEY7607Icbs&lt;br /&gt;
rSOc5aFwnlUYpktoysV1G1crGYgYgXbXgVOUO9phHXJarpKf6SjVw3uXTLlmPUkC&lt;br /&gt;
AwEAAaMnMCUwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDgYDVR0PBAcDBQCwAAAAMAkG&lt;br /&gt;
BSsOAwIdBQADgYEAmgyW60pT62JuM8GH+KogHW7viaMsifXitm3BC/GfaORpJCox&lt;br /&gt;
aS20fAlzGyAlDe9nZWN4roLSxQv0laJkxyNPDuHvLJt1l0FVdk6/vGB6QH0KqM+S&lt;br /&gt;
UaUTLsDZ99UNS/inotobxD9vXuKl58Uoe2lu7r9vJ+1DWDC6AyueSZ6xnno=&lt;br /&gt;
-----END CERTIFICATE-----&lt;br /&gt;
subject=/CN=demo.neosys.com&lt;br /&gt;
issuer=/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
No client certificate CA names sent&lt;br /&gt;
---&lt;br /&gt;
SSL handshake has read 635 bytes and written 411 bytes&lt;br /&gt;
---&lt;br /&gt;
New, TLSv1/SSLv3, Cipher is AES128-SHA&lt;br /&gt;
Server public key is 1024 bit&lt;br /&gt;
Secure Renegotiation IS supported&lt;br /&gt;
Compression: NONE&lt;br /&gt;
Expansion: NONE&lt;br /&gt;
SSL-Session:&lt;br /&gt;
    Protocol  : TLSv1&lt;br /&gt;
    Cipher    : AES128-SHA&lt;br /&gt;
    Session-ID: 8A0A00002D51DE183AC2845C6B3FF4BC7485181B4DCBC1758E3A2D5399BDD71C&lt;br /&gt;
    Session-ID-ctx:&lt;br /&gt;
    Master-Key: B10B9370E4DF70E873873AB9851B3CEF19623E6ADA697955E375D931DEE8301D798B4CB14C8D33FCF1BA066C0CC23897&lt;br /&gt;
    Key-Arg   : None&lt;br /&gt;
    PSK identity: None&lt;br /&gt;
    PSK identity hint: None&lt;br /&gt;
    SRP username: None&lt;br /&gt;
    Start Time: 1413885416&lt;br /&gt;
    Timeout   : 300 (sec)&lt;br /&gt;
    Verify return code: 21 (unable to verify the first certificate)&lt;br /&gt;
---&lt;br /&gt;
DONE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== C. Check that you cannot CANNOT to https server using SSL3 ====&lt;br /&gt;
&lt;br /&gt;
 openssl s_client -ssl3 -host $HOST -port $PORT&lt;br /&gt;
&lt;br /&gt;
==== CAN CONNECT = VULNERABLE = NOT OK ====&lt;br /&gt;
&lt;br /&gt;
If you get this then you need to configure the server to prevent SSL3&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nagios@vm1m:~$ echo xxx|openssl s_client -ssl3 -host demo.neosys.com -port 4430&lt;br /&gt;
gethostbyname failure&lt;br /&gt;
connect:errno=0&lt;br /&gt;
nagios@vm1m:~$ echo xxx|openssl s_client -ssl3 -host demo.neosys.com -port 4430&lt;br /&gt;
CONNECTED(00000003)&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=20:unable to get local issuer certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=21:unable to verify the first certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
---&lt;br /&gt;
Certificate chain&lt;br /&gt;
 0 s:/CN=demo.neosys.com&lt;br /&gt;
   i:/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
Server certificate&lt;br /&gt;
-----BEGIN CERTIFICATE-----&lt;br /&gt;
MIIB3jCCAUugAwIBAgIQNj9FMjT1vIxGo2Mv2Ta9vzAJBgUrDgMCHQUAMB0xGzAZ&lt;br /&gt;
BgNVBAMTEmFkbGluZWQubmVvc3lzLmNvbTAeFw0wODAzMjUxMTIxMzFaFw0zNTA4&lt;br /&gt;
MTAxMTIxMzFaMB0xGzAZBgNVBAMTEmFkbGluZWQubmVvc3lzLmNvbTCBnzANBgkq&lt;br /&gt;
hkiG9w0BAQEFAAOBjQAwgYkCgYEArRuijA8jz3qBm2ZZEwITIJLWIMlQmZxcUvOo&lt;br /&gt;
HNZL0+3oJuX0AQqtpRZMp/7ob9agngfwJQ36vK+424zcBbmKxA2MweKZRalN2jz+&lt;br /&gt;
rdr1oeZ6/Ff3r8+rCPFj/B8CfMOQbSv6YcR0kVc+8ugybB7qT6Nq5ZWOAczG3Ikt&lt;br /&gt;
4EnOlqUCAwEAAaMnMCUwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDgYDVR0PBAcDBQCw&lt;br /&gt;
AAAAMAkGBSsOAwIdBQADgYEAHIq5Gn2LiMgXFaUYrFEfHeajD4jAwdFw+zrjcBDZ&lt;br /&gt;
qM9LnhndHhdPogow9m9cCv1n57ne9rZL1v7w7Y6C53359hTUVZFqtHFfzcWnNyKD&lt;br /&gt;
uHD9a8QDk6/dSwBr/SWIE6OdFUYAj/kDXRQNB5H459spRVa3Yws8vpwrWZhoklxq&lt;br /&gt;
CQg=&lt;br /&gt;
-----END CERTIFICATE-----&lt;br /&gt;
subject=/CN=demo.neosys.com&lt;br /&gt;
issuer=/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
No client certificate CA names sent&lt;br /&gt;
---&lt;br /&gt;
SSL handshake has read 649 bytes and written 342 bytes&lt;br /&gt;
---&lt;br /&gt;
New, TLSv1/SSLv3, Cipher is RC4-MD5&lt;br /&gt;
Server public key is 1024 bit&lt;br /&gt;
Secure Renegotiation IS supported&lt;br /&gt;
Compression: NONE&lt;br /&gt;
Expansion: NONE&lt;br /&gt;
SSL-Session:&lt;br /&gt;
    Protocol  : SSLv3&lt;br /&gt;
    Cipher    : RC4-MD5&lt;br /&gt;
    Session-ID: 441A0000EBC1D634B2CDB12924F9B980D2A4CF8C4DD6D3FB9728D3C74F62A8FE&lt;br /&gt;
    Session-ID-ctx:&lt;br /&gt;
    Master-Key: 38F040BE3E7098857B7CB9FF3B44937786F8F8C002B0042370B29F20EFB582833F9E24CFC8E6560AFD06751DC93412D3&lt;br /&gt;
    Key-Arg   : None&lt;br /&gt;
    PSK identity: None&lt;br /&gt;
    PSK identity hint: None&lt;br /&gt;
    SRP username: None&lt;br /&gt;
    Start Time: 1413885545&lt;br /&gt;
    Timeout   : 7200 (sec)&lt;br /&gt;
    Verify return code: 21 (unable to verify the first certificate)&lt;br /&gt;
---&lt;br /&gt;
DONE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== CANNOT CONNECT = NOT VULNERABLE = OK ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nagios@vm1m:~$ echo|openssl s_client -ssl3 -host demo.neosys.com -port 443&lt;br /&gt;
CONNECTED(00000003)&lt;br /&gt;
write:errno=104&lt;br /&gt;
---&lt;br /&gt;
no peer certificate available&lt;br /&gt;
---&lt;br /&gt;
No client certificate CA names sent&lt;br /&gt;
---&lt;br /&gt;
SSL handshake has read 0 bytes and written 0 bytes&lt;br /&gt;
---&lt;br /&gt;
New, (NONE), Cipher is (NONE)&lt;br /&gt;
Secure Renegotiation IS NOT supported&lt;br /&gt;
Compression: NONE&lt;br /&gt;
Expansion: NONE&lt;br /&gt;
SSL-Session:&lt;br /&gt;
    Protocol  : SSLv3&lt;br /&gt;
    Cipher    : 0000&lt;br /&gt;
    Session-ID:&lt;br /&gt;
    Session-ID-ctx:&lt;br /&gt;
    Master-Key:&lt;br /&gt;
    Key-Arg   : None&lt;br /&gt;
    PSK identity: None&lt;br /&gt;
    PSK identity hint: None&lt;br /&gt;
    SRP username: None&lt;br /&gt;
    Start Time: 1413885702&lt;br /&gt;
    Timeout   : 7200 (sec)&lt;br /&gt;
    Verify return code: 0 (ok)&lt;br /&gt;
---&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enabling Internet Explorer 6 to access secured https web servers ===&lt;br /&gt;
&lt;br /&gt;
To use Internet explorer 6 (on win2003 and XP-before-SP3) to access secured http web sites you need to enable IE6 to use TLS 1.0. Internet Explorer 6 is present in Windows Server 2003 and Windows XP-pre-SP3.&lt;br /&gt;
&lt;br /&gt;
You can also disable SSL 2.0 and SSL 3.0 for additional safety. This good for later versions of Internet Explorer too.&lt;br /&gt;
&lt;br /&gt;
[[File:IE_options.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Generating IIS certificates for https using openssl ==&lt;br /&gt;
&lt;br /&gt;
This covers the two main type of certificates:&lt;br /&gt;
&lt;br /&gt;
#&amp;quot;proper&amp;quot; certificates (accepted by all browsers without complaint) - issued by bona fide certification authority only on proof of control of a domain name - usually for a small fee&lt;br /&gt;
#&amp;quot;self signed&amp;quot; certificates (not accepted by all browsers without error messages without special configuration) - easily&lt;br /&gt;
issued by anybody without the slightest restriction&lt;br /&gt;
&lt;br /&gt;
NEOSYS&#039; proper https certificate for *.hosts.neosys.com, valid approx Jan-Dec 2016, issued by Comodo, was purchased from namecheap.com for a small fraction of the price of purchasing from Comodo or one of the other main certification authorities.&lt;br /&gt;
&lt;br /&gt;
There is no technical requirement to renew certificates with the same issuing authority, nor is their any restriction whatsoever from having multiple concurrent overlapping certificates, in any combination, for the the same domain name or subsets of a domain name. For a certificate to be &amp;quot;proper&amp;quot; it merely has to be issued by (not necessarily purchased from) one of the certificate authorities registered in all the main browsers using by NEOSYS clients. Unlike DNS domain name registrars, of which you can only have one at any one time, and which take to change, certificates are simply installed in particular servers without reference to each other, nor to any imaginary central internet registry, as IS the case for the DNS domain name registry.&lt;br /&gt;
&lt;br /&gt;
The sales of certificates is a bit of scam really because anybody can get a certificate from the main commercial certificate authorities merely by proving control over a domain name - for example, by receiving an email to ADMIN@xxxxx.com. Except for EV certificates such as those issued to banks etc, most https certificates are issued without any check on physical identity or reputation, therefore the cost of issuing https certificates rests merely on the fact that the certification authority has managed to inveigle itself into all the main browsers and have their public key installed along with the browser software. Hoowever, the market seems to be collapsing, with even free certificate authorities appearing although with some minor limitations like short duration of validity of certificates.&lt;br /&gt;
&lt;br /&gt;
Excellent summary of using openssl to manage certificates .. no Alternate Names though&lt;br /&gt;
https://www.digitalocean.com/community/tutorials/openssl-essentials-working-with-ssl-certificates-private-keys-and-csrs&lt;br /&gt;
&lt;br /&gt;
Excellent summary of selfsigned and properly signed certificate&lt;br /&gt;
https://httpd.apache.org/docs/2.4/ssl/ssl_faq.html&lt;br /&gt;
&lt;br /&gt;
==== Commentary on https security ====&lt;br /&gt;
&lt;br /&gt;
With the general move to using https instead of http after the Snowdon revelations, people have begun to better understand how https certificates really work. People are more aware now that most https certificates mean little more than that their communication with the server is a) confidential b) not tampered with c) is truly with the server/domain name apparent and not some other. ALL WITH THE EXCEPTION OF *ANYBODY* WHO IS A CERTIFICATE AUTHORITY REGISTERED IN THE MAIN BROWSERS - WHICH IS MANY - INCLUDING NON-FRIENDLY NATIONAL STATE ACTORS!&lt;br /&gt;
&lt;br /&gt;
It is possible however to be virtually certain of confidentiality and accuracy of your communication using standard browsers, EVEN VERSUS CERTIFICATION AUTHORITIES. If, by inspecting the certificate when you are browsing a particular web site, you can satisfy  yourself that it is in fact truly the one in use by the web server, the chances of your communication being secure is virtually 100% The only chance is some failure in fundamental encryption protocols. Such failures would either be public knowledge very quickly, or not used versus you, for fear of it becoming public knowledge, unless you really have something incredibly valuable to hide. In this sense, self-certified certificates are the most secure, since you can obtain them by some other secure channel directly from the web server operator and do not change without your action. Note that in order to ensure that a certificate does not change during your session, to say an unknown valid certificate that breaks your security, your browser must support certificate pinning, in which case the browser will either prevent, or inform you if the certificate for the web site changes, either between or within sessions.&lt;br /&gt;
&lt;br /&gt;
To gain a practical understanding of the issues raised if you trust the certification authorities built in to your browser, consider the fact that many companies require an additional certificate authority to be installed in all corporate browsers (and in some famous cases have installed it covertly), and thereafter all https communications are decrypted in the company firewall/proxy using the corporate certificate, checked for content and reencrypted with the true certificate before being passed on - or vice versa, depending on the direction of flow of information. This, for example means that an employee accessing their bank account would be completely exposed to the corporate gaze. Two factor security would prevent corporate interference in say, instructions to make payments, but all information would be exposed and probably logged in possibly long term records. The same would apply to all https web sites accessed by the employee. Courts seem to agree that corporations have every right to do this but the average person is commonly not aware of it. If a person understood how https security works, they could inspect the https certificate to make sure it is the correct (same one issued by their bank apparent at home for example), since it is unlikely that an adversary (or in this case their employer) would control their actual browser software, but security is an arms race and once everybody knows how to defend themselves, adversaries and security operators will simply move to the next level. The next level may be preventing users from using their own browsers. This is already the case in most secure environment, but not all, and BYOD attitudes may prevail in the long run. Whatever the issues are in this case, the same general principle apply in other situations involving security.&lt;br /&gt;
&lt;br /&gt;
=== Generating a self signed certificate in pfx form for IIS ===&lt;br /&gt;
&lt;br /&gt;
Generating certificates and keys https://httpd.apache.org/docs/2.4/ssl/ssl_faq.html&lt;br /&gt;
&lt;br /&gt;
Generating a pfx using openssl https://langui.sh/2009/01/24/generating-a-pkcs12-pfx-via-openssl/&lt;br /&gt;
&lt;br /&gt;
==== Generate standard cert and key pair ====&lt;br /&gt;
&lt;br /&gt;
First generate a matching pair of certificate and key files (x509 and rsa format respectively)&lt;br /&gt;
&lt;br /&gt;
Example for *.mydomain and validity 9999 days from now&lt;br /&gt;
&lt;br /&gt;
 signer=self&lt;br /&gt;
 mydomain=neosys.com&lt;br /&gt;
 mydomains=*.neosys.com&lt;br /&gt;
 expirydays=9999&lt;br /&gt;
 keyno=`date`&lt;br /&gt;
 certno=$keyno&lt;br /&gt;
 #&lt;br /&gt;
 certfilename=$mydomain-$signer-$certno.cer&lt;br /&gt;
 keyfilename=$mydomain-$keyno.key&lt;br /&gt;
 #&amp;quot;-nodes&amp;quot; means -no-DES ie no encryption ie generate a key file without encrypting it and therefore without requiring a password on it&lt;br /&gt;
 openssl req -new -x509 -nodes -days $expirydays -out &amp;quot;$certfilename&amp;quot; -keyout &amp;quot;$keyfilename&amp;quot; \&lt;br /&gt;
     -subj &amp;quot;/C=AE/ST=DUBAI/O=NEOSYS/CN=*.neosys.com&amp;quot; \&lt;br /&gt;
     -reqexts SAN     -config &amp;lt;(cat /etc/ssl/openssl.cnf \&lt;br /&gt;
      &amp;lt;(printf &amp;quot;[SAN]\nsubjectAltName=DNS:*.hosts.neosys.com,DNS:*.support.neosys.com&amp;quot;)) \&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Consider adding subject and subject alternative names&lt;br /&gt;
&lt;br /&gt;
 openssl x509 -req -new -sha256 \&lt;br /&gt;
     -newkey rsa:2048 \&lt;br /&gt;
     -keyout neosys.com-102.key \&lt;br /&gt;
     -subj &amp;quot;/C=AE/ST=DUBAI/O=NEOSYS/CN=*.neosys.com&amp;quot; \&lt;br /&gt;
     -reqexts SAN     -config &amp;lt;(cat /etc/ssl/openssl.cnf \&lt;br /&gt;
      &amp;lt;(printf &amp;quot;[SAN]\nsubjectAltName=DNS:*.hosts.neosys.com,DNS:*.support.neosys.com&amp;quot;)) \&lt;br /&gt;
     -out neosys.com-102.crt \&lt;br /&gt;
     -nodes \&lt;br /&gt;
     -days 9999&lt;br /&gt;
&lt;br /&gt;
Example session:&lt;br /&gt;
&lt;br /&gt;
 Country Name (2 letter code) [AU]:AE&lt;br /&gt;
 State or Province Name (full name) [Some-State]:DUBAI&lt;br /&gt;
 Locality Name (eg, city) []:DUBAI&lt;br /&gt;
 Organization Name (eg, company) [Internet Widgits Pty Ltd]:NEOSYS&lt;br /&gt;
 Organizational Unit Name (eg, section) []:IT&lt;br /&gt;
 Common Name (e.g. server FQDN or YOUR name) []:*.neosys.com&lt;br /&gt;
 Email Address []:it@neosys.com&lt;br /&gt;
&lt;br /&gt;
=== Generating a properly signed certificate ===&lt;br /&gt;
&lt;br /&gt;
http://wiki.gandi.net/en/ssl/csr#sha-2_certificate_request&lt;br /&gt;
&lt;br /&gt;
==== Generate key and CSR file ====&lt;br /&gt;
&lt;br /&gt;
A certificate signing request file (.csr) for *.hosts.neosys.com (wildcard certificate)&lt;br /&gt;
&lt;br /&gt;
if you are renewing (and want to reuse an existing secret server key file mydomain.key, although not clear on the benefit ATM)&lt;br /&gt;
&lt;br /&gt;
 openssl req -new -nodes -sha256 -key mydomain.key -subj &amp;quot;/C=AE/ST=DUBAI/O=NEOSYS/CN=*.hosts.neosys.com&amp;quot; -out mydomain.csr&lt;br /&gt;
&lt;br /&gt;
or if you want to generate a new secret server key file&lt;br /&gt;
&lt;br /&gt;
 openssl req -new -nodes -sha256 -newkey rsa:2048 -keyout mydomain.key -subj &amp;quot;/C=AE/ST=DUBAI/O=NEOSYS/CN=*.hosts.neosys.com&amp;quot; -out mydomain.csr&lt;br /&gt;
&lt;br /&gt;
or if you want to request SAN subdomain wildcards (unlikely to be granted by main cert authorities but perfectly legal and can be self certified)&lt;br /&gt;
&lt;br /&gt;
 openssl req -new -nodes -sha256 -newkey rsa:2048 -keyout mydomain.key -subj &amp;quot;/C=AE/ST=DUBAI/O=NEOSYS/CN=*.neosys.com&amp;quot; -out mydomain.csr \&lt;br /&gt;
     -reqexts SAN     -config &amp;lt;(cat /etc/ssl/openssl.cnf \&lt;br /&gt;
        &amp;lt;(printf &amp;quot;[SAN]\nsubjectAltName=DNS:neosys.com,DNS:*.neosys.com,DNS:*.support.neosys.com,DNS:*.hosts.neosys.com&amp;quot;))&lt;br /&gt;
&lt;br /&gt;
View the csr and verify correct (check that SAN additional domains are listed if you requested them above)&lt;br /&gt;
&lt;br /&gt;
 openssl req -in mydomain.csr -noout -text&lt;br /&gt;
&lt;br /&gt;
==== Either send to CA and get crt/cer file back ====&lt;br /&gt;
&lt;br /&gt;
Send the csr file to the certifying authority and put their response in a mydomain.crt file&lt;br /&gt;
&lt;br /&gt;
Make sure you inform them that the type of software you used to generate the csr is &amp;quot;mod Apache/ModSSL&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 mydomain.csr -&amp;gt; mydomain.cer&lt;br /&gt;
&lt;br /&gt;
==== Or self sign to test all ok ====&lt;br /&gt;
&lt;br /&gt;
 nano ssl.conf&lt;br /&gt;
&lt;br /&gt;
 [req_distinguished_name]&lt;br /&gt;
 countryName = Country Name (2 letter code)&lt;br /&gt;
 countryName_default = AE&lt;br /&gt;
 stateOrProvinceName = State or Province Name (full name)&lt;br /&gt;
 stateOrProvinceName_default = Dubai&lt;br /&gt;
 localityName = Locality Name (eg, city)&lt;br /&gt;
 localityName_default = Dubai&lt;br /&gt;
 organizationalUnitName  = Organizational Unit Name (eg, section)&lt;br /&gt;
 organizationalUnitName_default  = IT&lt;br /&gt;
 commonName = *.neosys.com&lt;br /&gt;
 commonName_max  = 64&lt;br /&gt;
 #&lt;br /&gt;
 [ v3_req ]&lt;br /&gt;
 # Extensions to add to a certificate request&lt;br /&gt;
 basicConstraints = CA:FALSE&lt;br /&gt;
 #keyUsage = nonRepudiation, digitalSignature, keyEncipherment&lt;br /&gt;
 subjectAltName = @alt_names&lt;br /&gt;
 #&lt;br /&gt;
 [alt_names]&lt;br /&gt;
 DNS.1 = neosys.com&lt;br /&gt;
 DNS.2 = *.neosys.com&lt;br /&gt;
 DNS.3 = *.hosts.neosys.com&lt;br /&gt;
 DNS.4 = *.support.neosys.com&lt;br /&gt;
&lt;br /&gt;
 openssl x509 -signkey mydomain.key -in mydomain.csr -req -days 9999 -extensions v3_req   -extfile ssl.conf -out mydomain.crt&lt;br /&gt;
&lt;br /&gt;
view the cert and check extensions (additional domain names) are present if required&lt;br /&gt;
&lt;br /&gt;
 openssl x509 -in mydomain.crt -text -noout&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Merge private key and signed public cert into password protected pfx file ====&lt;br /&gt;
&lt;br /&gt;
Convert the pair of standard files into a single pfx file that IIS can import&lt;br /&gt;
&lt;br /&gt;
 friendlyname=&amp;quot;COMODO SIGNED hosts.neosys.com *.hosts.neosys.com&amp;quot;&lt;br /&gt;
 openssl pkcs12 -export -in mydomain.crt -inkey mydomain.key -name &amp;quot;$friendlyname&amp;quot; -out mydomain.pfx&lt;br /&gt;
&lt;br /&gt;
It will ask for a password .. the usual NEOSYS one is 1f... which will be required when you import the pfx file into IIS before binding to web sites&lt;br /&gt;
&lt;br /&gt;
Example session:&lt;br /&gt;
&lt;br /&gt;
 Enter Export Password:&lt;br /&gt;
 Verifying - Enter Export Password:&lt;br /&gt;
&lt;br /&gt;
Check the pfx file&lt;br /&gt;
&lt;br /&gt;
 openssl pkcs12 -in mydomain.pfx&lt;br /&gt;
&lt;br /&gt;
 openssl pkcs12 -in mydomain.pfx | openssl x509 -noout -text&lt;br /&gt;
&lt;br /&gt;
==== Copy the pfx file to the IIS server and import/bind in the usual way ====&lt;br /&gt;
&lt;br /&gt;
Copy it to the https server&lt;br /&gt;
&lt;br /&gt;
 mysshport=&amp;quot;-P 19510&amp;quot;&lt;br /&gt;
 mysshtarget=&amp;quot;administrator@win3.neosys.com:/cygdrive/d/hosts/CERTIFICATES&amp;quot;&lt;br /&gt;
 scp $mysshport mydomain.pfx $mysshtarget&lt;br /&gt;
&lt;br /&gt;
==== Friendly name in pfx file ====&lt;br /&gt;
&lt;br /&gt;
On the IIS server after importing, if you have multiple certificates for the same domain name you might like to add a &amp;quot;friendly name&amp;quot; to distinguish them in the dropdown when binding certificates to web sites.&lt;br /&gt;
&lt;br /&gt;
You might also want to add the friendly name to the pfx file if you intend to import it again or elsewhere using certificate export to pfx with options Include All and Export All&lt;br /&gt;
&lt;br /&gt;
https://rickardrobin.wordpress.com/2012/12/05/specifying-a-friendly-name-to-a-certificate/&lt;br /&gt;
&lt;br /&gt;
=== Understanding SSL certificates ===&lt;br /&gt;
&lt;br /&gt;
==== What are RSA Private Keys, CSRs and Certificates? ====&lt;br /&gt;
&lt;br /&gt;
YOUR RSA PRIVATE KEY FILE&lt;br /&gt;
&lt;br /&gt;
is a digital file created by you and never ever shared with others. It is USED ONLY BY YOU (never by others) to either:&lt;br /&gt;
&lt;br /&gt;
*to DECRYPT secret, encrypted, messages received by you from others&lt;br /&gt;
*to SIGN messages before sending them to others providing them certainty that the message came from you without being tampered with and that you cannot deny signing them.&lt;br /&gt;
&lt;br /&gt;
YOUR RSA PUBLIC KEY FILE&lt;br /&gt;
&lt;br /&gt;
is a digital file created by you and freely shared with others. It is USED BY OTHERS (never by you) to either:&lt;br /&gt;
&lt;br /&gt;
*ENCRYPT messages before sending them to you&lt;br /&gt;
*VERIFY that signed messages were in fact signed by you and not tampered with and you cannot deny signing them.&lt;br /&gt;
&lt;br /&gt;
OTHER PERSON&#039;S RSA PUBLIC KEY FILE&lt;br /&gt;
&lt;br /&gt;
is a digital file created by the other person and freely shared with you and others. It is USED BY YOU OR ANYBODY (never by the other person) to either:&lt;br /&gt;
&lt;br /&gt;
*ENCRYPT messages to achieve secrecy before sending them to the other person.&lt;br /&gt;
*VERIFY that signed messages received were in fact signed by the other person and that they cannot deny signing them nor claim they have been tampered with.&lt;br /&gt;
&lt;br /&gt;
To obtain someone&#039;s public key, you need a trusted channel, ie a signed channel, but not a secret or encrypted channel since the information is public and not confidential.&lt;br /&gt;
&lt;br /&gt;
Using your private key and someones public key together:&lt;br /&gt;
&lt;br /&gt;
*If you want to send a signed secret message to someone and allow them to be sure it came unmodified from you, you first sign the message using YOUR PRIVATE KEY, then encrypt the message using THEIR PUBLIC KEY&lt;br /&gt;
*If you want to receive a secret message and verify that it came unmodified from someone in particular, you first you decrypt the message using YOUR PRIVATE KEY, then verify the message using THEIR PUBLIC KEY&lt;br /&gt;
&lt;br /&gt;
Signing and Verification = Encryption and Decryption Mathematical Process with keys reversed&lt;br /&gt;
&lt;br /&gt;
Actually, the process of &amp;quot;signing&amp;quot; is doing the same mathematical process as encryption, but since you use the recipients public key, the resultant &amp;quot;encrypted&amp;quot; messege is not secret because it can be &amp;quot;decrypted&amp;quot; using a public key which are freely available.&lt;br /&gt;
&lt;br /&gt;
Likewise, the process of &amp;quot;verification&amp;quot; on a received message is doing the same mathematical process as decryption, but since you are using the senders public key, and anybody could &amp;quot;decrypt&amp;quot; the message, it was not really encrypted in the sense of being secret.&lt;br /&gt;
&lt;br /&gt;
So we have two processes, one called Encryption/Signing but is exactly the same mathematical process with two names depending on whether we use a public or private key, and another process called Decryption/Verification which uses the opposite key.&lt;br /&gt;
&lt;br /&gt;
What YOU use for what:&lt;br /&gt;
&lt;br /&gt;
*YOUR (PRIVATE) KEY = USED BY YOU for decryption and signing&lt;br /&gt;
*THEIR (PUBLIC) KEY = USED BY YOU for encryption and verification&lt;br /&gt;
&lt;br /&gt;
*YOUR (PUBLIC) KEY = NEVER USED BY YOU - since anybody else could do the same thing so no trust or secrecy could be obtained&lt;br /&gt;
*THEIR (PRIVATE) KEY = NEVER USED BY YOU - since you dont have it!&lt;br /&gt;
&lt;br /&gt;
What to use:&lt;br /&gt;
&lt;br /&gt;
*ENCRYPT OUTGOING = Use THEIR (public) key&lt;br /&gt;
*VERIFY INCOMING = Use THEIR (public) key&lt;br /&gt;
&lt;br /&gt;
*DECRYPT INCOMING = Use YOUR (private) key&lt;br /&gt;
*SIGN OUTGOING = Use YOUR (private) key&lt;br /&gt;
&lt;br /&gt;
So the slightly strange thing is that you dont encrypt messages with your private key as might be assumed naturally. You encrypt using the target recipient&#039;s public key. This is perfectly logical if you understand the concept asymmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
One thing to note is that, while it is obvious that other people never use your private key, since they dont have it, it is not obvious, but perfectly true, that you never use your public key. NOBODY EVER USES THEIR OWN PUBLIC KEY ... THEY ONLY GIVE IT TO OTHERS TO USE.&lt;br /&gt;
&lt;br /&gt;
CERTIFICATE&lt;br /&gt;
&lt;br /&gt;
It has a public component which you distribute (via your Certificate file) which allows people to encrypt those messages to you. It can also be used by you to sign messages that can be verified as having come from you by anyone who receives the signed message, using your public key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CSR FILE&lt;br /&gt;
&lt;br /&gt;
A Certificate Signing Request (CSR) is a digital file which contains your public key and your details eg name/domain name etc. You send the CSR to a Certifying Authority (CA), who will create a real Certificate containing your detail eg your domain name and your public key, signed by them using their private RSA private key.&lt;br /&gt;
&lt;br /&gt;
CERTIFICATE&lt;br /&gt;
&lt;br /&gt;
A Certificate contains your RSA public key, your name, the name of the CA, and is digitally signed by the CA. Browsers that know the CA can verify the signature on that Certificate, thereby obtaining your RSA public key. That enables them to send messages which only you can decrypt.&lt;br /&gt;
&lt;br /&gt;
==== What is Asymmetric cryptography? ====&lt;br /&gt;
&lt;br /&gt;
Asymmetric cryptography allows you to freely publish a &amp;quot;public&amp;quot; key that can be used by anyone to send you encrypted messages. Such messages can only be decrypted by you using a special matching &amp;quot;private&amp;quot; key which you always keep secret.&lt;br /&gt;
&lt;br /&gt;
Asymmetric cryptography also allows you to publish &amp;quot;signed&amp;quot; messages that can be verified by anyone as coming directly from you without any modification by others. Such messages are created using your &amp;quot;private&amp;quot; key and can be verified by anyone who has your &amp;quot;public&amp;quot; key. Creation involves the same process as encryption. Verification uses the same process as decryption.&lt;br /&gt;
&lt;br /&gt;
Note that you dont ever actually use your own public key. You use your private key to decrypt messages sent to you, and you use the same key to &amp;quot;sign&amp;quot; messages to prove they came from you and without modification. Likewise other people only ever use your &amp;quot;public&amp;quot; key - either for encrypting messages that they want to send to you, or verifying that signed messages did come from you unmodified.&lt;br /&gt;
&lt;br /&gt;
So we have a pair of keys that if either one is used for encryption/signing, then the other one is required for decryption/verifying. In that sense, it does not matter which we choose to keep private and which public, but ensure that we only ever publish one of them and forever keep the other secret.&lt;br /&gt;
&lt;br /&gt;
So, to start encrypting or signing, you need a matched pair of keys, and you need to publish one to other people and forever keep the other one secret.&lt;br /&gt;
&lt;br /&gt;
.key a file that contains a random collection of characters that can be used to encrypt&lt;br /&gt;
&lt;br /&gt;
.cer a file that contains a random collection of characters that can be given out publicly and used by anybody to encrypt something to be sent to you&lt;br /&gt;
&lt;br /&gt;
A certificate is some information that has been processed by a private and secret key.&lt;br /&gt;
&lt;br /&gt;
pfx contains a private key and public certificate which contains your public key embedded. Usually pfx files are encrypted and you have to enter a password before using them, ie importing them.&lt;br /&gt;
&lt;br /&gt;
==[[Backing up and Restoring IIS configuration]]==&lt;br /&gt;
&lt;br /&gt;
== Solving IIS errors ==&lt;br /&gt;
&lt;br /&gt;
=== Solving error during file upload: &amp;quot;Page cannot be displayed&amp;quot; HTTP Error 405 in windows 2003 ===&lt;br /&gt;
&lt;br /&gt;
This error should not occur in normal NEOSYS installations but the solution is as follows:&lt;br /&gt;
&lt;br /&gt;
# Go to Control Panel, Administrative Tools, Internet Information Services&lt;br /&gt;
# Expand the tree to COMPUTERNAME, Web Sites&lt;br /&gt;
# Right-click &amp;quot;Default Web Site&amp;quot; (or specific Web Site if multiple NEOSYS http/https installations on the server as per WIN3)&lt;br /&gt;
# Properties&lt;br /&gt;
# Home Directory&lt;br /&gt;
# Configuration&lt;br /&gt;
# Mappings, Add&lt;br /&gt;
# Browse&lt;br /&gt;
# Dynamic Link Libraries *.dll&amp;quot; from the &amp;quot;Files of Type&amp;quot; dropdown&lt;br /&gt;
# Find and select D:\NEOSYS\neosys.net\NEOSYS\dll\upload.dll (OR upload.dll in the installation directory)&lt;br /&gt;
# Extension Type: dll&lt;br /&gt;
# Limit to: All&lt;br /&gt;
# Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
=== Solving error during file upload: &amp;quot;HTTP verb used to access this page is not allowed&amp;quot; HTTP Error 405 in windows 2008 ===&lt;br /&gt;
&lt;br /&gt;
Cause: This error occurs when upload.dll is not set up on IIS &lt;br /&gt;
&lt;br /&gt;
Solution: Ensure upload.dll is setup as per configuration: [[Configuring_IIS#Configure_file_uploads_besides_adding_the_images_directory|Setting up upload.dll]]&lt;br /&gt;
&lt;br /&gt;
[[File:uploadiis2.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Solving &amp;quot;HTTP Error 503. The service is unavailable.&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
Look in event log for errors saying various dlls have failed to load eg&lt;br /&gt;
&lt;br /&gt;
 The Module DLL C:\Windows\System32\inetsrv\authsspi.dll failed to load. The data is the error.&lt;br /&gt;
&lt;br /&gt;
These errors indicate that IIS is configured to use various modules that have not been installed, possibly due to restoration of IIS configuration backups which mention them but the restore program restores the configuration but does not install the dll. They may not even be required, but how to exclude them is not solved in this article.&lt;br /&gt;
&lt;br /&gt;
Solution is to install the various required modules by right clicking IIS role and choosing Add Role Service&lt;br /&gt;
&lt;br /&gt;
*inetsrv\filter.dll - ISAPI Filters&lt;br /&gt;
*validcfg.dll - .NET Extensibility?&lt;br /&gt;
*iis_ssi.dll - Server Side Includes&lt;br /&gt;
*authsspi.dll - Windows Authentication&lt;br /&gt;
&lt;br /&gt;
A list of module names mapped to dll files can be found in the IIS configuration file. This may give a clue what module is required to be added in Programs and Features or Roles. Alternatively, the module may no longer be required on a new server and can be deleted from the configuration file (take a backup. this may could cause other strange errors, perhaps much later on) and IIS restarted with the new configuration.&lt;br /&gt;
&lt;br /&gt;
 cd C:\Windows\System32\inetsrv\config&lt;br /&gt;
 notepad applicationHost.config&lt;br /&gt;
&lt;br /&gt;
Example from neosys win3:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        &amp;lt;globalModules&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;UriCacheModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\cachuri.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;FileCacheModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\cachfile.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;TokenCacheModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\cachtokn.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;HttpCacheModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\cachhttp.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;StaticCompressionModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\compstat.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;DefaultDocumentModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\defdoc.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;DirectoryListingModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\dirlist.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;ProtocolSupportModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\protsup.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;StaticFileModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\static.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;AnonymousAuthenticationModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\authanon.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;RequestFilteringModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\modrqflt.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;CustomErrorModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\custerr.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;HttpLoggingModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\loghttp.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;RequestMonitorModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\iisreqs.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;IsapiModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\isapi.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;IsapiFilterModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\filter.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;ConfigurationValidationModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\validcfg.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;ManagedEngine&amp;quot; image=&amp;quot;%windir%\Microsoft.NET\Framework\v2.0.50727\webengine.dll&amp;quot; preCondition=&amp;quot;integratedMode,runtimeVersionv2.0,bitness32&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;ServerSideIncludeModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\iis_ssi.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;WindowsAuthenticationModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\authsspi.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;ManagedEngineV4.0_32bit&amp;quot; image=&amp;quot;c:\Windows\Microsoft.NET\Framework\v4.0.30319\webengine4.dll&amp;quot; preCondition=&amp;quot;integratedMode,runtimeVersionv4.0,bitness32&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;ManagedEngineV4.0_64bit&amp;quot; image=&amp;quot;c:\Windows\Microsoft.NET\Framework64\v4.0.30319\webengine4.dll&amp;quot; preCondition=&amp;quot;integratedMode,runtimeVersionv4.0,bitness64&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/globalModules&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Solving HTTP Error 404 Error occurring immediately on opening NEOSYS login page on a new server installation: &amp;quot;System Failure. Do you want to retry?&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This error message is caused by failing to enable Active Server Pages in the IIS configuration. To resolve this in windows 2008, [[Configuring_IIS#Configure_file_uploads_besides_adding_the_images_directory| ensure that Read, Script, Execute is ticked (enabled) in the feature permissions of these Handler Mappings.]]&lt;br /&gt;
&lt;br /&gt;
This message is from IE8 and a Windows 2003 server. The message may be different for other browser versions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Message from web page.&lt;br /&gt;
&lt;br /&gt;
System Failure. Do you want to retry?&lt;br /&gt;
&lt;br /&gt;
The page cannot be found&lt;br /&gt;
The page you are looking for might have been removed, had its name change, or it temporarily unavailable.&lt;br /&gt;
&lt;br /&gt;
Please try the following:&lt;br /&gt;
(omitted)&lt;br /&gt;
HTTP Error 404 - File or directory not found.&lt;br /&gt;
Internet Information Services (IIS)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[image:http404.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Solving HTTP 404 Webpage cannot be found ===&lt;br /&gt;
&lt;br /&gt;
This error message clearly states that the page cannot be found. Check for the requested page in the client website folder under the virtual directory data. This page will be available under the data folder in D:\neosys\data. A possible cause of this error is by failing to create a virtual directory called data linked to D:\neosys\data:&lt;br /&gt;
&lt;br /&gt;
[[image:http404p.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Solving &amp;quot;Service unavailable&amp;quot; error due to disabled application pool ===&lt;br /&gt;
&lt;br /&gt;
====Problem:====&lt;br /&gt;
&lt;br /&gt;
Browser shows &amp;quot;Service unavailable&amp;quot; when trying to access NEOSYS&lt;br /&gt;
&lt;br /&gt;
[[image:serviceunavailable.jpg]]&lt;br /&gt;
&lt;br /&gt;
Check if IIS application pool is disabled. IIS application pool gets automatically disabled after a series of worker process failures. &lt;br /&gt;
&lt;br /&gt;
Open system logs and check for W3SVC error with event ID 1002 to confirm that the application pool was disabled automatically due to a series of failures in the process(es) serving that application pool.&lt;br /&gt;
&lt;br /&gt;
[[image:w3svcerror.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Solution:==== &lt;br /&gt;
Open IIS, expand application pools, right-click the application pool that was automatically disabled, and click Start. &lt;br /&gt;
Browse to NEOSYS website to check if the problem is fixed.&lt;br /&gt;
&lt;br /&gt;
====Additional Information:====&lt;br /&gt;
&lt;br /&gt;
To view the settings for the number of process failures after which the application pool gets disabled, go to IIS, expand application pools, right-click the application pool, click &amp;quot;Set Application Pool Defaults&amp;quot; (for Windows Server 2003, right-click the application pool, click properties and then go to the &amp;quot;Health&amp;quot; tab).&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Rapid-Fail Protection&amp;quot; is the feature that disables the application if there are a certain number of worker process failures within a specified time period.&lt;br /&gt;
&lt;br /&gt;
As per the configuration shown in the example screenshot below, application pool &amp;quot;DefaultAppPool&amp;quot; will be automatically disabled if 5 or more worker process failures happen within a time period of 5 minutes.&lt;br /&gt;
&lt;br /&gt;
[[image:apppool.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Solving Error &amp;quot;The specified Executable does not exist on the server&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
While adding Script Map in Handler Mappings in the above step, if you get the below error, this means you have not yet run the Maintenance window/ NEOSYS processes and skipped steps in Installing NEOSYS. File upload.dl_ is installed from NEOSYS.EXE or NEOSYS2.EXE and converted to .dll the first time you run NEOSYS Maintenance/Process. You can also manually rename the file to upload.dll. &lt;br /&gt;
&lt;br /&gt;
[[image:Dll_error.png]]&lt;br /&gt;
&lt;br /&gt;
=== Solving IIS error 500 on uploading for windows 2008===&lt;br /&gt;
&lt;br /&gt;
To test if permissions are the problem, in grant full control to IUSR over the whole client directory e.g d:\neosys or d:\hosts\clientx in security tab of windows explorer and see if you can upload.&lt;br /&gt;
&lt;br /&gt;
Regardless of the result, remove the full control permissions since they are a security risk.&lt;br /&gt;
&lt;br /&gt;
If permissions are the problem then grant specific permissions as follows:&lt;br /&gt;
&lt;br /&gt;
#images folder - read and write permissions (but not execute)&lt;br /&gt;
#dll folder - read and execute permission (no write permission)&lt;br /&gt;
&lt;br /&gt;
=== Solving error &amp;quot;Upload folder cannot be created.The system cannot find the drive specified&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This error message comes up when the file uploads are configured to a different location in the software than what is set up in IIS.&lt;br /&gt;
&lt;br /&gt;
There is an internal system configuration in line 49 of the DOS SYSTEM.CFG file which mentions the upload folder location (normally blank which means xxxxxx\images\ where xxxxxx is the installation directory e.g d:\neosys)&lt;br /&gt;
&lt;br /&gt;
In installations where the images are uploaded to a place other than the installation directory, the configuration may say something like h:\images\ where h represents the drive where the folder is located e.g on an external USB drive. This may be done in case of client installations where file uploads are configured on USB drives due to a huge number of files getting uploaded.&lt;br /&gt;
&lt;br /&gt;
The IIS and internal system configuration must agree, otherwise users will probably not be able to upload files, or the uploaded files may not be saved in the right place and may be lost, not backed up and/or not viewable.&lt;br /&gt;
&lt;br /&gt;
To fix this issue, you MUST link the &#039;&#039;&#039;images&#039;&#039;&#039; folder in IIS to xxxxxx\images\ where xxxxxx is the directory of the images folder as shown in the error message.&lt;br /&gt;
&lt;br /&gt;
[[File:Uploaderror.png]]&lt;br /&gt;
&lt;br /&gt;
===[[Troubleshooting_NEOSYS_Generally#Solving_.E2.80.9Cpage_not_found.E2.80.9D_or_.22HTTP_Error_404.3_-_Not_Found.22_when_downloading_some_file_types_after_uploading_them_successfully|Solving “page not found” or &amp;quot;HTTP Error 404.3 - Not Found&amp;quot; when downloading some file types after uploading them successfully]] ===&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Configuring_IIS&amp;diff=3657</id>
		<title>Configuring IIS</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Configuring_IIS&amp;diff=3657"/>
		<updated>2019-12-02T21:32:21Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Solving &amp;quot;HTTP Error 503. The service is unavailable.&amp;quot; */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;After you have installed all the NEOSYS program files you need to configure IIS so that you can operate NEOSYS. Instructions are below.&lt;br /&gt;
&lt;br /&gt;
== Configuring IIS for windows 2003 ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a new website in IIS ===&lt;br /&gt;
&lt;br /&gt;
First step is to stop the default website in IIS. Right click on Default Web Site and select &amp;quot;Stop&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Create a website called neosys linked to D:\neosys\neosys.net:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3 Server:&#039;&#039;&#039; Create a website called &amp;quot;clientname&amp;quot; linked to D:\hosts\clientfolder\neosys.net &lt;br /&gt;
&lt;br /&gt;
[[image:figure1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[image:figure3.jpg]]&lt;br /&gt;
&lt;br /&gt;
A new window will pop up &amp;quot;IP Address and Port Setting&amp;quot; after completion of the above step.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039;  Select *(All Unassigned)* from the drop down list of &amp;quot;Enter the IP address to use for the Web site&amp;quot; and keep the default port as 80. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3 Server:&#039;&#039;&#039; Select the static Ip from the drop down list of &amp;quot;Enter the IP address to use for the Web site&amp;quot; and enter then next port available and click on next.&lt;br /&gt;
&lt;br /&gt;
[[image:Figure_2.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Within the above neosys web site folder create a virtual directory called data linked to D:\neosys\data: &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3 Server:&#039;&#039;&#039; Within the above clientwebsite folder create a virtual directory called data linked to D:\hosts\clientfolder\data:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;(I haven’t got the screenshot because I can only get it once I create the above)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== To allow file uploads ===&lt;br /&gt;
&lt;br /&gt;
==== Create IMAGES directory ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client server:&#039;&#039;&#039; create a folder IMAGES under D:\neosys and within the neosys web site folder create a virtual directory called images linked to D:\neosys\images: Modes: READ and WRITE&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3 Server:&#039;&#039;&#039; create a folder IMAGES under D:\hosts\clientfolder and within the client web site folder create a virtual directory called images linked to D:\hosts\clientfolder\images: Modes: READ and WRITE&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;(I haven’t got the screenshot because I can only get it once I create the above)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Permit upload.dll ====&lt;br /&gt;
&lt;br /&gt;
# Right click on dll ( Default Web Site, neosys, NEOSYS, dll) &lt;br /&gt;
# Under Permissions set Execute Permissions: Scripts and Executables&lt;br /&gt;
&lt;br /&gt;
# Internet Information Services (IIS) Manager&lt;br /&gt;
# Web Service Extensions&lt;br /&gt;
# All Unknown ISAPI Extensions: Allowed&lt;br /&gt;
&lt;br /&gt;
=== Create &amp;quot;Cache-Control&amp;quot; HTTP Header ===&lt;br /&gt;
&lt;br /&gt;
This custom HTTP Header is created so that users will not have to clear browser cache after a NEOSYS upgrade.&lt;br /&gt;
&lt;br /&gt;
#Right click on neosys (Web Sites, neosys)&lt;br /&gt;
#Select Properties and click on the HTTP Headers tab&lt;br /&gt;
#Add a new custom HTTP Header with &amp;quot;Cache-Control&amp;quot; as header name and &amp;quot;public,max-age=300&amp;quot; as the header value.&lt;br /&gt;
&lt;br /&gt;
[[File:cacheheader.png]]&lt;br /&gt;
&lt;br /&gt;
===[[Backing_up_and_Restoring_IIS_configuration#Set_IIS_automatic_backup_location_to_d:| Set IIS automatic backup location to D:]] ===&lt;br /&gt;
&lt;br /&gt;
== Installing IIS for Windows 2008 ==&lt;br /&gt;
&lt;br /&gt;
First install IIS from Control Panel &amp;gt; Programs &amp;amp; Features &amp;gt; Turn Windows Features ON or OFF &amp;gt; Add Roles:&lt;br /&gt;
&lt;br /&gt;
[[image:iis1.jpg]]&lt;br /&gt;
&lt;br /&gt;
On the window that pops up click on next and you will get this screen, tick Web Server (IIS) - on the prompt click on Add Required Resources and then on Next:&lt;br /&gt;
&lt;br /&gt;
[[image:iis2.jpg]]&lt;br /&gt;
&lt;br /&gt;
On the next window, click on next until you get this window - tick ASP and ISAPI Extensions:&lt;br /&gt;
&lt;br /&gt;
[[image:iis3.jpg]]&lt;br /&gt;
&lt;br /&gt;
Click on Next and Finish&lt;br /&gt;
&lt;br /&gt;
== Configuring IIS for Windows 2008 and Windows 10==&lt;br /&gt;
===Create a new Website===&lt;br /&gt;
After successfully installing IIS, go to Control Panel &amp;gt; Administrative Tools &amp;gt; Computer Management &amp;gt; Services and Applications &amp;gt; Internet Information Services (IIS) &amp;gt; Machine Name &amp;gt; Sites &amp;gt; Default Website. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; &lt;br /&gt;
#Stop the Default Website.&lt;br /&gt;
#Right click on Sites folder and click on Add Website.&lt;br /&gt;
#Create a website called &#039;&#039;&#039;neosys&#039;&#039;&#039; and linked to {{Client server Installation Location}}neosys.net as shown in the screenshot below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; &lt;br /&gt;
#Right click on Sites folder and click on Add Website. &lt;br /&gt;
#Create a website called &amp;quot;clientname&amp;quot; linked to {{NEOSYS server Installation Location}}neosys.net as shown in screenshot below.&lt;br /&gt;
#Since win3 is not connected to any LAN and exclusively serves https only, therefore setup a https binding only with a port number which is unique, unused and one greater than the previous port used in the series which is 4431 onwards. The highest port number used in this series can be found by checking IIS manager -&amp;gt; NEOSYS -&amp;gt;Sites.&lt;br /&gt;
&lt;br /&gt;
Refer to [[Setting_up_HTTPS#Creating_multiple_HTTPS_web_sites_on_NEOSYS_hosted_server| setting up the https for a site on NEOSYS hosted server]] for details.&lt;br /&gt;
&lt;br /&gt;
[[image:iis4.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Link Data Folder===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Within the neosys website folder create a virtual directory called &#039;&#039;&#039;data&#039;&#039;&#039; linked to {{Client server Installation Location}}data&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; Within the &amp;quot;clientname&amp;quot; website folder create a virtual directory called &#039;&#039;&#039;data&#039;&#039;&#039; linked to {{NEOSYS server Installation Location}}data &lt;br /&gt;
&lt;br /&gt;
[[image:iis5.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Allow file uploads===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; create a folder &#039;&#039;&#039;images&#039;&#039;&#039; under D:\neosys and within the neosys web site folder create a virtual directory called &#039;&#039;&#039;images&#039;&#039;&#039; linked to {{Client server Installation Location}}images&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; create a folder &#039;&#039;&#039;images&#039;&#039;&#039; under D:\hosts\clientfolder and within the &amp;quot;clientname&amp;quot; website folder create a virtual directory called &#039;&#039;&#039;images&#039;&#039;&#039; linked to {{NEOSYS server Installation Location}}images&lt;br /&gt;
&lt;br /&gt;
[[image:iis7.jpg]]&lt;br /&gt;
&lt;br /&gt;
After you add all virtual directories the tree map of the website should look as follows:&lt;br /&gt;
&lt;br /&gt;
[[image:iis8.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Configure file uploads besides adding the images directory===&lt;br /&gt;
&lt;br /&gt;
#In IIS open Handler mappings in the top server level&lt;br /&gt;
#Right click ISAPI-dll and choose Edit Feature Permissions&lt;br /&gt;
#Check Execute and save.&lt;br /&gt;
&lt;br /&gt;
This is already setup for win3&lt;br /&gt;
&lt;br /&gt;
[[image: iisisapi.jpg]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For single site servers follow the steps below only if file upload does not work in NEOSYS after doing the above.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Go under IIS &amp;gt; Default Website &amp;gt; neosys&lt;br /&gt;
&lt;br /&gt;
Click on Handler Mappings and delete the ISAPI you see there&lt;br /&gt;
&lt;br /&gt;
[[image:iis9a.jpg]]&lt;br /&gt;
&lt;br /&gt;
Thereafter click on Add Script Map and fill in the details as follows – &lt;br /&gt;
&lt;br /&gt;
Request path: *.dll &lt;br /&gt;
&lt;br /&gt;
Executable: {{Client server Installation Location}}neosys.net\NEOSYS\dll\upload.dll&lt;br /&gt;
&lt;br /&gt;
Name: ISAPI &lt;br /&gt;
&lt;br /&gt;
Click on OK and on YES in the confirmation box&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:iis9b.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[image:hm.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Editing the hosts file===&lt;br /&gt;
Edit the hosts file under c:\windows\system32\drivers\etc\ - delete the # sign next to 127.0.0.1 localhost and include the # sign before ::1 localhost&lt;br /&gt;
&lt;br /&gt;
[[image:iis10.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== IIS web page caching ===&lt;br /&gt;
&lt;br /&gt;
Webpage cache is set to 5 mins in neosys.net/web.config on Windows 2008/10 and in IIS configuration on Windows 2003.&lt;br /&gt;
&lt;br /&gt;
If a NEOSYS user opens a web page 5 mins after the file was updated then their computer will get the latest version.&lt;br /&gt;
&lt;br /&gt;
If support team is patching and wants to test without waiting for 5 mins then they will have to press Ctrl+F5 to refresh or perhaps even clear their cache using the usual methods.&lt;br /&gt;
&lt;br /&gt;
===[[Backing_up_and_Restoring_IIS_configuration#Set_IIS_automatic_backup_location_to_d:| Set IIS automatic backup location to D:]] ===&lt;br /&gt;
&lt;br /&gt;
== Disabling unsecure SSL3 protocol on Windows IIS web server ==&lt;br /&gt;
&lt;br /&gt;
POODLE is an information leakage attack on client browsers while accessing web server that support the older SSL3 protocol. It is easy to prevent it by reconfiguring web servers to not support SSL3.&lt;br /&gt;
&lt;br /&gt;
=== Securing IIS web server on win2003 and 2008 by disabling unsafe SSL3 protocol ===&lt;br /&gt;
&lt;br /&gt;
#For Systems with https installed check if the web server is vulnerable (see [[Configuring_IIS#Testing_for_IIS_vulnerability| Testing for IIS vulnerability]] ). For systems with no https installed,continue to step2 to prevent SSL3 accidentally being enabled if https is installed in the server in future and then test for vulnerability.&lt;br /&gt;
# run the following commands on the server&lt;br /&gt;
#reg add &amp;quot;HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Server&amp;quot;  /t REG_DWORD  /v Enabled  /d 0 /f&lt;br /&gt;
#reg add &amp;quot;HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server&amp;quot;  /t REG_DWORD  /v Enabled  /d 0 /f&lt;br /&gt;
#reg add &amp;quot;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 40/128&amp;quot;  /t REG_DWORD  /v Enabled  /d 0 /f&lt;br /&gt;
#reg add &amp;quot;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 56/128&amp;quot;  /t REG_DWORD  /v Enabled  /d 0 /f&lt;br /&gt;
#reg add &amp;quot;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 64/128&amp;quot;  /t REG_DWORD  /v Enabled  /d 0 /f&lt;br /&gt;
#reg add &amp;quot;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 128/128&amp;quot;  /t REG_DWORD  /v Enabled  /d 0 /f&lt;br /&gt;
#Reboot the server (at any time later using standard NEOSYS rebooting procedure without disturbing users)&lt;br /&gt;
#Perform the diagnostic for vulnerability&lt;br /&gt;
&lt;br /&gt;
=== Testing for IIS vulnerability ===&lt;br /&gt;
==== A. Determine host and port and where to test from ==== &lt;br /&gt;
If you have a public https server that you can access like https://demo.neosys.com:443, in a linux command prompt eg nagios login:&lt;br /&gt;
&lt;br /&gt;
*$HOST for host name like demo.neosys.com&lt;br /&gt;
*$PORT with something like 443 or 4430 depending on port forwarding on the public router&lt;br /&gt;
&lt;br /&gt;
or if testing a private https server with no public access, using a cygwin installation on the same server in the cygwin prompt:&lt;br /&gt;
&lt;br /&gt;
*$HOST for host name like 127.0.0.1&lt;br /&gt;
*$PORT with something like 443 or 4430 as per IIS manager configuration&lt;br /&gt;
&lt;br /&gt;
If https is enabled on the server/website and you are able to access the website via https using a browser, then you must be able to test for openssl on the same browsed host and port. You must also test this locally to ensure that the right server is being fixed. If the website is not public, then https must not be enabled, which means there is no reason for using cygwin openssl.&lt;br /&gt;
&lt;br /&gt;
==== B. Check you CAN connect to https server using TLS ====&lt;br /&gt;
&lt;br /&gt;
 openssl s_client -host $HOST -port $PORT&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nagios@vm1m:~$ echo|openssl s_client -host demo.neosys.com -port 443&lt;br /&gt;
CONNECTED(00000003)&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=20:unable to get local issuer certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=21:unable to verify the first certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
---&lt;br /&gt;
Certificate chain&lt;br /&gt;
 0 s:/CN=demo.neosys.com&lt;br /&gt;
   i:/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
Server certificate&lt;br /&gt;
-----BEGIN CERTIFICATE-----&lt;br /&gt;
MIIB2DCCAUWgAwIBAgIQd0J0l4kJrpJHonAv5U8VLjAJBgUrDgMCHQUAMBoxGDAW&lt;br /&gt;
BgNVBAMTD2RlbW8ubmVvc3lzLmNvbTAeFw0wODA3MjcxOTUxMDNaFw0zNTEyMTIx&lt;br /&gt;
OTUxMDNaMBoxGDAWBgNVBAMTD2RlbW8ubmVvc3lzLmNvbTCBnzANBgkqhkiG9w0B&lt;br /&gt;
AQEFAAOBjQAwgYkCgYEAxzwtoqq49vV7pyBQ6Ej+PvbB1QxkdsxNn5EZSLSOppCb&lt;br /&gt;
jNjV8fFa98unPR0pGM0UdjWMUYodj12c2pnIrfrtXv7pYf+iC1corPEY7607Icbs&lt;br /&gt;
rSOc5aFwnlUYpktoysV1G1crGYgYgXbXgVOUO9phHXJarpKf6SjVw3uXTLlmPUkC&lt;br /&gt;
AwEAAaMnMCUwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDgYDVR0PBAcDBQCwAAAAMAkG&lt;br /&gt;
BSsOAwIdBQADgYEAmgyW60pT62JuM8GH+KogHW7viaMsifXitm3BC/GfaORpJCox&lt;br /&gt;
aS20fAlzGyAlDe9nZWN4roLSxQv0laJkxyNPDuHvLJt1l0FVdk6/vGB6QH0KqM+S&lt;br /&gt;
UaUTLsDZ99UNS/inotobxD9vXuKl58Uoe2lu7r9vJ+1DWDC6AyueSZ6xnno=&lt;br /&gt;
-----END CERTIFICATE-----&lt;br /&gt;
subject=/CN=demo.neosys.com&lt;br /&gt;
issuer=/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
No client certificate CA names sent&lt;br /&gt;
---&lt;br /&gt;
SSL handshake has read 635 bytes and written 411 bytes&lt;br /&gt;
---&lt;br /&gt;
New, TLSv1/SSLv3, Cipher is AES128-SHA&lt;br /&gt;
Server public key is 1024 bit&lt;br /&gt;
Secure Renegotiation IS supported&lt;br /&gt;
Compression: NONE&lt;br /&gt;
Expansion: NONE&lt;br /&gt;
SSL-Session:&lt;br /&gt;
    Protocol  : TLSv1&lt;br /&gt;
    Cipher    : AES128-SHA&lt;br /&gt;
    Session-ID: 8A0A00002D51DE183AC2845C6B3FF4BC7485181B4DCBC1758E3A2D5399BDD71C&lt;br /&gt;
    Session-ID-ctx:&lt;br /&gt;
    Master-Key: B10B9370E4DF70E873873AB9851B3CEF19623E6ADA697955E375D931DEE8301D798B4CB14C8D33FCF1BA066C0CC23897&lt;br /&gt;
    Key-Arg   : None&lt;br /&gt;
    PSK identity: None&lt;br /&gt;
    PSK identity hint: None&lt;br /&gt;
    SRP username: None&lt;br /&gt;
    Start Time: 1413885416&lt;br /&gt;
    Timeout   : 300 (sec)&lt;br /&gt;
    Verify return code: 21 (unable to verify the first certificate)&lt;br /&gt;
---&lt;br /&gt;
DONE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== C. Check that you cannot CANNOT to https server using SSL3 ====&lt;br /&gt;
&lt;br /&gt;
 openssl s_client -ssl3 -host $HOST -port $PORT&lt;br /&gt;
&lt;br /&gt;
==== CAN CONNECT = VULNERABLE = NOT OK ====&lt;br /&gt;
&lt;br /&gt;
If you get this then you need to configure the server to prevent SSL3&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nagios@vm1m:~$ echo xxx|openssl s_client -ssl3 -host demo.neosys.com -port 4430&lt;br /&gt;
gethostbyname failure&lt;br /&gt;
connect:errno=0&lt;br /&gt;
nagios@vm1m:~$ echo xxx|openssl s_client -ssl3 -host demo.neosys.com -port 4430&lt;br /&gt;
CONNECTED(00000003)&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=20:unable to get local issuer certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=21:unable to verify the first certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
---&lt;br /&gt;
Certificate chain&lt;br /&gt;
 0 s:/CN=demo.neosys.com&lt;br /&gt;
   i:/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
Server certificate&lt;br /&gt;
-----BEGIN CERTIFICATE-----&lt;br /&gt;
MIIB3jCCAUugAwIBAgIQNj9FMjT1vIxGo2Mv2Ta9vzAJBgUrDgMCHQUAMB0xGzAZ&lt;br /&gt;
BgNVBAMTEmFkbGluZWQubmVvc3lzLmNvbTAeFw0wODAzMjUxMTIxMzFaFw0zNTA4&lt;br /&gt;
MTAxMTIxMzFaMB0xGzAZBgNVBAMTEmFkbGluZWQubmVvc3lzLmNvbTCBnzANBgkq&lt;br /&gt;
hkiG9w0BAQEFAAOBjQAwgYkCgYEArRuijA8jz3qBm2ZZEwITIJLWIMlQmZxcUvOo&lt;br /&gt;
HNZL0+3oJuX0AQqtpRZMp/7ob9agngfwJQ36vK+424zcBbmKxA2MweKZRalN2jz+&lt;br /&gt;
rdr1oeZ6/Ff3r8+rCPFj/B8CfMOQbSv6YcR0kVc+8ugybB7qT6Nq5ZWOAczG3Ikt&lt;br /&gt;
4EnOlqUCAwEAAaMnMCUwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDgYDVR0PBAcDBQCw&lt;br /&gt;
AAAAMAkGBSsOAwIdBQADgYEAHIq5Gn2LiMgXFaUYrFEfHeajD4jAwdFw+zrjcBDZ&lt;br /&gt;
qM9LnhndHhdPogow9m9cCv1n57ne9rZL1v7w7Y6C53359hTUVZFqtHFfzcWnNyKD&lt;br /&gt;
uHD9a8QDk6/dSwBr/SWIE6OdFUYAj/kDXRQNB5H459spRVa3Yws8vpwrWZhoklxq&lt;br /&gt;
CQg=&lt;br /&gt;
-----END CERTIFICATE-----&lt;br /&gt;
subject=/CN=demo.neosys.com&lt;br /&gt;
issuer=/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
No client certificate CA names sent&lt;br /&gt;
---&lt;br /&gt;
SSL handshake has read 649 bytes and written 342 bytes&lt;br /&gt;
---&lt;br /&gt;
New, TLSv1/SSLv3, Cipher is RC4-MD5&lt;br /&gt;
Server public key is 1024 bit&lt;br /&gt;
Secure Renegotiation IS supported&lt;br /&gt;
Compression: NONE&lt;br /&gt;
Expansion: NONE&lt;br /&gt;
SSL-Session:&lt;br /&gt;
    Protocol  : SSLv3&lt;br /&gt;
    Cipher    : RC4-MD5&lt;br /&gt;
    Session-ID: 441A0000EBC1D634B2CDB12924F9B980D2A4CF8C4DD6D3FB9728D3C74F62A8FE&lt;br /&gt;
    Session-ID-ctx:&lt;br /&gt;
    Master-Key: 38F040BE3E7098857B7CB9FF3B44937786F8F8C002B0042370B29F20EFB582833F9E24CFC8E6560AFD06751DC93412D3&lt;br /&gt;
    Key-Arg   : None&lt;br /&gt;
    PSK identity: None&lt;br /&gt;
    PSK identity hint: None&lt;br /&gt;
    SRP username: None&lt;br /&gt;
    Start Time: 1413885545&lt;br /&gt;
    Timeout   : 7200 (sec)&lt;br /&gt;
    Verify return code: 21 (unable to verify the first certificate)&lt;br /&gt;
---&lt;br /&gt;
DONE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== CANNOT CONNECT = NOT VULNERABLE = OK ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nagios@vm1m:~$ echo|openssl s_client -ssl3 -host demo.neosys.com -port 443&lt;br /&gt;
CONNECTED(00000003)&lt;br /&gt;
write:errno=104&lt;br /&gt;
---&lt;br /&gt;
no peer certificate available&lt;br /&gt;
---&lt;br /&gt;
No client certificate CA names sent&lt;br /&gt;
---&lt;br /&gt;
SSL handshake has read 0 bytes and written 0 bytes&lt;br /&gt;
---&lt;br /&gt;
New, (NONE), Cipher is (NONE)&lt;br /&gt;
Secure Renegotiation IS NOT supported&lt;br /&gt;
Compression: NONE&lt;br /&gt;
Expansion: NONE&lt;br /&gt;
SSL-Session:&lt;br /&gt;
    Protocol  : SSLv3&lt;br /&gt;
    Cipher    : 0000&lt;br /&gt;
    Session-ID:&lt;br /&gt;
    Session-ID-ctx:&lt;br /&gt;
    Master-Key:&lt;br /&gt;
    Key-Arg   : None&lt;br /&gt;
    PSK identity: None&lt;br /&gt;
    PSK identity hint: None&lt;br /&gt;
    SRP username: None&lt;br /&gt;
    Start Time: 1413885702&lt;br /&gt;
    Timeout   : 7200 (sec)&lt;br /&gt;
    Verify return code: 0 (ok)&lt;br /&gt;
---&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enabling Internet Explorer 6 to access secured https web servers ===&lt;br /&gt;
&lt;br /&gt;
To use Internet explorer 6 (on win2003 and XP-before-SP3) to access secured http web sites you need to enable IE6 to use TLS 1.0. Internet Explorer 6 is present in Windows Server 2003 and Windows XP-pre-SP3.&lt;br /&gt;
&lt;br /&gt;
You can also disable SSL 2.0 and SSL 3.0 for additional safety. This good for later versions of Internet Explorer too.&lt;br /&gt;
&lt;br /&gt;
[[File:IE_options.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Generating IIS certificates for https using openssl ==&lt;br /&gt;
&lt;br /&gt;
This covers the two main type of certificates:&lt;br /&gt;
&lt;br /&gt;
#&amp;quot;proper&amp;quot; certificates (accepted by all browsers without complaint) - issued by bona fide certification authority only on proof of control of a domain name - usually for a small fee&lt;br /&gt;
#&amp;quot;self signed&amp;quot; certificates (not accepted by all browsers without error messages without special configuration) - easily&lt;br /&gt;
issued by anybody without the slightest restriction&lt;br /&gt;
&lt;br /&gt;
NEOSYS&#039; proper https certificate for *.hosts.neosys.com, valid approx Jan-Dec 2016, issued by Comodo, was purchased from namecheap.com for a small fraction of the price of purchasing from Comodo or one of the other main certification authorities.&lt;br /&gt;
&lt;br /&gt;
There is no technical requirement to renew certificates with the same issuing authority, nor is their any restriction whatsoever from having multiple concurrent overlapping certificates, in any combination, for the the same domain name or subsets of a domain name. For a certificate to be &amp;quot;proper&amp;quot; it merely has to be issued by (not necessarily purchased from) one of the certificate authorities registered in all the main browsers using by NEOSYS clients. Unlike DNS domain name registrars, of which you can only have one at any one time, and which take to change, certificates are simply installed in particular servers without reference to each other, nor to any imaginary central internet registry, as IS the case for the DNS domain name registry.&lt;br /&gt;
&lt;br /&gt;
The sales of certificates is a bit of scam really because anybody can get a certificate from the main commercial certificate authorities merely by proving control over a domain name - for example, by receiving an email to ADMIN@xxxxx.com. Except for EV certificates such as those issued to banks etc, most https certificates are issued without any check on physical identity or reputation, therefore the cost of issuing https certificates rests merely on the fact that the certification authority has managed to inveigle itself into all the main browsers and have their public key installed along with the browser software. Hoowever, the market seems to be collapsing, with even free certificate authorities appearing although with some minor limitations like short duration of validity of certificates.&lt;br /&gt;
&lt;br /&gt;
Excellent summary of using openssl to manage certificates .. no Alternate Names though&lt;br /&gt;
https://www.digitalocean.com/community/tutorials/openssl-essentials-working-with-ssl-certificates-private-keys-and-csrs&lt;br /&gt;
&lt;br /&gt;
Excellent summary of selfsigned and properly signed certificate&lt;br /&gt;
https://httpd.apache.org/docs/2.4/ssl/ssl_faq.html&lt;br /&gt;
&lt;br /&gt;
==== Commentary on https security ====&lt;br /&gt;
&lt;br /&gt;
With the general move to using https instead of http after the Snowdon revelations, people have begun to better understand how https certificates really work. People are more aware now that most https certificates mean little more than that their communication with the server is a) confidential b) not tampered with c) is truly with the server/domain name apparent and not some other. ALL WITH THE EXCEPTION OF *ANYBODY* WHO IS A CERTIFICATE AUTHORITY REGISTERED IN THE MAIN BROWSERS - WHICH IS MANY - INCLUDING NON-FRIENDLY NATIONAL STATE ACTORS!&lt;br /&gt;
&lt;br /&gt;
It is possible however to be virtually certain of confidentiality and accuracy of your communication using standard browsers, EVEN VERSUS CERTIFICATION AUTHORITIES. If, by inspecting the certificate when you are browsing a particular web site, you can satisfy  yourself that it is in fact truly the one in use by the web server, the chances of your communication being secure is virtually 100% The only chance is some failure in fundamental encryption protocols. Such failures would either be public knowledge very quickly, or not used versus you, for fear of it becoming public knowledge, unless you really have something incredibly valuable to hide. In this sense, self-certified certificates are the most secure, since you can obtain them by some other secure channel directly from the web server operator and do not change without your action. Note that in order to ensure that a certificate does not change during your session, to say an unknown valid certificate that breaks your security, your browser must support certificate pinning, in which case the browser will either prevent, or inform you if the certificate for the web site changes, either between or within sessions.&lt;br /&gt;
&lt;br /&gt;
To gain a practical understanding of the issues raised if you trust the certification authorities built in to your browser, consider the fact that many companies require an additional certificate authority to be installed in all corporate browsers (and in some famous cases have installed it covertly), and thereafter all https communications are decrypted in the company firewall/proxy using the corporate certificate, checked for content and reencrypted with the true certificate before being passed on - or vice versa, depending on the direction of flow of information. This, for example means that an employee accessing their bank account would be completely exposed to the corporate gaze. Two factor security would prevent corporate interference in say, instructions to make payments, but all information would be exposed and probably logged in possibly long term records. The same would apply to all https web sites accessed by the employee. Courts seem to agree that corporations have every right to do this but the average person is commonly not aware of it. If a person understood how https security works, they could inspect the https certificate to make sure it is the correct (same one issued by their bank apparent at home for example), since it is unlikely that an adversary (or in this case their employer) would control their actual browser software, but security is an arms race and once everybody knows how to defend themselves, adversaries and security operators will simply move to the next level. The next level may be preventing users from using their own browsers. This is already the case in most secure environment, but not all, and BYOD attitudes may prevail in the long run. Whatever the issues are in this case, the same general principle apply in other situations involving security.&lt;br /&gt;
&lt;br /&gt;
=== Generating a self signed certificate in pfx form for IIS ===&lt;br /&gt;
&lt;br /&gt;
Generating certificates and keys https://httpd.apache.org/docs/2.4/ssl/ssl_faq.html&lt;br /&gt;
&lt;br /&gt;
Generating a pfx using openssl https://langui.sh/2009/01/24/generating-a-pkcs12-pfx-via-openssl/&lt;br /&gt;
&lt;br /&gt;
==== Generate standard cert and key pair ====&lt;br /&gt;
&lt;br /&gt;
First generate a matching pair of certificate and key files (x509 and rsa format respectively)&lt;br /&gt;
&lt;br /&gt;
Example for *.mydomain and validity 9999 days from now&lt;br /&gt;
&lt;br /&gt;
 signer=self&lt;br /&gt;
 mydomain=neosys.com&lt;br /&gt;
 mydomains=*.neosys.com&lt;br /&gt;
 expirydays=9999&lt;br /&gt;
 keyno=`date`&lt;br /&gt;
 certno=$keyno&lt;br /&gt;
 #&lt;br /&gt;
 certfilename=$mydomain-$signer-$certno.cer&lt;br /&gt;
 keyfilename=$mydomain-$keyno.key&lt;br /&gt;
 #&amp;quot;-nodes&amp;quot; means -no-DES ie no encryption ie generate a key file without encrypting it and therefore without requiring a password on it&lt;br /&gt;
 openssl req -new -x509 -nodes -days $expirydays -out &amp;quot;$certfilename&amp;quot; -keyout &amp;quot;$keyfilename&amp;quot; \&lt;br /&gt;
     -subj &amp;quot;/C=AE/ST=DUBAI/O=NEOSYS/CN=*.neosys.com&amp;quot; \&lt;br /&gt;
     -reqexts SAN     -config &amp;lt;(cat /etc/ssl/openssl.cnf \&lt;br /&gt;
      &amp;lt;(printf &amp;quot;[SAN]\nsubjectAltName=DNS:*.hosts.neosys.com,DNS:*.support.neosys.com&amp;quot;)) \&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Consider adding subject and subject alternative names&lt;br /&gt;
&lt;br /&gt;
 openssl x509 -req -new -sha256 \&lt;br /&gt;
     -newkey rsa:2048 \&lt;br /&gt;
     -keyout neosys.com-102.key \&lt;br /&gt;
     -subj &amp;quot;/C=AE/ST=DUBAI/O=NEOSYS/CN=*.neosys.com&amp;quot; \&lt;br /&gt;
     -reqexts SAN     -config &amp;lt;(cat /etc/ssl/openssl.cnf \&lt;br /&gt;
      &amp;lt;(printf &amp;quot;[SAN]\nsubjectAltName=DNS:*.hosts.neosys.com,DNS:*.support.neosys.com&amp;quot;)) \&lt;br /&gt;
     -out neosys.com-102.crt \&lt;br /&gt;
     -nodes \&lt;br /&gt;
     -days 9999&lt;br /&gt;
&lt;br /&gt;
Example session:&lt;br /&gt;
&lt;br /&gt;
 Country Name (2 letter code) [AU]:AE&lt;br /&gt;
 State or Province Name (full name) [Some-State]:DUBAI&lt;br /&gt;
 Locality Name (eg, city) []:DUBAI&lt;br /&gt;
 Organization Name (eg, company) [Internet Widgits Pty Ltd]:NEOSYS&lt;br /&gt;
 Organizational Unit Name (eg, section) []:IT&lt;br /&gt;
 Common Name (e.g. server FQDN or YOUR name) []:*.neosys.com&lt;br /&gt;
 Email Address []:it@neosys.com&lt;br /&gt;
&lt;br /&gt;
=== Generating a properly signed certificate ===&lt;br /&gt;
&lt;br /&gt;
http://wiki.gandi.net/en/ssl/csr#sha-2_certificate_request&lt;br /&gt;
&lt;br /&gt;
==== Generate key and CSR file ====&lt;br /&gt;
&lt;br /&gt;
A certificate signing request file (.csr) for *.hosts.neosys.com (wildcard certificate)&lt;br /&gt;
&lt;br /&gt;
if you are renewing (and want to reuse an existing secret server key file mydomain.key, although not clear on the benefit ATM)&lt;br /&gt;
&lt;br /&gt;
 openssl req -new -nodes -sha256 -key mydomain.key -subj &amp;quot;/C=AE/ST=DUBAI/O=NEOSYS/CN=*.hosts.neosys.com&amp;quot; -out mydomain.csr&lt;br /&gt;
&lt;br /&gt;
or if you want to generate a new secret server key file&lt;br /&gt;
&lt;br /&gt;
 openssl req -new -nodes -sha256 -newkey rsa:2048 -keyout mydomain.key -subj &amp;quot;/C=AE/ST=DUBAI/O=NEOSYS/CN=*.hosts.neosys.com&amp;quot; -out mydomain.csr&lt;br /&gt;
&lt;br /&gt;
or if you want to request SAN subdomain wildcards (unlikely to be granted by main cert authorities but perfectly legal and can be self certified)&lt;br /&gt;
&lt;br /&gt;
 openssl req -new -nodes -sha256 -newkey rsa:2048 -keyout mydomain.key -subj &amp;quot;/C=AE/ST=DUBAI/O=NEOSYS/CN=*.neosys.com&amp;quot; -out mydomain.csr \&lt;br /&gt;
     -reqexts SAN     -config &amp;lt;(cat /etc/ssl/openssl.cnf \&lt;br /&gt;
        &amp;lt;(printf &amp;quot;[SAN]\nsubjectAltName=DNS:neosys.com,DNS:*.neosys.com,DNS:*.support.neosys.com,DNS:*.hosts.neosys.com&amp;quot;))&lt;br /&gt;
&lt;br /&gt;
View the csr and verify correct (check that SAN additional domains are listed if you requested them above)&lt;br /&gt;
&lt;br /&gt;
 openssl req -in mydomain.csr -noout -text&lt;br /&gt;
&lt;br /&gt;
==== Either send to CA and get crt/cer file back ====&lt;br /&gt;
&lt;br /&gt;
Send the csr file to the certifying authority and put their response in a mydomain.crt file&lt;br /&gt;
&lt;br /&gt;
Make sure you inform them that the type of software you used to generate the csr is &amp;quot;mod Apache/ModSSL&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 mydomain.csr -&amp;gt; mydomain.cer&lt;br /&gt;
&lt;br /&gt;
==== Or self sign to test all ok ====&lt;br /&gt;
&lt;br /&gt;
 nano ssl.conf&lt;br /&gt;
&lt;br /&gt;
 [req_distinguished_name]&lt;br /&gt;
 countryName = Country Name (2 letter code)&lt;br /&gt;
 countryName_default = AE&lt;br /&gt;
 stateOrProvinceName = State or Province Name (full name)&lt;br /&gt;
 stateOrProvinceName_default = Dubai&lt;br /&gt;
 localityName = Locality Name (eg, city)&lt;br /&gt;
 localityName_default = Dubai&lt;br /&gt;
 organizationalUnitName  = Organizational Unit Name (eg, section)&lt;br /&gt;
 organizationalUnitName_default  = IT&lt;br /&gt;
 commonName = *.neosys.com&lt;br /&gt;
 commonName_max  = 64&lt;br /&gt;
 #&lt;br /&gt;
 [ v3_req ]&lt;br /&gt;
 # Extensions to add to a certificate request&lt;br /&gt;
 basicConstraints = CA:FALSE&lt;br /&gt;
 #keyUsage = nonRepudiation, digitalSignature, keyEncipherment&lt;br /&gt;
 subjectAltName = @alt_names&lt;br /&gt;
 #&lt;br /&gt;
 [alt_names]&lt;br /&gt;
 DNS.1 = neosys.com&lt;br /&gt;
 DNS.2 = *.neosys.com&lt;br /&gt;
 DNS.3 = *.hosts.neosys.com&lt;br /&gt;
 DNS.4 = *.support.neosys.com&lt;br /&gt;
&lt;br /&gt;
 openssl x509 -signkey mydomain.key -in mydomain.csr -req -days 9999 -extensions v3_req   -extfile ssl.conf -out mydomain.crt&lt;br /&gt;
&lt;br /&gt;
view the cert and check extensions (additional domain names) are present if required&lt;br /&gt;
&lt;br /&gt;
 openssl x509 -in mydomain.crt -text -noout&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Merge private key and signed public cert into password protected pfx file ====&lt;br /&gt;
&lt;br /&gt;
Convert the pair of standard files into a single pfx file that IIS can import&lt;br /&gt;
&lt;br /&gt;
 friendlyname=&amp;quot;COMODO SIGNED hosts.neosys.com *.hosts.neosys.com&amp;quot;&lt;br /&gt;
 openssl pkcs12 -export -in mydomain.crt -inkey mydomain.key -name &amp;quot;$friendlyname&amp;quot; -out mydomain.pfx&lt;br /&gt;
&lt;br /&gt;
It will ask for a password .. the usual NEOSYS one is 1f... which will be required when you import the pfx file into IIS before binding to web sites&lt;br /&gt;
&lt;br /&gt;
Example session:&lt;br /&gt;
&lt;br /&gt;
 Enter Export Password:&lt;br /&gt;
 Verifying - Enter Export Password:&lt;br /&gt;
&lt;br /&gt;
Check the pfx file&lt;br /&gt;
&lt;br /&gt;
 openssl pkcs12 -in mydomain.pfx&lt;br /&gt;
&lt;br /&gt;
 openssl pkcs12 -in mydomain.pfx | openssl x509 -noout -text&lt;br /&gt;
&lt;br /&gt;
==== Copy the pfx file to the IIS server and import/bind in the usual way ====&lt;br /&gt;
&lt;br /&gt;
Copy it to the https server&lt;br /&gt;
&lt;br /&gt;
 mysshport=&amp;quot;-P 19510&amp;quot;&lt;br /&gt;
 mysshtarget=&amp;quot;administrator@win3.neosys.com:/cygdrive/d/hosts/CERTIFICATES&amp;quot;&lt;br /&gt;
 scp $mysshport mydomain.pfx $mysshtarget&lt;br /&gt;
&lt;br /&gt;
==== Friendly name in pfx file ====&lt;br /&gt;
&lt;br /&gt;
On the IIS server after importing, if you have multiple certificates for the same domain name you might like to add a &amp;quot;friendly name&amp;quot; to distinguish them in the dropdown when binding certificates to web sites.&lt;br /&gt;
&lt;br /&gt;
You might also want to add the friendly name to the pfx file if you intend to import it again or elsewhere using certificate export to pfx with options Include All and Export All&lt;br /&gt;
&lt;br /&gt;
https://rickardrobin.wordpress.com/2012/12/05/specifying-a-friendly-name-to-a-certificate/&lt;br /&gt;
&lt;br /&gt;
=== Understanding SSL certificates ===&lt;br /&gt;
&lt;br /&gt;
==== What are RSA Private Keys, CSRs and Certificates? ====&lt;br /&gt;
&lt;br /&gt;
YOUR RSA PRIVATE KEY FILE&lt;br /&gt;
&lt;br /&gt;
is a digital file created by you and never ever shared with others. It is USED ONLY BY YOU (never by others) to either:&lt;br /&gt;
&lt;br /&gt;
*to DECRYPT secret, encrypted, messages received by you from others&lt;br /&gt;
*to SIGN messages before sending them to others providing them certainty that the message came from you without being tampered with and that you cannot deny signing them.&lt;br /&gt;
&lt;br /&gt;
YOUR RSA PUBLIC KEY FILE&lt;br /&gt;
&lt;br /&gt;
is a digital file created by you and freely shared with others. It is USED BY OTHERS (never by you) to either:&lt;br /&gt;
&lt;br /&gt;
*ENCRYPT messages before sending them to you&lt;br /&gt;
*VERIFY that signed messages were in fact signed by you and not tampered with and you cannot deny signing them.&lt;br /&gt;
&lt;br /&gt;
OTHER PERSON&#039;S RSA PUBLIC KEY FILE&lt;br /&gt;
&lt;br /&gt;
is a digital file created by the other person and freely shared with you and others. It is USED BY YOU OR ANYBODY (never by the other person) to either:&lt;br /&gt;
&lt;br /&gt;
*ENCRYPT messages to achieve secrecy before sending them to the other person.&lt;br /&gt;
*VERIFY that signed messages received were in fact signed by the other person and that they cannot deny signing them nor claim they have been tampered with.&lt;br /&gt;
&lt;br /&gt;
To obtain someone&#039;s public key, you need a trusted channel, ie a signed channel, but not a secret or encrypted channel since the information is public and not confidential.&lt;br /&gt;
&lt;br /&gt;
Using your private key and someones public key together:&lt;br /&gt;
&lt;br /&gt;
*If you want to send a signed secret message to someone and allow them to be sure it came unmodified from you, you first sign the message using YOUR PRIVATE KEY, then encrypt the message using THEIR PUBLIC KEY&lt;br /&gt;
*If you want to receive a secret message and verify that it came unmodified from someone in particular, you first you decrypt the message using YOUR PRIVATE KEY, then verify the message using THEIR PUBLIC KEY&lt;br /&gt;
&lt;br /&gt;
Signing and Verification = Encryption and Decryption Mathematical Process with keys reversed&lt;br /&gt;
&lt;br /&gt;
Actually, the process of &amp;quot;signing&amp;quot; is doing the same mathematical process as encryption, but since you use the recipients public key, the resultant &amp;quot;encrypted&amp;quot; messege is not secret because it can be &amp;quot;decrypted&amp;quot; using a public key which are freely available.&lt;br /&gt;
&lt;br /&gt;
Likewise, the process of &amp;quot;verification&amp;quot; on a received message is doing the same mathematical process as decryption, but since you are using the senders public key, and anybody could &amp;quot;decrypt&amp;quot; the message, it was not really encrypted in the sense of being secret.&lt;br /&gt;
&lt;br /&gt;
So we have two processes, one called Encryption/Signing but is exactly the same mathematical process with two names depending on whether we use a public or private key, and another process called Decryption/Verification which uses the opposite key.&lt;br /&gt;
&lt;br /&gt;
What YOU use for what:&lt;br /&gt;
&lt;br /&gt;
*YOUR (PRIVATE) KEY = USED BY YOU for decryption and signing&lt;br /&gt;
*THEIR (PUBLIC) KEY = USED BY YOU for encryption and verification&lt;br /&gt;
&lt;br /&gt;
*YOUR (PUBLIC) KEY = NEVER USED BY YOU - since anybody else could do the same thing so no trust or secrecy could be obtained&lt;br /&gt;
*THEIR (PRIVATE) KEY = NEVER USED BY YOU - since you dont have it!&lt;br /&gt;
&lt;br /&gt;
What to use:&lt;br /&gt;
&lt;br /&gt;
*ENCRYPT OUTGOING = Use THEIR (public) key&lt;br /&gt;
*VERIFY INCOMING = Use THEIR (public) key&lt;br /&gt;
&lt;br /&gt;
*DECRYPT INCOMING = Use YOUR (private) key&lt;br /&gt;
*SIGN OUTGOING = Use YOUR (private) key&lt;br /&gt;
&lt;br /&gt;
So the slightly strange thing is that you dont encrypt messages with your private key as might be assumed naturally. You encrypt using the target recipient&#039;s public key. This is perfectly logical if you understand the concept asymmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
One thing to note is that, while it is obvious that other people never use your private key, since they dont have it, it is not obvious, but perfectly true, that you never use your public key. NOBODY EVER USES THEIR OWN PUBLIC KEY ... THEY ONLY GIVE IT TO OTHERS TO USE.&lt;br /&gt;
&lt;br /&gt;
CERTIFICATE&lt;br /&gt;
&lt;br /&gt;
It has a public component which you distribute (via your Certificate file) which allows people to encrypt those messages to you. It can also be used by you to sign messages that can be verified as having come from you by anyone who receives the signed message, using your public key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CSR FILE&lt;br /&gt;
&lt;br /&gt;
A Certificate Signing Request (CSR) is a digital file which contains your public key and your details eg name/domain name etc. You send the CSR to a Certifying Authority (CA), who will create a real Certificate containing your detail eg your domain name and your public key, signed by them using their private RSA private key.&lt;br /&gt;
&lt;br /&gt;
CERTIFICATE&lt;br /&gt;
&lt;br /&gt;
A Certificate contains your RSA public key, your name, the name of the CA, and is digitally signed by the CA. Browsers that know the CA can verify the signature on that Certificate, thereby obtaining your RSA public key. That enables them to send messages which only you can decrypt.&lt;br /&gt;
&lt;br /&gt;
==== What is Asymmetric cryptography? ====&lt;br /&gt;
&lt;br /&gt;
Asymmetric cryptography allows you to freely publish a &amp;quot;public&amp;quot; key that can be used by anyone to send you encrypted messages. Such messages can only be decrypted by you using a special matching &amp;quot;private&amp;quot; key which you always keep secret.&lt;br /&gt;
&lt;br /&gt;
Asymmetric cryptography also allows you to publish &amp;quot;signed&amp;quot; messages that can be verified by anyone as coming directly from you without any modification by others. Such messages are created using your &amp;quot;private&amp;quot; key and can be verified by anyone who has your &amp;quot;public&amp;quot; key. Creation involves the same process as encryption. Verification uses the same process as decryption.&lt;br /&gt;
&lt;br /&gt;
Note that you dont ever actually use your own public key. You use your private key to decrypt messages sent to you, and you use the same key to &amp;quot;sign&amp;quot; messages to prove they came from you and without modification. Likewise other people only ever use your &amp;quot;public&amp;quot; key - either for encrypting messages that they want to send to you, or verifying that signed messages did come from you unmodified.&lt;br /&gt;
&lt;br /&gt;
So we have a pair of keys that if either one is used for encryption/signing, then the other one is required for decryption/verifying. In that sense, it does not matter which we choose to keep private and which public, but ensure that we only ever publish one of them and forever keep the other secret.&lt;br /&gt;
&lt;br /&gt;
So, to start encrypting or signing, you need a matched pair of keys, and you need to publish one to other people and forever keep the other one secret.&lt;br /&gt;
&lt;br /&gt;
.key a file that contains a random collection of characters that can be used to encrypt&lt;br /&gt;
&lt;br /&gt;
.cer a file that contains a random collection of characters that can be given out publicly and used by anybody to encrypt something to be sent to you&lt;br /&gt;
&lt;br /&gt;
A certificate is some information that has been processed by a private and secret key.&lt;br /&gt;
&lt;br /&gt;
pfx contains a private key and public certificate which contains your public key embedded. Usually pfx files are encrypted and you have to enter a password before using them, ie importing them.&lt;br /&gt;
&lt;br /&gt;
==[[Backing up and Restoring IIS configuration]]==&lt;br /&gt;
&lt;br /&gt;
== Solving IIS errors ==&lt;br /&gt;
&lt;br /&gt;
=== Solving error during file upload: &amp;quot;Page cannot be displayed&amp;quot; HTTP Error 405 in windows 2003 ===&lt;br /&gt;
&lt;br /&gt;
This error should not occur in normal NEOSYS installations but the solution is as follows:&lt;br /&gt;
&lt;br /&gt;
# Go to Control Panel, Administrative Tools, Internet Information Services&lt;br /&gt;
# Expand the tree to COMPUTERNAME, Web Sites&lt;br /&gt;
# Right-click &amp;quot;Default Web Site&amp;quot; (or specific Web Site if multiple NEOSYS http/https installations on the server as per WIN3)&lt;br /&gt;
# Properties&lt;br /&gt;
# Home Directory&lt;br /&gt;
# Configuration&lt;br /&gt;
# Mappings, Add&lt;br /&gt;
# Browse&lt;br /&gt;
# Dynamic Link Libraries *.dll&amp;quot; from the &amp;quot;Files of Type&amp;quot; dropdown&lt;br /&gt;
# Find and select D:\NEOSYS\neosys.net\NEOSYS\dll\upload.dll (OR upload.dll in the installation directory)&lt;br /&gt;
# Extension Type: dll&lt;br /&gt;
# Limit to: All&lt;br /&gt;
# Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
=== Solving error during file upload: &amp;quot;HTTP verb used to access this page is not allowed&amp;quot; HTTP Error 405 in windows 2008 ===&lt;br /&gt;
&lt;br /&gt;
Cause: This error occurs when upload.dll is not set up on IIS &lt;br /&gt;
&lt;br /&gt;
Solution: Ensure upload.dll is setup as per configuration: [[Configuring_IIS#Configure_file_uploads_besides_adding_the_images_directory|Setting up upload.dll]]&lt;br /&gt;
&lt;br /&gt;
[[File:uploadiis2.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Solving &amp;quot;HTTP Error 503. The service is unavailable.&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
Look in event log for errors saying various dlls have failed to load eg&lt;br /&gt;
&lt;br /&gt;
 The Module DLL C:\Windows\System32\inetsrv\authsspi.dll failed to load. The data is the error.&lt;br /&gt;
&lt;br /&gt;
These errors indicate that IIS is configured to use various modules that have not been installed, possibly due to restoration of IIS configuration backups which mention them but the restore program restores the configuration but does not install the dll. They may not even be required, but how to exclude them is not solved in this article.&lt;br /&gt;
&lt;br /&gt;
Solution is to install the various required modules by right clicking IIS role and choosing Add Role Service&lt;br /&gt;
&lt;br /&gt;
*inetsrv\filter.dll - ISAPI Filters&lt;br /&gt;
*validcfg.dll - .NET Extensibility?&lt;br /&gt;
*iis_ssi.dll - Server Side Includes&lt;br /&gt;
*authsspi.dll - Windows Authentication&lt;br /&gt;
&lt;br /&gt;
A list of module names mapped to dll files can be found in the IIS configuration file. This may give a clue what module is required to be added in Programs and Features or Roles. Alternatively, the module may no longer be required on a new server and can be deleted from the configuration file (may cause strange errors later on) and IIS restarted with a new configuration.&lt;br /&gt;
&lt;br /&gt;
 cd C:\Windows\System32\inetsrv\config&lt;br /&gt;
 notepad applicationHost.config&lt;br /&gt;
&lt;br /&gt;
Example from neosys win3:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        &amp;lt;globalModules&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;UriCacheModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\cachuri.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;FileCacheModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\cachfile.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;TokenCacheModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\cachtokn.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;HttpCacheModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\cachhttp.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;StaticCompressionModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\compstat.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;DefaultDocumentModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\defdoc.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;DirectoryListingModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\dirlist.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;ProtocolSupportModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\protsup.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;StaticFileModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\static.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;AnonymousAuthenticationModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\authanon.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;RequestFilteringModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\modrqflt.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;CustomErrorModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\custerr.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;HttpLoggingModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\loghttp.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;RequestMonitorModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\iisreqs.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;IsapiModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\isapi.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;IsapiFilterModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\filter.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;ConfigurationValidationModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\validcfg.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;ManagedEngine&amp;quot; image=&amp;quot;%windir%\Microsoft.NET\Framework\v2.0.50727\webengine.dll&amp;quot; preCondition=&amp;quot;integratedMode,runtimeVersionv2.0,bitness32&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;ServerSideIncludeModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\iis_ssi.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;WindowsAuthenticationModule&amp;quot; image=&amp;quot;%windir%\System32\inetsrv\authsspi.dll&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;ManagedEngineV4.0_32bit&amp;quot; image=&amp;quot;c:\Windows\Microsoft.NET\Framework\v4.0.30319\webengine4.dll&amp;quot; preCondition=&amp;quot;integratedMode,runtimeVersionv4.0,bitness32&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;add name=&amp;quot;ManagedEngineV4.0_64bit&amp;quot; image=&amp;quot;c:\Windows\Microsoft.NET\Framework64\v4.0.30319\webengine4.dll&amp;quot; preCondition=&amp;quot;integratedMode,runtimeVersionv4.0,bitness64&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/globalModules&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Solving HTTP Error 404 Error occurring immediately on opening NEOSYS login page on a new server installation: &amp;quot;System Failure. Do you want to retry?&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This error message is caused by failing to enable Active Server Pages in the IIS configuration. To resolve this in windows 2008, [[Configuring_IIS#Configure_file_uploads_besides_adding_the_images_directory| ensure that Read, Script, Execute is ticked (enabled) in the feature permissions of these Handler Mappings.]]&lt;br /&gt;
&lt;br /&gt;
This message is from IE8 and a Windows 2003 server. The message may be different for other browser versions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Message from web page.&lt;br /&gt;
&lt;br /&gt;
System Failure. Do you want to retry?&lt;br /&gt;
&lt;br /&gt;
The page cannot be found&lt;br /&gt;
The page you are looking for might have been removed, had its name change, or it temporarily unavailable.&lt;br /&gt;
&lt;br /&gt;
Please try the following:&lt;br /&gt;
(omitted)&lt;br /&gt;
HTTP Error 404 - File or directory not found.&lt;br /&gt;
Internet Information Services (IIS)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[image:http404.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Solving HTTP 404 Webpage cannot be found ===&lt;br /&gt;
&lt;br /&gt;
This error message clearly states that the page cannot be found. Check for the requested page in the client website folder under the virtual directory data. This page will be available under the data folder in D:\neosys\data. A possible cause of this error is by failing to create a virtual directory called data linked to D:\neosys\data:&lt;br /&gt;
&lt;br /&gt;
[[image:http404p.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Solving &amp;quot;Service unavailable&amp;quot; error due to disabled application pool ===&lt;br /&gt;
&lt;br /&gt;
====Problem:====&lt;br /&gt;
&lt;br /&gt;
Browser shows &amp;quot;Service unavailable&amp;quot; when trying to access NEOSYS&lt;br /&gt;
&lt;br /&gt;
[[image:serviceunavailable.jpg]]&lt;br /&gt;
&lt;br /&gt;
Check if IIS application pool is disabled. IIS application pool gets automatically disabled after a series of worker process failures. &lt;br /&gt;
&lt;br /&gt;
Open system logs and check for W3SVC error with event ID 1002 to confirm that the application pool was disabled automatically due to a series of failures in the process(es) serving that application pool.&lt;br /&gt;
&lt;br /&gt;
[[image:w3svcerror.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Solution:==== &lt;br /&gt;
Open IIS, expand application pools, right-click the application pool that was automatically disabled, and click Start. &lt;br /&gt;
Browse to NEOSYS website to check if the problem is fixed.&lt;br /&gt;
&lt;br /&gt;
====Additional Information:====&lt;br /&gt;
&lt;br /&gt;
To view the settings for the number of process failures after which the application pool gets disabled, go to IIS, expand application pools, right-click the application pool, click &amp;quot;Set Application Pool Defaults&amp;quot; (for Windows Server 2003, right-click the application pool, click properties and then go to the &amp;quot;Health&amp;quot; tab).&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Rapid-Fail Protection&amp;quot; is the feature that disables the application if there are a certain number of worker process failures within a specified time period.&lt;br /&gt;
&lt;br /&gt;
As per the configuration shown in the example screenshot below, application pool &amp;quot;DefaultAppPool&amp;quot; will be automatically disabled if 5 or more worker process failures happen within a time period of 5 minutes.&lt;br /&gt;
&lt;br /&gt;
[[image:apppool.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Solving Error &amp;quot;The specified Executable does not exist on the server&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
While adding Script Map in Handler Mappings in the above step, if you get the below error, this means you have not yet run the Maintenance window/ NEOSYS processes and skipped steps in Installing NEOSYS. File upload.dl_ is installed from NEOSYS.EXE or NEOSYS2.EXE and converted to .dll the first time you run NEOSYS Maintenance/Process. You can also manually rename the file to upload.dll. &lt;br /&gt;
&lt;br /&gt;
[[image:Dll_error.png]]&lt;br /&gt;
&lt;br /&gt;
=== Solving IIS error 500 on uploading for windows 2008===&lt;br /&gt;
&lt;br /&gt;
To test if permissions are the problem, in grant full control to IUSR over the whole client directory e.g d:\neosys or d:\hosts\clientx in security tab of windows explorer and see if you can upload.&lt;br /&gt;
&lt;br /&gt;
Regardless of the result, remove the full control permissions since they are a security risk.&lt;br /&gt;
&lt;br /&gt;
If permissions are the problem then grant specific permissions as follows:&lt;br /&gt;
&lt;br /&gt;
#images folder - read and write permissions (but not execute)&lt;br /&gt;
#dll folder - read and execute permission (no write permission)&lt;br /&gt;
&lt;br /&gt;
=== Solving error &amp;quot;Upload folder cannot be created.The system cannot find the drive specified&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This error message comes up when the file uploads are configured to a different location in the software than what is set up in IIS.&lt;br /&gt;
&lt;br /&gt;
There is an internal system configuration in line 49 of the DOS SYSTEM.CFG file which mentions the upload folder location (normally blank which means xxxxxx\images\ where xxxxxx is the installation directory e.g d:\neosys)&lt;br /&gt;
&lt;br /&gt;
In installations where the images are uploaded to a place other than the installation directory, the configuration may say something like h:\images\ where h represents the drive where the folder is located e.g on an external USB drive. This may be done in case of client installations where file uploads are configured on USB drives due to a huge number of files getting uploaded.&lt;br /&gt;
&lt;br /&gt;
The IIS and internal system configuration must agree, otherwise users will probably not be able to upload files, or the uploaded files may not be saved in the right place and may be lost, not backed up and/or not viewable.&lt;br /&gt;
&lt;br /&gt;
To fix this issue, you MUST link the &#039;&#039;&#039;images&#039;&#039;&#039; folder in IIS to xxxxxx\images\ where xxxxxx is the directory of the images folder as shown in the error message.&lt;br /&gt;
&lt;br /&gt;
[[File:Uploaderror.png]]&lt;br /&gt;
&lt;br /&gt;
===[[Troubleshooting_NEOSYS_Generally#Solving_.E2.80.9Cpage_not_found.E2.80.9D_or_.22HTTP_Error_404.3_-_Not_Found.22_when_downloading_some_file_types_after_uploading_them_successfully|Solving “page not found” or &amp;quot;HTTP Error 404.3 - Not Found&amp;quot; when downloading some file types after uploading them successfully]] ===&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Setting_up_HTTPS&amp;diff=3517</id>
		<title>Setting up HTTPS</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Setting_up_HTTPS&amp;diff=3517"/>
		<updated>2018-10-06T17:17:05Z</updated>

		<summary type="html">&lt;p&gt;Steve: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Setting up HTTPS for NEOSYS website ==&lt;br /&gt;
&lt;br /&gt;
CAUTION: When importing certificates on servers that are not owned by NEOSYS you MUST NOT check the &amp;quot;allow certificate export&amp;quot; option otherwise anybody with access to the server can steal the NEOSYS certificate and pass off their own servers as NEOSYS certified.&lt;br /&gt;
&lt;br /&gt;
NEOSYS has a very simple way of enabling https for all the clients. Every client has been set up with domain name &amp;quot; *.hosts.neosys.com &amp;quot; where &amp;quot;*&amp;quot; is the clientname.&lt;br /&gt;
&lt;br /&gt;
Pre prepared certificate for *.hosts.neosys.com web sites is present on the nl10r/win3 server. The certificate is signed by COMODO and supports SHA2 security algorithm. It is portable, ensures authenticity and is widely supported. Also refer to [http://itwiki.neosys.com/index.php/SSL_certificate SSL certificate]&lt;br /&gt;
&lt;br /&gt;
If a client&#039;s URL is not as per NEOSYS standards, but has been in use for many years, do not change the URL without a good enough reason.&lt;br /&gt;
&lt;br /&gt;
=== Creating a single HTTPS web site on Windows 2008 ===&lt;br /&gt;
&lt;br /&gt;
To create a single HTTPS web site on Windows 2008, follow three simple steps:&lt;br /&gt;
&lt;br /&gt;
*Copy the &amp;quot;*.hosts.neosys.com.pfx&amp;quot; certificate saved in d:\hosts\certificates on win3 to the server (password to be used is present in a text file in the same folder).&lt;br /&gt;
*Import the certificate to IIS without option to export and MUST be deleted after import. See [http://techwiki.neosys.com/index.php/Setting_up_HTTPS#Steps_to_follow_while_importing_certificate_and_why Importing certificate in IIS] for details.&lt;br /&gt;
*Click on Sites &amp;gt; Client Web Site &amp;gt; Bindings. In the Bindings section - click on Add and select https, All Unassigned IP addresses, port 4430 and select the certificate from the drop down and click OK.&lt;br /&gt;
&lt;br /&gt;
[[image:sslwin2008-2.jpg]]&lt;br /&gt;
[[image:sslwin2008-3.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[image:sslwin2008-4.jpg]]&lt;br /&gt;
&lt;br /&gt;
Test the site from explorer to make sure it works.&lt;br /&gt;
&lt;br /&gt;
=== Creating a single HTTPS web site on Windows 2003 ===&lt;br /&gt;
&lt;br /&gt;
*Copy the &amp;quot;*.hosts.neosys.com.pfx&amp;quot; certificate saved in d:\hosts\certificates on win3 to the server. (password to be used is present in a text file in the same folder)&lt;br /&gt;
*Click on Sites &amp;gt; Properties &amp;gt; Directory Security &amp;gt; Server certificate. Follow the steps in the wizard to import/bind the certificate to port 4430. See [https://support.microsoft.com/en-us/kb/816794 Installing imported certificate in Windows 2003 IIS] for detailed steps to import.&lt;br /&gt;
&lt;br /&gt;
=== Creating multiple HTTPS web sites on NEOSYS hosted server ===&lt;br /&gt;
&lt;br /&gt;
All clients hosted on NEOSYS servers use the same IP address but unique HTTPS port numbers starting from 4431 onwards. The unique port number should be one greater than the highest port number available on the server under IIS manager -&amp;gt; NEOSYS -&amp;gt;Sites. &lt;br /&gt;
&lt;br /&gt;
*Click on Sites &amp;gt; Client Web Site &amp;gt; Bindings. In the Bindings section - click on Add and select https, All Unassigned IP addresses, port 4430 and select the &amp;quot;*.hosts.neosys.com.pfx&amp;quot; certificate from the drop down and click OK.&lt;br /&gt;
&lt;br /&gt;
Since the http access is not required for any Client on NEOSYS hosted server, this step of https binding can be performed while creating the client website as shown in the screen shot below.&lt;br /&gt;
&lt;br /&gt;
[[image:IISwin3.png]]&lt;br /&gt;
&lt;br /&gt;
=== Steps to follow while importing certificate and why ===&lt;br /&gt;
&lt;br /&gt;
#It MUST be imported  WITHOUT OPTION TO EXPORT and&lt;br /&gt;
#It MUST be deleted after import. &lt;br /&gt;
&lt;br /&gt;
It is especially important to keep pfx files off clients own servers because they are commonly directly exposed to potentially infected employees computers and/or personal devices via the corporate LAN so they may be far less secure than NEOSYS own servers which are reasonably well isolated. If a pfx file is obtained by criminal hackers, perhaps using automated tools, and the pfx password guessed, brute forced, or broken in some way, the keys contained could in principle be used against us or our clients. If the pfx file is a wildcard that supports any subdomain, then loss in one place could affect others. The chances of all this happening is probably very low but NEOSYS needs to be prepared to pass IT audits and leaving keys around will be viewed as having a culture of low security standards.&lt;br /&gt;
&lt;br /&gt;
==Setting up HTTPS for installations with more than 1 database==&lt;br /&gt;
&lt;br /&gt;
In cases where there are multiple databases within the same installation, you can use the same website to access all the databases. In case the Client asks for separate domain names for multiple databases, use the same steps as explained in [[Setting_up_HTTPS#Setting_up_HTTPS_for_NEOSYS_website|Setting up HTTPS]] as the case maybe.&lt;br /&gt;
&lt;br /&gt;
==Setting up HTTPS for installations where outside office access is usually restricted==&lt;br /&gt;
&lt;br /&gt;
During a new installation, support staff MUST import the certificate to IIS, bind the certificate to NEOSYS website (following the steps mentioned above in [[Setting_up_HTTPS#Creating_a_single_HTTPS_web_site_on_Windows_2008|Creating a single HTTPS web site]]) and test if NEOSYS can be accessed via https on the server (https://localhost:4430), so that no problems are faced in future if the client ever requests for outside access with their management&#039;s approval.&lt;br /&gt;
&lt;br /&gt;
Since the client management has informed that outside access is not required, close the server&#039;s port 4430 (i.e. remove 4430 from Windows Firewall exceptions). Do not remove the certificate binding in IIS.&lt;br /&gt;
&lt;br /&gt;
If and when https access is required by the client, this can be enabled by unblocking the server&#039;s port 4430 and instructing the client to get their IT to configure the router to port forward port 4430 for https.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting setup of multiple HTTPS websites ==&lt;br /&gt;
&lt;br /&gt;
=== Error while binding COMODO signed certificate to NEOSYS website===&lt;br /&gt;
&lt;br /&gt;
[[image:Test11.jpg]]&lt;br /&gt;
&lt;br /&gt;
 A specified logon  session does not exist. It may already have been terminated. &lt;br /&gt;
&lt;br /&gt;
If importing a certificate ONCE at the top level onto a NEOSYS controlled server with multiple web sites then you need to have used the you need to &amp;quot;mark the private key as exportable&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Setting_up_HTTPS&amp;diff=3516</id>
		<title>Setting up HTTPS</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Setting_up_HTTPS&amp;diff=3516"/>
		<updated>2018-10-06T17:11:22Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Error while binding COMODO signed certificate to NEOSYS website */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Setting up HTTPS for NEOSYS website ==&lt;br /&gt;
&lt;br /&gt;
NEOSYS has a very simple way of enabling https for all the clients. Every client has been set up with domain name &amp;quot; *.hosts.neosys.com &amp;quot; where &amp;quot;*&amp;quot; is the clientname.&lt;br /&gt;
&lt;br /&gt;
Pre prepared certificate for *.hosts.neosys.com web sites is present on the nl10r/win3 server. The certificate is signed by COMODO and supports SHA2 security algorithm. It is portable, ensures authenticity and is widely supported. Also refer to [http://itwiki.neosys.com/index.php/SSL_certificate SSL certificate]&lt;br /&gt;
&lt;br /&gt;
If a client&#039;s URL is not as per NEOSYS standards, but has been in use for many years, do not change the URL without a good enough reason.&lt;br /&gt;
&lt;br /&gt;
=== Creating a single HTTPS web site on Windows 2008 ===&lt;br /&gt;
&lt;br /&gt;
To create a single HTTPS web site on Windows 2008, follow three simple steps:&lt;br /&gt;
&lt;br /&gt;
*Copy the &amp;quot;*.hosts.neosys.com.pfx&amp;quot; certificate saved in d:\hosts\certificates on win3 to the server (password to be used is present in a text file in the same folder).&lt;br /&gt;
*Import the certificate to IIS without option to export and MUST be deleted after import. See [http://techwiki.neosys.com/index.php/Setting_up_HTTPS#Steps_to_follow_while_importing_certificate_and_why Importing certificate in IIS] for details.&lt;br /&gt;
*Click on Sites &amp;gt; Client Web Site &amp;gt; Bindings. In the Bindings section - click on Add and select https, All Unassigned IP addresses, port 4430 and select the certificate from the drop down and click OK.&lt;br /&gt;
&lt;br /&gt;
[[image:sslwin2008-2.jpg]]&lt;br /&gt;
[[image:sslwin2008-3.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[image:sslwin2008-4.jpg]]&lt;br /&gt;
&lt;br /&gt;
Test the site from explorer to make sure it works.&lt;br /&gt;
&lt;br /&gt;
=== Creating a single HTTPS web site on Windows 2003 ===&lt;br /&gt;
&lt;br /&gt;
*Copy the &amp;quot;*.hosts.neosys.com.pfx&amp;quot; certificate saved in d:\hosts\certificates on win3 to the server. (password to be used is present in a text file in the same folder)&lt;br /&gt;
*Click on Sites &amp;gt; Properties &amp;gt; Directory Security &amp;gt; Server certificate. Follow the steps in the wizard to import/bind the certificate to port 4430. See [https://support.microsoft.com/en-us/kb/816794 Installing imported certificate in Windows 2003 IIS] for detailed steps to import.&lt;br /&gt;
&lt;br /&gt;
=== Creating multiple HTTPS web sites on NEOSYS hosted server ===&lt;br /&gt;
&lt;br /&gt;
All clients hosted on NEOSYS servers use the same IP address but unique HTTPS port numbers starting from 4431 onwards. The unique port number should be one greater than the highest port number available on the server under IIS manager -&amp;gt; NEOSYS -&amp;gt;Sites. &lt;br /&gt;
&lt;br /&gt;
*Click on Sites &amp;gt; Client Web Site &amp;gt; Bindings. In the Bindings section - click on Add and select https, All Unassigned IP addresses, port 4430 and select the &amp;quot;*.hosts.neosys.com.pfx&amp;quot; certificate from the drop down and click OK.&lt;br /&gt;
&lt;br /&gt;
Since the http access is not required for any Client on NEOSYS hosted server, this step of https binding can be performed while creating the client website as shown in the screen shot below.&lt;br /&gt;
&lt;br /&gt;
[[image:IISwin3.png]]&lt;br /&gt;
&lt;br /&gt;
=== Steps to follow while importing certificate and why ===&lt;br /&gt;
&lt;br /&gt;
#It MUST be imported  WITHOUT OPTION TO EXPORT and&lt;br /&gt;
#It MUST be deleted after import. &lt;br /&gt;
&lt;br /&gt;
It is especially important to keep pfx files off clients own servers because they are commonly directly exposed to potentially infected employees computers and/or personal devices via the corporate LAN so they may be far less secure than NEOSYS own servers which are reasonably well isolated. If a pfx file is obtained by criminal hackers, perhaps using automated tools, and the pfx password guessed, brute forced, or broken in some way, the keys contained could in principle be used against us or our clients. If the pfx file is a wildcard that supports any subdomain, then loss in one place could affect others. The chances of all this happening is probably very low but NEOSYS needs to be prepared to pass IT audits and leaving keys around will be viewed as having a culture of low security standards.&lt;br /&gt;
&lt;br /&gt;
==Setting up HTTPS for installations with more than 1 database==&lt;br /&gt;
&lt;br /&gt;
In cases where there are multiple databases within the same installation, you can use the same website to access all the databases. In case the Client asks for separate domain names for multiple databases, use the same steps as explained in [[Setting_up_HTTPS#Setting_up_HTTPS_for_NEOSYS_website|Setting up HTTPS]] as the case maybe.&lt;br /&gt;
&lt;br /&gt;
==Setting up HTTPS for installations where outside office access is usually restricted==&lt;br /&gt;
&lt;br /&gt;
During a new installation, support staff MUST import the certificate to IIS, bind the certificate to NEOSYS website (following the steps mentioned above in [[Setting_up_HTTPS#Creating_a_single_HTTPS_web_site_on_Windows_2008|Creating a single HTTPS web site]]) and test if NEOSYS can be accessed via https on the server (https://localhost:4430), so that no problems are faced in future if the client ever requests for outside access with their management&#039;s approval.&lt;br /&gt;
&lt;br /&gt;
Since the client management has informed that outside access is not required, close the server&#039;s port 4430 (i.e. remove 4430 from Windows Firewall exceptions). Do not remove the certificate binding in IIS.&lt;br /&gt;
&lt;br /&gt;
If and when https access is required by the client, this can be enabled by unblocking the server&#039;s port 4430 and instructing the client to get their IT to configure the router to port forward port 4430 for https.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting setup of multiple HTTPS websites ==&lt;br /&gt;
&lt;br /&gt;
=== Error while binding COMODO signed certificate to NEOSYS website===&lt;br /&gt;
&lt;br /&gt;
[[image:Test11.jpg]]&lt;br /&gt;
&lt;br /&gt;
 A specified logon  session does not exist. It may already have been terminated. &lt;br /&gt;
&lt;br /&gt;
If importing a certificate ONCE at the top level onto a NEOSYS controlled server with multiple web sites then you need to have used the you need to &amp;quot;mark the private key as exportable&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Configuring_NEOSYS_on_Windows_10&amp;diff=3215</id>
		<title>Configuring NEOSYS on Windows 10</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Configuring_NEOSYS_on_Windows_10&amp;diff=3215"/>
		<updated>2018-04-11T16:02:38Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Excluding ntvdm.exe from Windows Defender */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installing NEOSYS on Windows 10 ==&lt;br /&gt;
&lt;br /&gt;
32 bit Windows 10 Pro and Enterprise (NOT 64 bit) will run and serve NEOSYS fine.&lt;br /&gt;
&lt;br /&gt;
32 bit Windows Home is not fully suitable because it does not have IIS web server. NEOSYS processes will run on Windows 10 Home 32 bit but IIS will have to be configured on another computer with access to the NEOSYS folders via a share. The computer running IIS could be any version of Windows including 64 bit.&lt;br /&gt;
&lt;br /&gt;
=== Installing IIS using appwiz.cpl ===&lt;br /&gt;
&lt;br /&gt;
#Use windows search bar to navigate to &#039;Windows Features&#039;&lt;br /&gt;
#Check &#039;IIS&#039; &amp;amp; expand &#039;IIS&#039;&lt;br /&gt;
#Expand &#039;World Wide Web Services&#039;&lt;br /&gt;
#Expand &#039;Application Development Features&#039;&lt;br /&gt;
#Check &#039;ASP&#039;&lt;br /&gt;
#Click OK&lt;br /&gt;
[[image:Win10checkASP.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Excluding ntvdm.exe from Windows Defender ===&lt;br /&gt;
&lt;br /&gt;
Must be done otherwise performance according to FILESPEED is 10 to 20 times slower.&lt;br /&gt;
&lt;br /&gt;
#Use windows search bar to navigate to &#039;Virus &amp;amp; threat protection&#039;, &#039;Virus &amp;amp; threat protection settings&#039;.&lt;br /&gt;
#Scroll down to subheading &#039;Exclusions&#039; and click on &#039;Add or remove exclusions&#039;.&lt;br /&gt;
#Click + button and add process &amp;quot;ntvdm.exe&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that excluding folders or file extensions does not fully restore file speed to NEOSYS whereas excluding process ntvdm.exe does.&lt;br /&gt;
&lt;br /&gt;
[[image:Win10exclusion1.png]]&lt;br /&gt;
&lt;br /&gt;
=== Running AREV.EXE in compatibility mode ===&lt;br /&gt;
&lt;br /&gt;
#Right click AREV.EXE in \neosys\ folder&lt;br /&gt;
#Properties&lt;br /&gt;
#Compatibility tab&lt;br /&gt;
#Run with compatibility for Win95&lt;br /&gt;
&lt;br /&gt;
=== Configuring Windows Automatic Update ===&lt;br /&gt;
&lt;br /&gt;
#Use windows search bar to navigate to &#039;Local Group Policy Editor&#039;.&lt;br /&gt;
#Expand &#039;Computer Configuration&#039;.&lt;br /&gt;
#Expand &#039;Administrative Templates&#039;.&lt;br /&gt;
#Expand &#039;Windows Components&#039;.&lt;br /&gt;
#Scroll down &amp;amp; expand &#039;Windows Update&#039;.&lt;br /&gt;
#Double click on &#039;Configure Automatic Updates&#039;.&lt;br /&gt;
#Check &#039;Enabled&#039;.&lt;br /&gt;
#In drop down menu choose the &amp;quot;4 - Auto download and schedule the install&amp;quot; option.&lt;br /&gt;
#Then choose day &amp;quot;1 - Every Sunday&amp;quot;.&lt;br /&gt;
#Time by default is set to 3:00.&lt;br /&gt;
#Click apply.&lt;br /&gt;
&lt;br /&gt;
[[image:Win10setAutoUpdate.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Get NEOSYS process running ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#Open command prompt.&lt;br /&gt;
#Right click on window and select &#039;Properties&#039;.&lt;br /&gt;
#Check &amp;quot;Use Legacy Console&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[image:Win10legacyoption.jpg]]&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Troubleshooting_email_not_received&amp;diff=3164</id>
		<title>Troubleshooting email not received</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Troubleshooting_email_not_received&amp;diff=3164"/>
		<updated>2018-02-28T13:32:37Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Check Nagios system if any email stuck in outgoing email queue */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Troubleshooting email not received ==&lt;br /&gt;
&lt;br /&gt;
=== Was any email actually sent? ===&lt;br /&gt;
&lt;br /&gt;
Possibly the server was switched off at the time the email was supposed to be sent. Check the server uptime or logs. Check NEOSYS server monitor history.&lt;br /&gt;
&lt;br /&gt;
Rerun the report or program with the exact same options and conditions. Monitor the process on the server maintenance screen looking for messages that emails have been sent or not.&lt;br /&gt;
&lt;br /&gt;
=== Check log for any problems sending email ===&lt;br /&gt;
&lt;br /&gt;
#First step is Login to client’s server, open NEOSYS check the logs in support menu.&lt;br /&gt;
#It will generate the log report, check the report thoroughly and see if there is any error shown around the time that the emails were supposed to be sent.&lt;br /&gt;
&lt;br /&gt;
==== Error: No logs found ====&lt;br /&gt;
No logs found for the date while checking the logs in support menu.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Error explained&#039;&#039;&#039;:&lt;br /&gt;
This above error means that no error has been logged on the date you selected.&lt;br /&gt;
&lt;br /&gt;
==== Error: Failed to connect to the server ====&lt;br /&gt;
&lt;br /&gt;
[[Image:001.png]]&lt;br /&gt;
&lt;br /&gt;
If report shows the error shown above then do the following steps to check why the email was not sent out.&lt;br /&gt;
&lt;br /&gt;
This above error means that but the mail could not be sent due to an inability to connect to the outgoing email server.&lt;br /&gt;
&lt;br /&gt;
See [[Troubleshooting_NEOSYS_Generally#Solving_NEOSYS_smtp_server_failure|Solving NEOSYS smtp server failure]]&lt;br /&gt;
&lt;br /&gt;
=== Check NEOSYS email configuration ===&lt;br /&gt;
&lt;br /&gt;
NEOSYS needs to know how to send email. The default configuration is mailout.neosys.com 2500&lt;br /&gt;
&lt;br /&gt;
Check the configuration in NEOSYS Support Menu, System Configuration File.&lt;br /&gt;
&lt;br /&gt;
=== Send a test email ===&lt;br /&gt;
&lt;br /&gt;
WARNING This test requires a version of NEOSYS later than 5th Dec 2012 otherwise no error message is shown in some cases when there is in fact an error.&lt;br /&gt;
&lt;br /&gt;
Check if you can send a test email. Go to maintenance mode and press F5 then type the following.&lt;br /&gt;
&lt;br /&gt;
 sendmail support@neosys.com&lt;br /&gt;
&lt;br /&gt;
If mail server accepts the message then you will see the following.&lt;br /&gt;
&lt;br /&gt;
This is no guarantee that the mail server can or will deliver the email to the recipient.&lt;br /&gt;
&lt;br /&gt;
 ╔═════════════════════════════════════════════════════════════════╗&lt;br /&gt;
 ║ Step 1 OK. Mail for SUPPORT@NEOSYS.COM accepted by mail server. ║&lt;br /&gt;
 ║                                                                 ║&lt;br /&gt;
 ║       Step 2. Now check if actually received by recipient       ║&lt;br /&gt;
 ║           to verify that the mail server can actually           ║&lt;br /&gt;
 ║               deliver email to SUPPORT@NEOSYS.COM               ║&lt;br /&gt;
 ║                                                                 ║&lt;br /&gt;
 ║                        &amp;lt; Press any key &amp;gt;                        ║&lt;br /&gt;
 ╚═════════════════════════════════════════════════════════════════╝&lt;br /&gt;
&lt;br /&gt;
If there is some problem connecting to the mail server then you might see something like the following:&lt;br /&gt;
&lt;br /&gt;
 ╔══════════════════════════════════════════════════════════════╗&lt;br /&gt;
 ║ SUPPORT@NEOSYS.COM                                           ║&lt;br /&gt;
 ║ Error in sendmail.js, CDO.Message.Send(). The transport      ║&lt;br /&gt;
 ║ failed to connect to the server.                             ║&lt;br /&gt;
 ║                                                              ║&lt;br /&gt;
 ║ From:   companyxyz@neosys.com                                ║&lt;br /&gt;
 ║ To:     support@neosys.com                                   ║&lt;br /&gt;
 ║ Server: mailout.neosys.com                                   ║&lt;br /&gt;
 ║ Port:   2500                                                 ║&lt;br /&gt;
 ║                      &amp;lt; Press any key &amp;gt;                       ║&lt;br /&gt;
 ╚══════════════════════════════════════════════════════════════╝&lt;br /&gt;
&lt;br /&gt;
To solve unreliable connections to NEOSYS email server, see [[Troubleshooting_NEOSYS_Generally#Solving_NEOSYS_smtp_server_failure|Solving NEOSYS smtp server failure]]&lt;br /&gt;
&lt;br /&gt;
=== Invalid Sender Email Address in NEOSYS System Configuration File ===&lt;br /&gt;
&lt;br /&gt;
The following problem might indicate that the &amp;quot;Sender email address&amp;quot; is not acceptable to the mail server - even though the message mentions a problem with &amp;quot;recipient addresses&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For sending email via the default NEOSYS mailout.neosys.com server the &amp;quot;Sender Email Address&amp;quot; MUST end in @neosys.com eg companyxyz@neosys.com.&lt;br /&gt;
&lt;br /&gt;
 ╔══════════════════════════════════════════════════════════════╗&lt;br /&gt;
 ║ SUPPORT@NEOSYS.COM                                           ║&lt;br /&gt;
 ║ Error in sendmail.js, CDO.Message.Send(). The server         ║&lt;br /&gt;
 ║ rejected one or more recipient addresses. The server         ║&lt;br /&gt;
 ║ response was: 550 Administrative prohibition                 ║&lt;br /&gt;
 ║                                                              ║&lt;br /&gt;
 ║ From:   neosys@companyxyz.com                                ║&lt;br /&gt;
 ║ To:     support@neosys.com                                   ║&lt;br /&gt;
 ║ Server: mailout.neosys.com                                   ║&lt;br /&gt;
 ║ Port:   2500                                                 ║&lt;br /&gt;
 ║                      &amp;lt; Press any key &amp;gt;                       ║&lt;br /&gt;
 ╚══════════════════════════════════════════════════════════════╝&lt;br /&gt;
&lt;br /&gt;
=== Check the size of the mail being sent to client&#039;s email account===&lt;br /&gt;
&lt;br /&gt;
Email could be missing due to the reason that NEOSYS mail exceeds the upper limit of mail size on client mail server. Confirm the upper limit of mail size with client IT and check the size of email being sent by NEOSYS. For large clients a whole years report could exceed 10MB, which is the common upper limit for most mail servers. Ask client&#039;s IT to increase the upper limit of mail size to receive emails with large report from NEOSYS. NEOSYS staff can advise users to test a report attached email for a small period to check if emailed reports can actually be received by client&#039;s email or not. Also see [http://userwiki.neosys.com/index.php/Media_FAQ#How_to_handle_.22No_Response_from_the_database_server_in_600_seconds.22 whether email is received when Email Body is chosen as the Report Delivery option.]&lt;br /&gt;
&lt;br /&gt;
=== Check Nagios system if any email stuck in outgoing email queue ===&lt;br /&gt;
&lt;br /&gt;
Nagios Monitoring system checks and warns if there are any emails stuck in outgoing email queues on all NEOSYS servers, including imap/smtp, nl8, mailout and mailout2.&lt;br /&gt;
&lt;br /&gt;
If there are any emails in the queues, Nagios Monitoring system will report the problem and you can get information about exactly what is pending and why it is, by clicking and inspecting the service in detail.&lt;br /&gt;
&lt;br /&gt;
=== Check low level network connectivity to the mail server ===&lt;br /&gt;
&lt;br /&gt;
To test if there is basic connectivity - from the client server to the configured email server, type the following in command prompt, on the client server.&lt;br /&gt;
&lt;br /&gt;
You might need to install Windows option for Telnet on Windows 2008. A software firewall installed on the workstation may block connections selectively by program so you might be able to send email by telnet but not by outlook for example.&lt;br /&gt;
&lt;br /&gt;
Assuming that the configuration is the default of mailout.neosys.com port 2500. You must use your configuration.&lt;br /&gt;
 &lt;br /&gt;
 telnet mailout.neosys.com 2500&lt;br /&gt;
&lt;br /&gt;
it will show you&lt;br /&gt;
&lt;br /&gt;
 Connecting to mailout.neosys.com ...&lt;br /&gt;
&lt;br /&gt;
==== Successful connection ====&lt;br /&gt;
&lt;br /&gt;
Blank window with some text at the top. This text can vary slightly but will usually mention SMTP somewhere.&lt;br /&gt;
&lt;br /&gt;
 220 mailout.neosys.com ESMTP Postfix (Ubuntu) &lt;br /&gt;
&lt;br /&gt;
Try to send an email using telnet as shown below. Type the bits in bold in the following with no mistyping since backspace doesn&#039;t work.&lt;br /&gt;
&lt;br /&gt;
 220 mailout.neosys.com ESMTP Postfix (Ubuntu)&lt;br /&gt;
 &#039;&#039;&#039;helo steve&#039;&#039;&#039;&lt;br /&gt;
 250 mailout.neosys.com &lt;br /&gt;
 &#039;&#039;&#039;mail from:&amp;lt;clientname@neosys.com&amp;gt;&#039;&#039;&#039; (use client name which is appropriate to the situation to identify sender)&lt;br /&gt;
 250 2.1.0 Ok&lt;br /&gt;
 &#039;&#039;&#039;rcpt to:&amp;lt;support@neosys.com&amp;gt;&#039;&#039;&#039;  (use a recipient email ID which is appropriate to the the situation)&lt;br /&gt;
 250 2.1.5 Ok&lt;br /&gt;
 &#039;&#039;&#039;data&#039;&#039;&#039;&lt;br /&gt;
 354 End data with &amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;.&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;&lt;br /&gt;
 &#039;&#039;&#039;Testing&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;Testing&#039;&#039;&#039; (don&#039;t forget to end with a dot on a new line)&lt;br /&gt;
 &#039;&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
 250 2.0.0 Ok: queued as 872B21F6&lt;br /&gt;
 &#039;&#039;&#039;quit&#039;&#039;&#039;&lt;br /&gt;
 221 2.0.0 Bye&lt;br /&gt;
 Connection to host lost.&lt;br /&gt;
&lt;br /&gt;
==== Unsuccessful connection ====&lt;br /&gt;
&lt;br /&gt;
If there is some network connection problem or the mail server is not running then after a while it will show something like:&lt;br /&gt;
&lt;br /&gt;
 Could not connect to the host, on port 2500: Connect failed&lt;br /&gt;
&lt;br /&gt;
If you determine that there is a basic problem connecting to the mail server then and other locations are not facing the same problem then contact the IT administrator of the network and probe if they have outgoing ports (2500 in this case) blocked or filtered on their firewall.&lt;br /&gt;
&lt;br /&gt;
See [[Troubleshooting_NEOSYS_Generally#Solving_NEOSYS_smtp_server_failure|Solving NEOSYS smtp server failure]]&lt;br /&gt;
&lt;br /&gt;
=== Ensure missing email is not being treated as spam by NEOSYS email server ===&lt;br /&gt;
&lt;br /&gt;
Email could be missing due to the reason that NEOSYS mail server might be treating it like spam.&lt;br /&gt;
Escalate issue to NEOSYS IT, who will check if missing email is being treated as spam.&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Upgrading_NEOSYS&amp;diff=3141</id>
		<title>Upgrading NEOSYS</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Upgrading_NEOSYS&amp;diff=3141"/>
		<updated>2018-02-01T20:34:28Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Restart IIS web server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Prior to Upgrade==&lt;br /&gt;
When any change is made to NEOSYS, it is the responsibility of the Support staff to test and verify that there are no errors. Proceed to upgrade NEOSYS only after Support staff has tested and confirmed that the new features are working fine. Do NOT install untested versions of NEOSYS under any circumstance.&lt;br /&gt;
&lt;br /&gt;
Any patches done on the client will be overwritten when NEOSYS is upgraded. The patch fixes will be lost if not included in the version of NEOSYS being installed. So support staff must do the following prior to upgrading:&lt;br /&gt;
&lt;br /&gt;
#Find out if any patches were done to the client between the last upgrade and current date. There is no certain way to do this, apart from support staff memory and by checking support emails.&lt;br /&gt;
#Check whether the patches (if any) are included in the version to be installed.&lt;br /&gt;
#Inform the programmer if the patches are not included.&lt;br /&gt;
#Upgrade NEOSYS only after confirming that the patches are included and tested on TEST system.&lt;br /&gt;
&lt;br /&gt;
== Upgrading NEOSYS fully ==&lt;br /&gt;
NEOSYS can be upgraded in two ways either the evening before the nightly backup or during the day.&lt;br /&gt;
&lt;br /&gt;
Procedure to upgrade NEOSYS during the day.&lt;br /&gt;
&lt;br /&gt;
#Email the management and staff the standard email on upgrade for agreement of time.&lt;br /&gt;
#Confirm the date and time and inform the staff about the update. &lt;br /&gt;
#During upgrade make sure all users are logged off and follow the installation procedures.&lt;br /&gt;
#Once the upgrade is over mail the management and staff the steps they should perform before using NEOSYS.&lt;br /&gt;
&lt;br /&gt;
NEOSYS can also be upgraded with smaller patches by the programmer and this can be done at any time while the users are working.&lt;br /&gt;
&lt;br /&gt;
For any non Dubai client if their weekend falls on Support team&#039;s weekday e.g Sunday is a holiday in Beirut/Cyprus, NEOSYS support should schedule upgrades on those days so that Client doesn&#039;t face any downtime.&lt;br /&gt;
&lt;br /&gt;
Avoid major upgrades on Sundays because weekend issues have often accumulated and need to be solved and at times the programmer is not available in case issues arise.	&lt;br /&gt;
&lt;br /&gt;
=== Sample Emails to be sent PRIOR to Upgrading NEOSYS ===&lt;br /&gt;
Any decision or instructions related to upgrading NEOSYS must be in support@neosys.com i.e. please ensure that all emails are sent to clients while mentioning support@neosys.com in cc.&lt;br /&gt;
&lt;br /&gt;
For situations where the upgrade email was sent out with wrong information, support MUST resend the upgrade email with the correct information to inform all users about the change.&lt;br /&gt;
&lt;br /&gt;
==== Informing the client of the intention to upgrade ====&lt;br /&gt;
&lt;br /&gt;
Email all users using Email Users option in Help Menu.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SAMPLE EMAIL - VERSION 1: Quick Upgrade&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Quick Upgrade only applies to Clients with less than 10 users, Clients having large installations will always have a planned upgrade.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Dear Team,&lt;br /&gt;
&lt;br /&gt;
NEOSYS needs to be upgraded to its latest version because (give reason).&lt;br /&gt;
&lt;br /&gt;
We will upgrade between (selected time period, according to the Client&#039;s time zone) on (the selected date, it can be the same day also).&lt;br /&gt;
&lt;br /&gt;
* Please inform all users that they should be logged off during the upgrade. &lt;br /&gt;
&lt;br /&gt;
We will notify you immediately once the upgrade is complete.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SAMPLE EMAIL - VERSION 2: Planned Upgrade&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Email MUST be sent no less than 7 WORKING HOURS prior to upgrade, and for large NEOSYS clients with many users as far in advance as possible and no less than 15 WORKING HOURS, so that the client has enough time to bring up any concerns related to the upgrade or its timing. In the case of large clients, a reminder should be sent the day prior to the upgrade, preferably before noon. In case, not possible to meet these deadlines, then the upgrade MUST be postponed and handled properly at a late date.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Dear Team,&lt;br /&gt;
&lt;br /&gt;
NEOSYS needs to be upgraded to its latest version because (give reason).&lt;br /&gt;
&lt;br /&gt;
We will upgrade between 9 am – 10 am (change as per the Client&#039;s time zone if Client not located in Dubai)  on (the selected date).&lt;br /&gt;
&lt;br /&gt;
The upgrade will be done first thing in the morning after the nightly backup to complete the upgrade in a short time .&lt;br /&gt;
&lt;br /&gt;
* Please inform all users that they should be logged off during the upgrade. &lt;br /&gt;
* Please contact NEOSYS support immediately if you have any concerns about the upgrade.&lt;br /&gt;
&lt;br /&gt;
We will notify you immediately once the upgrade is complete.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Downloading ===&lt;br /&gt;
&lt;br /&gt;
Latest version of NEOSYS is available at http://www.neosys.com/support/neosys2.exe&lt;br /&gt;
&lt;br /&gt;
In NEOSYS servers housed at client location, download neosys2.exe using IE in NEOSYS\downloads folder and rename it to neosys2-(DATE).exe (eg neosys2-10th November 2009.exe) - this is to keep track of the various downloads we do for the client and also allows to install a previous version if needed.&lt;br /&gt;
&lt;br /&gt;
In situations where NEOSYS hosts clients in its own servers, download neosys2.exe into your computer first. Then copy-paste it into the server using SFTP in Tunnelier.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;*** IMPORTANT: DO NOT RUN/EXECUTE THE NEOSYS EXE FILE NOW ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Downloading previous versions of NEOSYS ===&lt;br /&gt;
The 9 previous versions of neosys are stored at:&lt;br /&gt;
&lt;br /&gt;
http://www.neosys.com/support/neosys21.exe&lt;br /&gt;
&lt;br /&gt;
http://www.neosys.com/support/neosys22.exe&lt;br /&gt;
&lt;br /&gt;
http://www.neosys.com/support/neosys23.exe&lt;br /&gt;
&lt;br /&gt;
http://www.neosys.com/support/neosys24.exe&lt;br /&gt;
&lt;br /&gt;
http://www.neosys.com/support/neosys25.exe&lt;br /&gt;
&lt;br /&gt;
http://www.neosys.com/support/neosys26.exe&lt;br /&gt;
&lt;br /&gt;
http://www.neosys.com/support/neosys27.exe&lt;br /&gt;
&lt;br /&gt;
http://www.neosys.com/support/neosys28.exe&lt;br /&gt;
&lt;br /&gt;
http://www.neosys.com/support/neosys29.exe&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Backing up prior to upgrading ===&lt;br /&gt;
THIS WHOLE BACKUP PROCEDURE IS MANDATORY&lt;br /&gt;
&lt;br /&gt;
Make sure that all NEOSYS users are logged off and the processes are closed before you do any folder copying.&lt;br /&gt;
&lt;br /&gt;
The upgrade procedure includes taking a copy of the programs. If the upgrade fails due to some reason the NEOSYS folder can be reverted back to how it was before the upgrade attempt. Also in case the Client has critical issues using the new version then we will be able to revert them to the old version if the versions are not too different. If this is done by coping the programs back to the original location then no authorisation number will be required. The directories that contain the programs are:&lt;br /&gt;
*D:\NEOSYS\NEOSYS&lt;br /&gt;
*D:\NEOSYS\NEOSYS.NET&lt;br /&gt;
&lt;br /&gt;
After completing the upgrade, do NOT delete the backup copy of above NEOSYS directories otherwise you will not be able to revert it back in case of issues due to upgrade.&lt;br /&gt;
&lt;br /&gt;
==== Small Installations ====&lt;br /&gt;
#Take a normal proper backup using the NEOSYS Support Menu - for all live databases if there is more than one.&lt;br /&gt;
#If a USB change was made by the client&#039;s IT person prior to doing this manual backup, ensure that after the upgrade is done, the backup file for that manual backup is moved to another location (preferably in a new folder on the D drive)so that the clients backup cycle is not affected by the existence of a days backup in the USB before the cycle actually begins the following morning. &lt;br /&gt;
#Take a copy of the whole of the D:\NEOSYS folder (or where-ever NEOSYS is installed) into another folder. This way, if the upgrade fails due to some reason, the NEOSYS folder can be reverted back to how it was before the upgrade attempt. You can omit the D:\NEOSYS\IMAGES and D:\NEOSYS\LOGS folders from the copy to save time. Preferably place the copy on another disk or partition so that it is not included in any whole disk backup that might be running in parallel to NEOSYS backup.&lt;br /&gt;
&lt;br /&gt;
==== Large Installations ====&lt;br /&gt;
&lt;br /&gt;
This includes multiple installations on the same server eg NEOSYS hosts.&lt;br /&gt;
&lt;br /&gt;
Copying the whole of the D:\NEOSYS folder can take so much time as to be virtually impossible. In this case do the upgrade EARLY IN THE MORNING since all the data will have been backed up the previous night. The NEOSYS nightly backup only backs up data, so you MUST manually take copies of the program folders mentioned above.&lt;br /&gt;
&lt;br /&gt;
=== Installing ===&lt;br /&gt;
&amp;lt;b&amp;gt;PRECAUTION&amp;lt;/b&amp;gt;:&lt;br /&gt;
DO NOT install versions of NEOSYS older than the one currently installed, even by mistake. LOOK CAREFULLY at the version note when you open the upgrade file.&lt;br /&gt;
&lt;br /&gt;
Run / Execute the .EXE file that you downloaded into the NEOSYS\downloads folder and Install to D:\NEOSYS\ .&lt;br /&gt;
&lt;br /&gt;
Closing NEOSYS processes should happen automatically during upgrade but you can also do it manually as follows:&lt;br /&gt;
&lt;br /&gt;
[[Administering_NEOSYS_Server#Closing_NEOSYS_Services|Closing NEOSYS Services ]]&lt;br /&gt;
&lt;br /&gt;
The installation procedure first creates a GLOBAL.END file in the NEOSYS programs folder causing all serving processes to terminate. Maintenance processes must be terminated manually.&lt;br /&gt;
&lt;br /&gt;
Next, the installation procedure attempts to update the WAITING.EXE file and, if the processes haven’t terminated quickly enough, this will fail asking for retry or abort. Retry immediately or once all the processes have terminated.&lt;br /&gt;
&lt;br /&gt;
The last step of the installation procedure is to delete the GLOBAL.END file to allow processes to start normally.&lt;br /&gt;
&lt;br /&gt;
=== Restart IIS web server ===&lt;br /&gt;
&lt;br /&gt;
This is not necessary for versions of NEOSYS starting Feb 2018 and probably of no effect on prior versions either.&lt;br /&gt;
&lt;br /&gt;
Skip this if you are performing a quick upgrade without getting users offline as restarting IIS kills login sessions therefore forces people to login again.&lt;br /&gt;
&lt;br /&gt;
Quickest way to restart IIS when upgrading is to use the very simple command in the command line as follows:&lt;br /&gt;
 iisreset&lt;br /&gt;
&lt;br /&gt;
You can also restart the IIS web server either from the IIS service control panel or from the command line as follows:&lt;br /&gt;
 net stop w3svc&lt;br /&gt;
 net start w3svc&lt;br /&gt;
&lt;br /&gt;
The objective behind restarting IIS is to avoid the users facing problems using NEOSYS until they clear cache.&lt;br /&gt;
&lt;br /&gt;
=== Post installation steps ===&lt;br /&gt;
New versions of the software sometimes perform quick or long database conversions.&lt;br /&gt;
&lt;br /&gt;
Start NEOSYS in maintenance mode immediately after upgrading, as this will put you more in control if anything goes wrong.&lt;br /&gt;
&lt;br /&gt;
If the upgrade does not require users to clear their cache (because there is no change in the user interface) then BEFORE starting any NEOSYS process, enter maintenance mode and when asked &amp;quot;if you want to email users about the upgrade&amp;quot;, select No.&lt;br /&gt;
&lt;br /&gt;
You MUST start a NEOSYS process after upgrade else users will get an error message &amp;quot;database is not available&amp;quot; while logging in.&lt;br /&gt;
&lt;br /&gt;
Set Handler Mappings for win3 clients refer [http://techwiki.neosys.com/index.php/Configuring_IIS#Configure_file_uploads_besides_adding_the_images_directory link ]&lt;br /&gt;
&lt;br /&gt;
=== NEOSYS version ===&lt;br /&gt;
&lt;br /&gt;
You can check the current version of NEOSYS under Menu&amp;gt;Help&amp;gt;About. After an upgrade, changes in the server process software causes an increment in the version date. Unfortunately changes in the NEOSYS user interface only does not always cause an increment in the version date&lt;br /&gt;
&lt;br /&gt;
=== Email sent to the Clients after an upgrade ===&lt;br /&gt;
&lt;br /&gt;
On starting a NEOSYS process or maintenance mode after an upgrade, NEOSYS will automatically email all the users something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
The NEOSYS system software has been upgraded	&lt;br /&gt;
	&lt;br /&gt;
Before you login to NEOSYS, please follow the instructions at	&lt;br /&gt;
http://userwiki.neosys.com/index.php/cache to avoid error using NEOSYS.	&lt;br /&gt;
	&lt;br /&gt;
Please email SUPPORT@NEOSYS.COM for any assistance.	&lt;br /&gt;
	&lt;br /&gt;
This is an automated email. You cannot reply to it.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently this email is only sent to the users in the *first* database started. If there are other live databases in the same NEOSYS installation that users should be emailed then you can trigger the email in maintenance mode for the desired database as follows:&lt;br /&gt;
&lt;br /&gt;
 EMAILUSERS UPGRADE&lt;br /&gt;
&lt;br /&gt;
=== Sample email to be sent to clients who face issues due to failure in clearing browser cache ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Dear XYZ,&lt;br /&gt;
&lt;br /&gt;
You are facing this error because you have failed to clear your browser cache as instructed in the upgrade notification email.&lt;br /&gt;
In order to resolve this issue please follow instructions in the following wiki link:&lt;br /&gt;
&lt;br /&gt;
http://userwiki.neosys.com/index.php/Cache&lt;br /&gt;
&lt;br /&gt;
Please seek the help of your IT or NEOSYS-expert colleague to help you with the above step if needed.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
If you choose to abort the installation for any reason then the GLOBAL.END file will have to be deleted manually since its presence prevents any processes from starting up.&lt;br /&gt;
&lt;br /&gt;
==== Handling &amp;quot;Error opening file for writing&amp;quot; while executing the NEOSYS setup file ====&lt;br /&gt;
&lt;br /&gt;
During an upgrade if you see a message saying &amp;quot;Error opening file for writing&amp;quot;, this means there is a file which is in use by a process and NEOSYS didnt shutdown yet. You should look for a process which is still running and wait for it to end after that you can click on Retry and proceed with the upgrade. In case the process does not close automatically then investigate for an invisibly hung process and close it. &lt;br /&gt;
&lt;br /&gt;
If the error message still does not go then you can abort the installation, investigate further for any process or file in use and close all processes hung/invisible so that NO process is running. Once this is done, re run the set up file and upgrade the installation. &lt;br /&gt;
&lt;br /&gt;
[[File:Setup.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Upgrading NEOSYS with patch files ==&lt;br /&gt;
Patch files can be used to update a very recent installation of neosys without doing a full install and without getting people out of NEOSYS.&lt;br /&gt;
&lt;br /&gt;
WARNING: DO *NOT* INSTALL OLDER PATCH FILES ON NEWER VERSIONS OF NEOSYS&lt;br /&gt;
&lt;br /&gt;
Only install patch files dated after the NEOSYS software version date. If in doubt, do a full install.&lt;br /&gt;
&lt;br /&gt;
#Copy the file which is probably something like ADAGENCY.1 or ACCOUNTS.1 to the neosys\neosys folder&lt;br /&gt;
#Open Maintenance Mode and Press F5&lt;br /&gt;
#Type the command to install the patch as follows:&lt;br /&gt;
#:If the filename of the patch file is ADAGENCY.1 then type&lt;br /&gt;
#: &amp;lt;pre&amp;gt;INSTALL ADAGENCY&amp;lt;/pre&amp;gt;&lt;br /&gt;
#:If the filename of the patch file is ACCOUNTS.1 then type&lt;br /&gt;
#: &amp;lt;pre&amp;gt;INSTALL ACCOUNTS&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Follow instructions on screen&lt;br /&gt;
&lt;br /&gt;
== Quick Upgrade ==&lt;br /&gt;
In certain cases, we may have to perform an upgrade during client&#039;s working hours without causing much delay to client for certain minor bug fixes. In such a situation there are no upgrade emails sent prior to upgrading the client and consequently we are not asking the users to log off from the system. &lt;br /&gt;
&lt;br /&gt;
Procedure:&lt;br /&gt;
#Backup the NEOSYS folder.&lt;br /&gt;
#*Go to the folder where NEOSYS is installed and do select all, copy &amp;amp; paste i.e. ctrl+a , ctrl+c &amp;amp; ctrl+v&lt;br /&gt;
#Download the latest version of NEOSYS from http://www.neosys.com/support/neosys2.exe in NEOSYS\downloads folder and rename it to neosys2-(DATE).exe&lt;br /&gt;
#Run the exe file&lt;br /&gt;
#Restart NEOSYS processes on the server immediately after the installation has completed!&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Restricting_usage_of_NEOSYS_to_licence_period&amp;diff=3136</id>
		<title>Restricting usage of NEOSYS to licence period</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Restricting_usage_of_NEOSYS_to_licence_period&amp;diff=3136"/>
		<updated>2018-01-31T09:44:24Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Entering NEOSYS licensing information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Restricting usage of NEOSYS to licence period ===&lt;br /&gt;
*A NEOSYS software licence key is granted depending on the last paid up invoice licence period plus optional grace days.&lt;br /&gt;
*The NEOSYS software prevents, after the grace period, creation of new documents not dated within the licence period.&lt;br /&gt;
*The NEOSYS software does not at any time place any limitation whatsoever on the use of documents already created in the system or the creation of new documents dated within the licence period.&lt;br /&gt;
*The intention of NEOSYS licence expiry is to allow the user to continue using the NEOSYS system normally for documents that apply to valid licence periods while at the same time, after a grace period after the expiry of the licence, to prevent them from entering new documents that are related to periods outside the valid licence periods.&lt;br /&gt;
*Once a licence has been entered in a database, then usage of that database is thereafter subject to licensing restrictions.&amp;lt;BR&amp;gt;(Currently there are no usage restrictions prior to entering any licence, however this may change in later versions of the NEOSYS software and no database may be used without valid licensing in place)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last paid up invoice for software support and licence covered a licence period of one month from &#039;&#039;&#039;1 Oct 2009&#039;&#039;&#039; to &#039;&#039;&#039;31 Oct 2009&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
A licence key has been installed in the database for the same period and with a grace period of 7 days.&lt;br /&gt;
&lt;br /&gt;
Up to &#039;&#039;&#039;7th Nov 2009&#039;&#039;&#039; users can create documents without restriction.&lt;br /&gt;
&lt;br /&gt;
From the &#039;&#039;&#039;8th Nov 2009&#039;&#039;&#039; onwards:&lt;br /&gt;
*Users can view and amend any document already created&lt;br /&gt;
*Users can create documents dated up to &#039;&#039;&#039;31 Oct 2009&#039;&#039;&#039;&lt;br /&gt;
*Users *cannot* create any new document dated &#039;&#039;&#039;1st Nov 2009&#039;&#039;&#039; or later&lt;br /&gt;
&lt;br /&gt;
When a user tries to save a new document that &amp;lt;BR&amp;gt;&lt;br /&gt;
*does not fall within a valid licence period and &lt;br /&gt;
*the current date is more than the number of grace days after the licence expiry date&lt;br /&gt;
the user will get the following message:&lt;br /&gt;
&lt;br /&gt;
[[image:licence_period.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Entering NEOSYS licensing information ===&lt;br /&gt;
&lt;br /&gt;
If adding multiple licences to a database that currently has no licence restrictions, be careful to add any current licences first and historical licences last, so that any active users working on current periods do not get locked out , however briefly.&lt;br /&gt;
&lt;br /&gt;
Use the following code in maintenance mode to view the licences already entered in the database.&lt;br /&gt;
&lt;br /&gt;
 CHKLIC&lt;br /&gt;
&lt;br /&gt;
The list of licences is generated as shown below&lt;br /&gt;
&lt;br /&gt;
[[image:licence_list.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Following steps are done in NEOSYS maintenance mode (F5).&lt;br /&gt;
&lt;br /&gt;
==== Step 1 – Generate “licencetext” ====&lt;br /&gt;
&lt;br /&gt;
Depending on what licence you want to grant, enter the following command. It will show a line of “licencetext” including the computerid and databaseid.&lt;br /&gt;
&lt;br /&gt;
 ADDLIC &#039;&#039;modulenames fromdate uptodate daygrace&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
All parameters are required and must appear in the order shown.&lt;br /&gt;
&lt;br /&gt;
Generally support should just renew the licence similar to the previous licence unless otherwise instructed. All the required parameters (i.e. modulenames, licence period and days grace) are available in the list of licences report (CHKLIC) mentioned in the previous section.&lt;br /&gt;
&lt;br /&gt;
If the prior licence allows more than 7 days grace, then the days grace for the new licence MUST be determined by NEOSYS accounts team (or whoever asked for the licence to be added).&lt;br /&gt;
&lt;br /&gt;
If there are no prior licences, then the module names, licence period and days grace MUST all be decided by NEOSYS accounts team (or whoever asked for the licence to be added).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;modulenames&#039;&#039; can be any combination of the following, separated by commas with NO spaces, or a single * to allow all modules.&lt;br /&gt;
&lt;br /&gt;
*MEDIA&lt;br /&gt;
*JOBS&lt;br /&gt;
*FINANCE&lt;br /&gt;
*TIMESHEETS&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;daygrace&#039;&#039; is how many days after the licence expiry before NEOSYS starts restricting creation of new documents to dates within the licence period.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 ADDLIC MEDIA,FINANCE 1/4/2016 30/6/2016 7&lt;br /&gt;
&lt;br /&gt;
The output for the above code appears as shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
╒═══════════════════════════════════TCL - 2══════════════════════════════════╕&lt;br /&gt;
│                                                                            │&lt;br /&gt;
│ :ADDLIC MEDIA,FINANCE 1/4/2016 30/6/2016 7                                 │&lt;br /&gt;
│                                                                            │&lt;br /&gt;
╘═══════╔═════════════════════════════════════════════════════════════╗══════╛&lt;br /&gt;
▒▒▒▒▒▒▒▒║ PLEASE GIVE THE FOLLOWING TEXT TO YOUR NEOSYS SUPPORT STAFF ║▒▒▒▒▒▒▒&lt;br /&gt;
▒▒▒▒▒▒▒▒║                                                             ║▒▒▒▒▒▒▒&lt;br /&gt;
▒▒▒▒▒▒▒▒║    &amp;quot;MEDIA,FINANCE 1/4/2016 30/6/2016 7 084505 225FAB0E&amp;quot;     ║▒▒▒▒▒▒▒&lt;br /&gt;
▒▒▒▒▒▒▒▒║                                                             ║▒▒▒▒▒▒▒&lt;br /&gt;
▒▒▒▒▒▒▒▒║               What is the verification code?                ║▒▒▒▒▒▒▒&lt;br /&gt;
▒▒▒▒▒▒▒▒║&amp;lt;                                                           &amp;gt;║▒▒▒▒▒▒▒&lt;br /&gt;
▒▒▒▒▒▒▒▒╚═════════════════════════════════════════════════════════════╝▒▒▒▒▒▒▒&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Step 2 – Request “licencecode” from NEOSYS ====&lt;br /&gt;
&lt;br /&gt;
Give the complete “licencetext” (shown in the above output) to NEOSYS Admin, who will provide the corresponding “licencecode” which is a 1-6 digit number.&lt;br /&gt;
&lt;br /&gt;
==== Step 3 – Enter the licencetext and licencecode ====&lt;br /&gt;
&lt;br /&gt;
Either enter the same command as in step 1 and enter the licencecode when prompted, or enter the following command. The format of the command is almost identical to step 1 but adds computerid databaseid licencecode.&lt;br /&gt;
&lt;br /&gt;
 ADDLIC &#039;&#039;modulenames fromdate uptodate daysgrace computerid databaseid licencecode&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 ADDLIC MEDIA,FINANCE 1/4/2016 30/6/2016 7 542684 1D63A3AC 13193&lt;br /&gt;
&lt;br /&gt;
==== Step 4 – Verify that the licence has been added successfully ====&lt;br /&gt;
&lt;br /&gt;
Run CHKLIC in maintenance mode to generate the list of existing licences and verify that the new licence information has been added to this list.&lt;br /&gt;
&lt;br /&gt;
=== Removing NEOSYS Licences ===&lt;br /&gt;
If it is no longer required to restrict usage of NEOSYS to a licence period for a database, then delete the licence from that database. All licences installed in a database get removed/deleted once the below commands are followed.&lt;br /&gt;
&lt;br /&gt;
====Step 1 - Generate the licence deletion text====&lt;br /&gt;
In maintenance mode, enter the following command&lt;br /&gt;
 DELLIC&lt;br /&gt;
&lt;br /&gt;
Select Yes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
╒═══════════════════════════════════TCL - 2══════════════════════════════════╕&lt;br /&gt;
│                                                                            │&lt;br /&gt;
│ :DELLIC                                                                    │&lt;br /&gt;
│                                                                            │&lt;br /&gt;
╘════════════════════════════════════════════════════════════════════════════╛&lt;br /&gt;
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒╔════════════════════════════════╗▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒&lt;br /&gt;
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒║  Delete all NEOSYS Licences?   ║▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒&lt;br /&gt;
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒║───┬────────────────────────────║▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒&lt;br /&gt;
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒║  1&amp;gt;Yes                         ║▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒&lt;br /&gt;
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒║  2│No                          ║▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒&lt;br /&gt;
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒╚════════════════════════════════╝▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
╒═══════════════════════════════════TCL - 2══════════════════════════════════╕&lt;br /&gt;
│                                                                            │&lt;br /&gt;
│ :DELLIC                                                                    │&lt;br /&gt;
│                                                                            │&lt;br /&gt;
╘═══════╔═════════════════════════════════════════════════════════════╗══════╛&lt;br /&gt;
▒▒▒▒▒▒▒▒║ PLEASE GIVE THE FOLLOWING TEXT TO YOUR NEOSYS SUPPORT STAFF ║▒▒▒▒▒▒▒&lt;br /&gt;
▒▒▒▒▒▒▒▒║                                                             ║▒▒▒▒▒▒▒&lt;br /&gt;
▒▒▒▒▒▒▒▒║                  &amp;quot;DELETE 741701 2996420B&amp;quot;                   ║▒▒▒▒▒▒▒&lt;br /&gt;
▒▒▒▒▒▒▒▒║                                                             ║▒▒▒▒▒▒▒&lt;br /&gt;
▒▒▒▒▒▒▒▒║               What is the verification code?                ║▒▒▒▒▒▒▒&lt;br /&gt;
▒▒▒▒▒▒▒▒║&amp;lt;                                                           &amp;gt;║▒▒▒▒▒▒▒&lt;br /&gt;
▒▒▒▒▒▒▒▒╚═════════════════════════════════════════════════════════════╝▒▒▒▒▒▒▒&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Step 2 - Request for verification code from NEOSYS====&lt;br /&gt;
Give the complete “text” (shown in the above output) to NEOSYS Admin, who will provide the corresponding verification code, which is a 1-6 digit number.&lt;br /&gt;
&lt;br /&gt;
====Step 3 - Enter the verification code====&lt;br /&gt;
Either enter the same command as in step 1 and enter the verification code when prompted, or enter the following command in maintenance mode&lt;br /&gt;
&lt;br /&gt;
 DELLIC &#039;&#039;verificationcode&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
 DELLIC 915036&lt;br /&gt;
&lt;br /&gt;
====Step 4 - Verify that all licences have been removed successfully====&lt;br /&gt;
Run CHKLIC in maintenance mode to generate the list of existing licences. The NEOSYS licences report should show &amp;quot;0 records&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Installing_NEOSYS_Service&amp;diff=3096</id>
		<title>Installing NEOSYS Service</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Installing_NEOSYS_Service&amp;diff=3096"/>
		<updated>2018-01-15T05:41:06Z</updated>

		<summary type="html">&lt;p&gt;Steve: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= INSTALLING NEOSYS SERVICE =&lt;br /&gt;
&lt;br /&gt;
Reference to X:\ in the notes below denotes the actual drive letter and needs to be replaced (eg D:\)&lt;br /&gt;
&lt;br /&gt;
== Main installation: ==&lt;br /&gt;
&lt;br /&gt;
 Make sure NOT TO COPY an existing NEOSYS installation to another location and ONLY do a &lt;br /&gt;
 completely new install with a fresh database, because copying a folder will copy a variety of &lt;br /&gt;
 hidden configurations. &lt;br /&gt;
&lt;br /&gt;
=== Installing NEOSYS on partitions ===&lt;br /&gt;
Good server management practice is to have separate partitions for operating system (C:) and data partitions (D:)&lt;br /&gt;
 &lt;br /&gt;
In the case of operating system reinstallation (which causes the loss of the C: partition) if NEOSYS programs and data were installed on D: can be preserved. If there is only one partition then NEOSYS programs and data will have to be backed up and restored.&lt;br /&gt;
&lt;br /&gt;
==== Multiple Partitions ====&lt;br /&gt;
NEOSYS MUST be installed on a different partition rather than the C drive for reasons already explained above (eg. D drive)&lt;br /&gt;
&lt;br /&gt;
==== Single Partition ====&lt;br /&gt;
If there is only one partition then you have to inform the client to take the effort to reinstall the operating system or using third party repartitioning tools to create separate partitions.&lt;br /&gt;
 &lt;br /&gt;
=== Downloading and running installation files ===&lt;br /&gt;
# http://www.neosys.com/support/neosys.exe	... and unzip/install to X:\neosys (or to X:\hosts\client for multi-installation on one server where &amp;quot;client&amp;quot; is the client folder name which MUST be same as the main database code planned to be used, to reduce the number of codes that are in use. This folder name MUST also be in lower case to maintain consistency and be able to see deviations easily.) &lt;br /&gt;
# http://www.neosys.com/support/neosys2.exe	... and install same as previous step.&lt;br /&gt;
&lt;br /&gt;
=== Creating shortcuts ===&lt;br /&gt;
In x:\neosys (or x:\hosts\client), make a shortcut called ‘Maintenance’ and link it to&lt;br /&gt;
&lt;br /&gt;
x:\neosys\neosys\adagency.bat (for Adagency install)&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
x:\neosys\neosys\accounts.bat (for Accounts install)&lt;br /&gt;
&lt;br /&gt;
=== Activating NEOSYS using authorization number ===&lt;br /&gt;
&lt;br /&gt;
Start NEOSYS Maintenance, select Initial Backup and it will give a “Computer Number” and ask for an “Authorisation No”&lt;br /&gt;
&lt;br /&gt;
Send the computer number to NEOSYS admin, email: admin@neosys.com to get the authorisation no. Do not leave the authorisation no. promt page open for a long time. This will cause the CPU usage to go to 100%. &lt;br /&gt;
&lt;br /&gt;
If you cannot get the authorisation number immediately then you can close NEOSYS and when you reopen NEOSYS it will still give the same computer number and accept the same authorisation number.&lt;br /&gt;
&lt;br /&gt;
=== Installing initial Database ===&lt;br /&gt;
For standard NEOSYS Installations, copy the BACKUP.ZIP file from WIN3 server (D:\DATA.BAK\STARTUP1\&amp;quot;Day of week&amp;quot;) and place it on the D drive of the server where we wish to install NEOSYS. You may choose any other drive also but make sure that this file exists in the root folder e.g. D:\BACKUP.ZIP&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Follow the steps below:&lt;br /&gt;
#Click on the Maintenance icon.&lt;br /&gt;
#Select BASIC DATA SET and type in the NEOSYS username and password. (If the system does not prompt for a username and password,then go to Quit &amp;gt; Quit to next user and type the same in. If you do not enter with a username and password then NEOSYS will not allow you to restore the database). The first time when you enter maintenance you will get a command box (like when you do F5). If you do not get a command box, hit the F5 key and get it on the screen and hit ESC after you get it. &lt;br /&gt;
#Now restore the BACKUP.ZIP (STARTUP DATABASE), to do so go to General &amp;gt; Backup &amp;amp; Data Management, select (the 4th option) Restore from disk or diskette. select D drive (or whichever drive you put the backup.zip file in) and follow the prompts ahead.&lt;br /&gt;
#On every successful restore or creation of dataset, system will give you a message to switch to new database always &#039;&#039;&#039;say NO&#039;&#039;&#039; to this,because the switch to database option brings you back to the BASIC DATA SET. Hence press the ESC button, type EXIT on the F5 prompt.&lt;br /&gt;
#Now startup maintenance again and you will find a new database &amp;quot;STARTUP DATABASE&amp;quot; select it and login with NEOSYS username and password. Once you enter you may find a prompt &amp;quot;TASK ADDED&amp;quot; follow the prompt and continue.&lt;br /&gt;
#After you have logged in, go to General &amp;gt; Backup &amp;amp; Data Management &amp;gt; Delete a dataset and select the &amp;quot;BASIC DATASET&amp;quot; to delete, to confirm the delete system will ask you to enter the dataset code. Enter the code and delete the basis dataset.&lt;br /&gt;
#Now create a new dataset for the client, go to general &amp;gt; Backup &amp;amp; Data management&amp;gt; Create a new dataset, select (6th option) and follow the instruction on how to setup database code from the following link [[Installing_NEOSYS_Service#Assigning_database_codes|Assigning database codes]]&lt;br /&gt;
#Once the client dataset is created,login to the clientdataset and follow the steps in above point6 and delete the STARTUP DATABASE. (while logging in to the client dataset, it asks &amp;quot; This database has been copied or the database name or code has been changed. Is this going to be a unique new master database?&amp;quot; select first option YES - Going to be a new independent database.&lt;br /&gt;
#To check the list of dataset on the computer, go to go to General &amp;gt; Backup &amp;amp; Data Management &amp;gt; See a list of dataset in the computer(8th option).&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
#Sometimes it may tell you that you cannot use FILEMAN as you are logged in as MASTER. Hence you need to hit the ESC key, go to General &amp;gt; Backup &amp;amp; Data Management &amp;gt; Restore from disk or diskette, select C drive or whichever drive you put the backup.zip file in and follow the prompts ahead.&lt;br /&gt;
#While doing the step no.2 if you get a message as below just hit enter or space and continue.&lt;br /&gt;
&lt;br /&gt;
[[File:Message while installing.jpg]]&lt;br /&gt;
&lt;br /&gt;
==== Assigning database codes ====&lt;br /&gt;
It is necessary to make sure that the following guidelines are met while creating database codes:&lt;br /&gt;
&lt;br /&gt;
#The code MUST be within 8 letters&lt;br /&gt;
#The client MUST be instantly recognisable or as recognisable as possible from the main database code&lt;br /&gt;
#The test database code MUST END with the word &amp;quot;TEST&amp;quot; and it is not necessary that it must be recognisable.&amp;lt;br/&amp;gt;The system needs to know if a database is &amp;quot;test&amp;quot; or not.&amp;lt;br/&amp;gt;Otherwise test documents like invoices appear like real live documents potentially causing serious confusion. Many other internal problems will also occur.&lt;br /&gt;
#The test database code MUST sort alphabetically after the main database code at login. Prefixing the code with the letter X may achieve this.&lt;br /&gt;
#In cases where the company name consists of more than one word, make sure you choose the right combination which implies the company name clearly.&lt;br /&gt;
&lt;br /&gt;
Examples of wrong and right database codes:&lt;br /&gt;
&lt;br /&gt;
ALTO VISTA ADVERTISING&lt;br /&gt;
&lt;br /&gt;
 ALTOVIST and XALTTEST - right&lt;br /&gt;
 AVISTA and AVTEST - wrong - AVISTA is not as recognisable as ALTOVIST above&lt;br /&gt;
 &lt;br /&gt;
GLOBAL EDGE ADVERTISING&lt;br /&gt;
&lt;br /&gt;
 GLOBEDGE and XGLOTEST - right&lt;br /&gt;
 GLOBEDAD or GLOBALED and XGEATEST - wrong - GLOBEAD and GLOBALED are not as recognisable as GLOBEDGE above&lt;br /&gt;
 &lt;br /&gt;
CONTEXTURE ASSOCIATES&lt;br /&gt;
&lt;br /&gt;
 CONTEXT and XCONTEST - right&lt;br /&gt;
 CONTEXT and CONTEST - wrong - CONTEST will be alphabetically first in the login screen database drop down&lt;br /&gt;
&lt;br /&gt;
=== Creating a .CMD file to start NEOSYS Service: ===&lt;br /&gt;
(Note: change x to the correct drive you have installed NEOSYS on)&lt;br /&gt;
&lt;br /&gt;
In x:\neosys create a file start MAIN-DATABASE-CODE.cmd (eg start ALTOVIST.cmd)&lt;br /&gt;
&lt;br /&gt;
 x:&lt;br /&gt;
 cd \neosys\neosys&lt;br /&gt;
 Start neosys.js /system ADAGENCY /database &amp;lt;b&amp;gt;databasecode&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(where &amp;lt;b&amp;gt;databasecode&amp;lt;/b&amp;gt; is the code of the database)&lt;br /&gt;
(also you need to replace ADAGENCY with ACCOUNTS if this is an accounts only installation)&lt;br /&gt;
&lt;br /&gt;
In x:\neosys create a file start TEST-DATABASE-CODE.cmd (eg start AVTEST.cmd)&lt;br /&gt;
&lt;br /&gt;
 x:&lt;br /&gt;
 cd \neosys\neosys&lt;br /&gt;
 Start neosys.js /system ADAGENCY /database &amp;lt;b&amp;gt;testdatabasecode&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(where &amp;lt;b&amp;gt;testdatabasecode&amp;lt;/b&amp;gt; is the code of the testdatabase)&lt;br /&gt;
(also you need to replace ADAGENCY with ACCOUNTS if this is an accounts only installation)&lt;br /&gt;
&lt;br /&gt;
TEST THAT THE FILES YOU HAVE CREATED CAN RUN SUCCESSFULLY&lt;br /&gt;
&lt;br /&gt;
ENSURE THAT YOU DO NOT CLOSE THE PROCESS WINDOWS BY USING THE X BUTTON. HIT ESC 3 TIMES ON EACH WINDOW.&lt;br /&gt;
&lt;br /&gt;
=== Differences for Pure Accounts Module Only Installations ===&lt;br /&gt;
Accounts module only has a slightly different startup command. In the above, replace &#039;&#039;&#039;/system adagency&#039;&#039;&#039; with &#039;&#039;&#039;/system accounts&#039;&#039;&#039; to startup a service and use &#039;&#039;&#039;accounts.bat&#039;&#039;&#039; instead of &#039;&#039;&#039;adagency.bat&#039;&#039;&#039; to start up maintenance. Other than that, accounts module setup is identical. Pure accounts clients are very few and tend not to upgrade often so care needs to be taken when upgrading. Upgrade is done using the usual neosys2.exe file.&lt;br /&gt;
&lt;br /&gt;
=== Setting up daily scheduled tasks ===&lt;br /&gt;
NEOSYS is normally configured to backup and shutdown at 1 am. All the processes shutdown except one which performs the backup and then closes.&lt;br /&gt;
&lt;br /&gt;
==== If NEOSYS is installed on NEOSYS Server (win3) ====&lt;br /&gt;
Edit d:/hosts/STARTXXX.cmd (XXX could be MEA, USA etc. depending on the time zone of the client) to configure the client&#039;s live and test processes to start up automatically. As of 2016 TEST process is set to start first followed by LIVE processes for all clients in STARTXXX.cmd   &lt;br /&gt;
&lt;br /&gt;
The number of live and test processes configured to startup in STARTMEA.cmd MUST be exactly the same as the number of processes configured in the client&#039;s system configuration file. Otherwise, if a client&#039;s required number of processes are not started up by STARTMEA.cmd, then that client&#039;s remaining required processes will automatically start up after a few minutes and may interfere with startups of other clients&#039; processes, thus ruining the desired sequential startup of client processes.&lt;br /&gt;
&lt;br /&gt;
Use web access and go to Support Menu, System Configuration File and set the following for a) tiny clients : 1 process for main database and 1 for test database or b) large clients : 2 processes for main database and 1 for test database c) very large clients who have issues regularly with no process available : 3 processes for main database and 1 for test database.&lt;br /&gt;
&lt;br /&gt;
Set up an automatic copy of the main database to test database as shown at the end of the next section. The copy is done immediately after the backup. Test running “Copy now” SHOULD be avoided while users are online.&lt;br /&gt;
&lt;br /&gt;
==== If NEOSYS is installed on client server ====&lt;br /&gt;
A Windows Scheduled Task MUST be created to startup NEOSYS every day typically at 6 am. It can startup one live database process and that process will startup all other required database processes. Test databases will not startup other database processes automatically unless configured to do so from the System Configuration File.&lt;br /&gt;
&lt;br /&gt;
On Windows 2008 Standard, untick highest privileges and untick run whether user is logged in or not. This means that NEOSYS processes will be visible on the desktop when you login BUT the windows scheduled tasks to startup NEOSYS will FAIL to run if the server is rebooted for any reason including power failure or when the monthly Windows Update procedure reboots.&lt;br /&gt;
&lt;br /&gt;
Alternatively, for clients which cannot tolerate manual intervention after server reboots for any reason (e.g.need to start work before NEOSYS support is available or on NEOSYS support weekends), tick &amp;quot;highest privileges&amp;quot; and &amp;quot;run whether the user is logged in or not&amp;quot;. This approach means that NEOSYS processes which are started by the windows scheduled task are not visible on the desktop and run hidden in the background and only listed in task manager, so avoid this approach on small clients (only a few users). Windows Update is a common cause for server reboots so configure Updates to install at 3 AM on any day between Sunday to Wednesday since on these days Support will be available to manually restart NEOSYS processes after a server restart.&lt;br /&gt;
&lt;br /&gt;
Create a task to start one Main database process at 6:00 am daily.&lt;br /&gt;
&lt;br /&gt;
[[File:start1.jpg]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:start2.jpg]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:start3.jpg]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(For multiple sites on the same computer put the second site starting five minutes later at 6:05 am, the third site starting five minutes earlier at 5:55 am, the fourth site starting five minutes later at 6:10 am and so on.)&lt;br /&gt;
&lt;br /&gt;
Once created, test them to see that they are working correctly by running them directly using right click- Run. There is no problem testing the “daily 6 am startup task” at any time since it will just add an additional process.&lt;br /&gt;
&lt;br /&gt;
[[File:task1.jpg]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use web access and go to Support Menu, System Configuration File to request 3 processes for main database and 1 for test database. Also, set up an automatic copy of the main database to test database as below. The copy is done immediately after the backup. Test running “Copy now” SHOULD be avoided while users are online.&lt;br /&gt;
&lt;br /&gt;
[[File:autocopy.jpg]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring NEOSYS to start automatically on server start-up / reboot ===&lt;br /&gt;
We no longer configure NEOSYS processes to start on reboot as we would like to know of the failures at the client side and hence whenever the server reboots we expect the client to inform us and we will start the process - or NEOSYS will start automatically next day at 6 am&lt;br /&gt;
&lt;br /&gt;
Unfortunately using this method the NEOSYS processes are not visible when you login as a user. &lt;br /&gt;
&lt;br /&gt;
[[Image:win_sch_task.jpg]]&lt;br /&gt;
&lt;br /&gt;
Schedule a task to run the main database file whenever the computer starts. In Windows 2008 you need to tick the options - Run whether user logged in or not and Run with highest privilege.&lt;br /&gt;
&lt;br /&gt;
Additional in Windows 2008: Tick Highest Priviledges and Run whether user logged in or not&lt;br /&gt;
&lt;br /&gt;
== Installing and upgrading NEOSYS pure accounting systems ==&lt;br /&gt;
&lt;br /&gt;
Basic installation using NEOSYS.EXE and upgrades using NEOSYS2.EXE are identical to the normal adagency installation process.&lt;br /&gt;
&lt;br /&gt;
Differences are as follows:&lt;br /&gt;
&lt;br /&gt;
# Maintenance shortcut to ACCOUNTS.BAT&lt;br /&gt;
# Process startup file contains &amp;quot;/system ACCOUNTS&amp;quot; instead of &amp;quot;/system ADAGENCY&amp;quot;&lt;br /&gt;
# Internet address is http://server/neosys/accounts.htm although it auto converts to http://server/neosys/default.htm??ACCOUNTS. Although not to be relied upon, the login page stores a cookie so even plain http://server/neosys or http://server/neosys/default.htm works thereafter until the cookie is lost. To get back to adagency login you use http://server/neosys/default.htm??ADAGENCY&lt;br /&gt;
# BACKUP.ZIP files created by ADAGENCY systems and ACCOUNTS systems are slightly incompatible with the result that restoring one in the other type of system will not work. NEOSYS programmers can convert from one type to the other but it is almost never required since any ad agency that only requires accounts only module is given the adagency version of NEOSYS and accounting only clients becoming ad agencies never happened.&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Installing_EMS_Magic&amp;diff=3086</id>
		<title>Installing EMS Magic</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Installing_EMS_Magic&amp;diff=3086"/>
		<updated>2017-12-23T12:05:48Z</updated>

		<summary type="html">&lt;p&gt;Steve: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About EMS memory ==&lt;br /&gt;
&lt;br /&gt;
NEOSYS requires EMS memory to function well.&lt;br /&gt;
&lt;br /&gt;
Lack of EMS memory causes inability to process large databases and documents, and errors like:&lt;br /&gt;
&lt;br /&gt;
#Backup File Size is 0&lt;br /&gt;
#RTP27. [B28] Not enough String Space – Out of Memory&lt;br /&gt;
#B703 Error&lt;br /&gt;
#B706 - String Space Format Error&lt;br /&gt;
&lt;br /&gt;
Window 10 provides EMS memory automatically so installation of EMS Magic is NOT required.&lt;br /&gt;
&lt;br /&gt;
Windows 2008 does not provide EMS memory itself so installation of EMS Magic IS required&lt;br /&gt;
&lt;br /&gt;
Windows 2003 usually provides EMS memory itself BUT this can vary depending on the server hardware/bios configuration therefore installation of EMS Magic MAY or MAY NOT be required.&lt;br /&gt;
&lt;br /&gt;
Please read the notes at [[Troubleshooting_NEOSYS_Generally#Recognising_and_Solving_Low_Memory_Problems|Recognising and Solving Low Memory Problems]] to understand more about EMS related problems.&lt;br /&gt;
&lt;br /&gt;
== Installing EMS Magic ==&lt;br /&gt;
&lt;br /&gt;
# Download http://www.neosys.com/support/EMSMAGIC.EXE and place it in C:\Windows folder&lt;br /&gt;
# Restart NEOSYS in maintenance mode and check that the EMS memory shows in the maintenance mode by typing WHO in the command line (instructions at [[Troubleshooting_NEOSYS_Generally#Checking_EMS_Memory_Configuration|Checking EMS Memory Configuration]])&lt;br /&gt;
# Double check that EMS Magic is functioning by noticing the following screen briefly as soon as you open up a maintenance or process window:&lt;br /&gt;
&lt;br /&gt;
[[image:emsscreenmaint.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Installing EMS Magic on older versions of NEOSYS ==&lt;br /&gt;
&lt;br /&gt;
In versions of NEOSYS prior to Dec 2018 it is also required to edit the AUTOEXEC.NT file as follows:&lt;br /&gt;
&lt;br /&gt;
Edit c:\windows\system32\autoexec.nt file in Notepad to include the following at the bottom:&lt;br /&gt;
&lt;br /&gt;
[[image:autoexecnt.jpg]]&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Technical_/_Hardware_requirements&amp;diff=3070</id>
		<title>Technical / Hardware requirements</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Technical_/_Hardware_requirements&amp;diff=3070"/>
		<updated>2017-11-01T19:03:48Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Software requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Hardware requirements ===&lt;br /&gt;
* Entry level physical or virtual server *dedicated to NEOSYS only*&lt;br /&gt;
* 2 or more CPU cores&lt;br /&gt;
* 1 GB RAM &lt;br /&gt;
* 10 GB HDD - SSD Recommended&lt;br /&gt;
&lt;br /&gt;
=== Software requirements ===&lt;br /&gt;
* Windows 10 Pro. Must be 32bit. Cannot be 64bit.&lt;br /&gt;
* Windows 10 Enterprise. Must be 32bit. Cannot be 64bit.&lt;br /&gt;
* Windows 2008 Standard Edition. Must be 32bit. Cannot be 64bit/R2.&lt;br /&gt;
* Administrator Access Rights&lt;br /&gt;
* Configured with two partitions on the hard disk (C &amp;amp; D)&lt;br /&gt;
* Configured as a workgroup and not as part of a domain&lt;br /&gt;
* No roles assigned for the server (eg DNS or DHCP or FILE SERVER)&lt;br /&gt;
* All service packs and updates applied &lt;br /&gt;
* No Anti-Virus or any other program loaded&lt;br /&gt;
* Configured with an internal static IP (ie dynamic IP delivered by DHCP is not allowed)&lt;br /&gt;
&lt;br /&gt;
=== NEOSYS Software Browser and OS Requirements ===&lt;br /&gt;
&lt;br /&gt;
Internet Explorer 8+, Firefox, Chrome on Windows/OSX/Mobile&lt;br /&gt;
&lt;br /&gt;
Browsers must have pop-up blockers turned off and must not have any 3rd party toolbars installed.&lt;br /&gt;
&lt;br /&gt;
=== Backup requirements ===&lt;br /&gt;
If entry level physical server or if virtual server that supports USB passthrough (e.g. VMWare vSphere version 4.1 and above):&lt;br /&gt;
* 3 x 4 GB USB drives for backup&lt;br /&gt;
* Someone to change the USB drives on a scheduled basis (weekly)&lt;br /&gt;
&lt;br /&gt;
If virtual server that does not support USB passthrough:&lt;br /&gt;
* Client must *at their own responsibility* agree to arrange copy of the backup files to an external backup location every day.&lt;br /&gt;
Also refer to [[Backup_and_Restore#Backup_in_virtual_server| Backup to virtual server]]&lt;br /&gt;
&lt;br /&gt;
=== Router requirements ===&lt;br /&gt;
* Username and password for the router OR someone who can configure port forwarding/virtual server configuration for:&lt;br /&gt;
**SSH on port 19580 &lt;br /&gt;
**HTTPS on 4430 OR port no. provided by NEOSYS Support (Required only if NEOSYS needs to be accessed from outside office and prior management approval for this is obtained) &lt;br /&gt;
* Outgoing access to the internet on port 2500 or access to send email via an internal email server.&lt;br /&gt;
&lt;br /&gt;
=== Remote support requirement ===&lt;br /&gt;
&lt;br /&gt;
[[Letter_to_obtain_agreement_of_client_IT_staff_to_provide_remote_access| Letter to obtain agreement of client IT staff to provide remote access]]&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Technical_/_Hardware_requirements&amp;diff=3069</id>
		<title>Technical / Hardware requirements</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Technical_/_Hardware_requirements&amp;diff=3069"/>
		<updated>2017-11-01T19:02:50Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Hardware requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Hardware requirements ===&lt;br /&gt;
* Entry level physical or virtual server *dedicated to NEOSYS only*&lt;br /&gt;
* 2 or more CPU cores&lt;br /&gt;
* 1 GB RAM &lt;br /&gt;
* 10 GB HDD - SSD Recommended&lt;br /&gt;
&lt;br /&gt;
=== Software requirements ===&lt;br /&gt;
* Windows 2008 Standard Edition. Must be 32bit. Cannot be 64bit/R2.&lt;br /&gt;
* Administrator Access Rights&lt;br /&gt;
* Configured with two partitions on the hard disk (C &amp;amp; D)&lt;br /&gt;
* Configured as a workgroup and not as part of a domain&lt;br /&gt;
* No roles assigned for the server (eg DNS or DHCP or FILE SERVER)&lt;br /&gt;
* All service packs and updates applied &lt;br /&gt;
* No Anti-Virus or any other program loaded&lt;br /&gt;
* Configured with an internal static IP (ie dynamic IP delivered by DHCP is not allowed)&lt;br /&gt;
&lt;br /&gt;
=== NEOSYS Software Browser and OS Requirements ===&lt;br /&gt;
&lt;br /&gt;
Internet Explorer 8+, Firefox, Chrome on Windows/OSX/Mobile&lt;br /&gt;
&lt;br /&gt;
Browsers must have pop-up blockers turned off and must not have any 3rd party toolbars installed.&lt;br /&gt;
&lt;br /&gt;
=== Backup requirements ===&lt;br /&gt;
If entry level physical server or if virtual server that supports USB passthrough (e.g. VMWare vSphere version 4.1 and above):&lt;br /&gt;
* 3 x 4 GB USB drives for backup&lt;br /&gt;
* Someone to change the USB drives on a scheduled basis (weekly)&lt;br /&gt;
&lt;br /&gt;
If virtual server that does not support USB passthrough:&lt;br /&gt;
* Client must *at their own responsibility* agree to arrange copy of the backup files to an external backup location every day.&lt;br /&gt;
Also refer to [[Backup_and_Restore#Backup_in_virtual_server| Backup to virtual server]]&lt;br /&gt;
&lt;br /&gt;
=== Router requirements ===&lt;br /&gt;
* Username and password for the router OR someone who can configure port forwarding/virtual server configuration for:&lt;br /&gt;
**SSH on port 19580 &lt;br /&gt;
**HTTPS on 4430 OR port no. provided by NEOSYS Support (Required only if NEOSYS needs to be accessed from outside office and prior management approval for this is obtained) &lt;br /&gt;
* Outgoing access to the internet on port 2500 or access to send email via an internal email server.&lt;br /&gt;
&lt;br /&gt;
=== Remote support requirement ===&lt;br /&gt;
&lt;br /&gt;
[[Letter_to_obtain_agreement_of_client_IT_staff_to_provide_remote_access| Letter to obtain agreement of client IT staff to provide remote access]]&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=NEOSYS_DDNS_Service&amp;diff=2716</id>
		<title>NEOSYS DDNS Service</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=NEOSYS_DDNS_Service&amp;diff=2716"/>
		<updated>2016-06-03T12:56:44Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Troubleshooting NEOSYS DDNS Service */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Using NEOSYS DDNS service ==&lt;br /&gt;
&lt;br /&gt;
The NEOSYS monitoring server at monitor.neosys.com will update NEOSYS &lt;br /&gt;
DNS server currently zonedit.com if it is requested to do so by NEOSYS &lt;br /&gt;
installations. NEOSYS installations do that automatically when updating &lt;br /&gt;
Nagios and can also have a Windows service configured to do it at all times.&lt;br /&gt;
&lt;br /&gt;
Normally this would only be used at NEOSYS installations that have a &lt;br /&gt;
dynamic ip number ie do not have a static ip number.&lt;br /&gt;
&lt;br /&gt;
This is not required generally at client installations with static ip &lt;br /&gt;
numbers or NEOSYS win3/win4 installations but it MAY be used in that &lt;br /&gt;
situation too to provide for automatic change of static DNS for example &lt;br /&gt;
to cater for:&lt;br /&gt;
&lt;br /&gt;
*migration from old server to new server&lt;br /&gt;
*moving to backup servers&lt;br /&gt;
*moving back to live servers&lt;br /&gt;
*moving between client&#039;s own server and NEOSYS hosts on win3/win4.&lt;br /&gt;
&lt;br /&gt;
Care will be needed to ensure that the DDNS service is not running &lt;br /&gt;
simultaneously on the both old and new servers.&lt;br /&gt;
&lt;br /&gt;
=== Using Windows service neosysddns ===&lt;br /&gt;
&lt;br /&gt;
This will work even when NEOSYS processes are not running. This is &lt;br /&gt;
useful when NEOSYS processes are stopped overnight and when the server &lt;br /&gt;
is rebooted, for example for Windows Updates, and NEOSYS processes are &lt;br /&gt;
not configured to run automatically after rebooting&lt;br /&gt;
&lt;br /&gt;
==== Starting Windows service on the client server ====&lt;br /&gt;
&lt;br /&gt;
In NEOSYS maintenance mode&lt;br /&gt;
&lt;br /&gt;
 STARTDDNS&lt;br /&gt;
&lt;br /&gt;
==== Stopping the Windows service on the client server ====&lt;br /&gt;
&lt;br /&gt;
In NEOSYS maintenance mode&lt;br /&gt;
&lt;br /&gt;
 STOPDDNS&lt;br /&gt;
&lt;br /&gt;
or you can stop and/or disable the windows service manually&lt;br /&gt;
&lt;br /&gt;
This will NOT stop Nagios based DDNS which has to be done separately. See section below.&lt;br /&gt;
&lt;br /&gt;
=== Nagios based DDNS ===&lt;br /&gt;
&lt;br /&gt;
NAGIOS can update NEOSYS ddns entries (currently on zoneedit) automatically as by product of the processing of NAGIOS server updates from NEOSYS processes running on the client server. This is done independently and in parallel to the NEOSYSDDNS service which runs on NEOSYS servers.&lt;br /&gt;
&lt;br /&gt;
=== Automatic Nagios based DDNS ===&lt;br /&gt;
&lt;br /&gt;
This will occur if a special file exists on the NAGIOS server. This file is automatically created when STARTDDNS has been run on the NEOSYS server, or can be created manually.&lt;br /&gt;
&lt;br /&gt;
Therefore, if you are running NEOSYSDDNS service on the NEOSYS server, DDNS will be ALSO be done in parallel by Nagios. This is useful as a backup for example in the case where the NEOSYSDDNS service has to be stopped on the NEOSYS server eg while Cygwin updates are being processed.&lt;br /&gt;
&lt;br /&gt;
To see what hosts are subject to automatic Nagios based DDNS.&lt;br /&gt;
&lt;br /&gt;
 ll /var/lib/neosysddns&lt;br /&gt;
&lt;br /&gt;
=== Manually starting Nagios based DDNS ===&lt;br /&gt;
&lt;br /&gt;
If you need to switch on DDNS service for some reason but cannot get to the NEOSYS server to do so, then you can request Nagios to perform DDNS by creating a special file in the NAGIOS server as follows:&lt;br /&gt;
&lt;br /&gt;
 touch /var/lib/neosysddns/xxxxxxxx.client&lt;br /&gt;
 chmod a+rw /var/lib/neosysddns/xxxxxxxx.client&lt;br /&gt;
&lt;br /&gt;
=== Stopping Nagios based DDNS ===&lt;br /&gt;
&lt;br /&gt;
If you need to stop DDNS being done by NAGIOS after either automatically or manually starting it as above, you must remove a special file in the NAGIOS server as follows. Note that running STOPDDNS in the NEOSYS server does NOT remove the special file on NAGIOS server, so just running STOPDDNS in the NEOSYS server will NOT stop the parallel NAGIOS server updating DDNS. Therefore if you wish complete cessation of DDNS service for a hostname you will have to do this step AS WELL.&lt;br /&gt;
&lt;br /&gt;
 rm /var/lib/neosysddns/xxxxxxxx.client&lt;br /&gt;
&lt;br /&gt;
=== Configuring neosysddns on monitor.neosys.com ===&lt;br /&gt;
&lt;br /&gt;
The configuration of NEOSYS DDNS service on nagios i.e monitor.neosys.com can be controlled as follows:&lt;br /&gt;
&lt;br /&gt;
Remember that this is the neosysddns service on monitor.neosys.com and NOT the windows service on the server with dynamic ip no.&lt;br /&gt;
&lt;br /&gt;
neosysddns logging level may be configured NOT to show every DDNS update check if the IP no hasn&#039;t changed to save log file space since the neosysddns windows servers triggers every minute.&lt;br /&gt;
&lt;br /&gt;
 nano /etc/nagios3/conf.d/ddnsconf.py&lt;br /&gt;
 sudo service neosysddns restart&lt;br /&gt;
&lt;br /&gt;
Other NEOSYS DDNS service commands are:&lt;br /&gt;
&lt;br /&gt;
 sudo service neosysddns stop&lt;br /&gt;
 sudo service neosysddns start&lt;br /&gt;
 sudo service neosysddns status&lt;br /&gt;
&lt;br /&gt;
All service commands with the exception of status show nothing if successful or error message if not.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting NEOSYS DDNS Service ==&lt;br /&gt;
&lt;br /&gt;
On nagios/monitor server to see recent ddns updates for a hostname &amp;quot;XXXX&amp;quot; whatever is entered as System ID in System configuration file.&lt;br /&gt;
&lt;br /&gt;
 journalctl|grep -i ddns|grep XXXX&lt;br /&gt;
&lt;br /&gt;
or to watch new ddns updates as they come in&lt;br /&gt;
&lt;br /&gt;
 journalctl -f | grep -i ddns&lt;br /&gt;
&lt;br /&gt;
or to watch new ddns updates as they come in for xxxxxxxx&lt;br /&gt;
&lt;br /&gt;
 journalctl -f | grep -i ddns | grep xxxxxxxx&lt;br /&gt;
&lt;br /&gt;
Lines containing ddns.py are the result of NEOSYS Windows service.&lt;br /&gt;
&lt;br /&gt;
Lines containing apache2 are the result of nagios updates. e.g as shown below:&lt;br /&gt;
&lt;br /&gt;
 Jan 28 00:03:04 monitor apache2: DDNS IP_NO ums &amp;lt;SUCCESS CODE=&amp;quot;200&amp;quot; TEXT=&amp;quot;XXXX.hosts.neosys.com updated to 82.178.63.35&amp;quot; ZONE=&amp;quot;XXXX.hosts.neosys.com&amp;quot;&amp;gt;&lt;br /&gt;
 Jan 28 01:54:26 monitor ddns.py: DDNS IP_NO 4481 &amp;quot;ddns XXXX&amp;quot; No. 11327 was 82.178.63.35 &amp;lt;SUCCESS CODE=&amp;quot;200&amp;quot; TEXT=&amp;quot;XXXX.hosts.neosys.com updated to 85.154.7.138&amp;quot; ZONE=&amp;quot;XXXX.hosts.neosys.com&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Working/Status Files&lt;br /&gt;
&lt;br /&gt;
 ll /var/lib/neosysddns/&lt;br /&gt;
 ll /var/lib/neosysddns/ignored&lt;br /&gt;
&lt;br /&gt;
Configuration File&lt;br /&gt;
&lt;br /&gt;
 nano /etc/nagios3/conf.d/ddnsconf.py&lt;br /&gt;
&lt;br /&gt;
Configuration options - see comments in file&lt;br /&gt;
&lt;br /&gt;
Hosts that have been seen by Nagios but were ignored because the xxxxxxxx.client file was not present in /var/lib/neosysddns&lt;br /&gt;
&lt;br /&gt;
 ll /var/lib/neosysddns/ignored&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=NEOSYS_DDNS_Service&amp;diff=2714</id>
		<title>NEOSYS DDNS Service</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=NEOSYS_DDNS_Service&amp;diff=2714"/>
		<updated>2016-06-02T07:24:13Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Troubleshooting NEOSYS DDNS Service */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Using NEOSYS DDNS service ==&lt;br /&gt;
&lt;br /&gt;
The NEOSYS monitoring server at monitor.neosys.com will update NEOSYS &lt;br /&gt;
DNS server currently zonedit.com if it is requested to do so by NEOSYS &lt;br /&gt;
installations. NEOSYS installations do that automatically when updating &lt;br /&gt;
Nagios and can also have a Windows service configured to do it at all times.&lt;br /&gt;
&lt;br /&gt;
Normally this would only be used at NEOSYS installations that have a &lt;br /&gt;
dynamic ip number ie do not have a static ip number.&lt;br /&gt;
&lt;br /&gt;
This is not required generally at client installations with static ip &lt;br /&gt;
numbers or NEOSYS win3/win4 installations but it MAY be used in that &lt;br /&gt;
situation too to provide for automatic change of static DNS for example &lt;br /&gt;
to cater for:&lt;br /&gt;
&lt;br /&gt;
*migration from old server to new server&lt;br /&gt;
*moving to backup servers&lt;br /&gt;
*moving back to live servers&lt;br /&gt;
*moving between client&#039;s own server and NEOSYS hosts on win3/win4.&lt;br /&gt;
&lt;br /&gt;
Care will be needed to ensure that the DDNS service is not running &lt;br /&gt;
simultaneously on the both old and new servers.&lt;br /&gt;
&lt;br /&gt;
=== Using Windows service neosysddns ===&lt;br /&gt;
&lt;br /&gt;
This will work even when NEOSYS processes are not running. This is &lt;br /&gt;
useful when NEOSYS processes are stopped overnight and when the server &lt;br /&gt;
is rebooted, for example for Windows Updates, and NEOSYS processes are &lt;br /&gt;
not configured to run automatically after rebooting&lt;br /&gt;
&lt;br /&gt;
==== Starting Windows service on the client server ====&lt;br /&gt;
&lt;br /&gt;
In NEOSYS maintenance mode&lt;br /&gt;
&lt;br /&gt;
 STARTDDNS&lt;br /&gt;
&lt;br /&gt;
==== Stopping the Windows service on the client server ====&lt;br /&gt;
&lt;br /&gt;
In NEOSYS maintenance mode&lt;br /&gt;
&lt;br /&gt;
 STOPDDNS&lt;br /&gt;
&lt;br /&gt;
or you can stop and/or disable the windows service manually&lt;br /&gt;
&lt;br /&gt;
This will NOT stop Nagios based DDNS which has to be done separately. See section below.&lt;br /&gt;
&lt;br /&gt;
=== Nagios based DDNS ===&lt;br /&gt;
&lt;br /&gt;
NAGIOS can update NEOSYS ddns entries (currently on zoneedit) automatically as by product of the processing of NAGIOS server updates from NEOSYS processes running on the client server. This is done independently and in parallel to the NEOSYSDDNS service which runs on NEOSYS servers.&lt;br /&gt;
&lt;br /&gt;
=== Automatic Nagios based DDNS ===&lt;br /&gt;
&lt;br /&gt;
This will occur if a special file exists on the NAGIOS server. This file is automatically created when STARTDDNS has been run on the NEOSYS server, or can be created manually.&lt;br /&gt;
&lt;br /&gt;
Therefore, if you are running NEOSYSDDNS service on the NEOSYS server, DDNS will be ALSO be done in parallel by Nagios. This is useful as a backup for example in the case where the NEOSYSDDNS service has to be stopped on the NEOSYS server eg while Cygwin updates are being processed.&lt;br /&gt;
&lt;br /&gt;
To see what hosts are subject to automatic Nagios based DDNS.&lt;br /&gt;
&lt;br /&gt;
 ll /var/lib/neosysddns&lt;br /&gt;
&lt;br /&gt;
=== Manually starting Nagios based DDNS ===&lt;br /&gt;
&lt;br /&gt;
If you need to switch on DDNS service for some reason but cannot get to the NEOSYS server to do so, then you can request Nagios to perform DDNS by creating a special file in the NAGIOS server as follows:&lt;br /&gt;
&lt;br /&gt;
 touch /var/lib/neosysddns/xxxxxxxx.client&lt;br /&gt;
 chmod a+rw /var/lib/neosysddns/xxxxxxxx.client&lt;br /&gt;
&lt;br /&gt;
=== Stopping Nagios based DDNS ===&lt;br /&gt;
&lt;br /&gt;
If you need to stop DDNS being done by NAGIOS after either automatically or manually starting it as above, you must remove a special file in the NAGIOS server as follows. Note that running STOPDDNS in the NEOSYS server does NOT remove the special file on NAGIOS server, so just running STOPDDNS in the NEOSYS server will NOT stop the parallel NAGIOS server updating DDNS. Therefore if you wish complete cessation of DDNS service for a hostname you will have to do this step AS WELL.&lt;br /&gt;
&lt;br /&gt;
 rm /var/lib/neosysddns/xxxxxxxx.client&lt;br /&gt;
&lt;br /&gt;
=== Configuring neosysddns on monitor.neosys.com ===&lt;br /&gt;
&lt;br /&gt;
The configuration of NEOSYS DDNS service on nagios i.e monitor.neosys.com can be controlled as follows:&lt;br /&gt;
&lt;br /&gt;
Remember that this is the neosysddns service on monitor.neosys.com and NOT the windows service on the server with dynamic ip no.&lt;br /&gt;
&lt;br /&gt;
neosysddns logging level may be configured NOT to show every DDNS update check if the IP no hasn&#039;t changed to save log file space since the neosysddns windows servers triggers every minute.&lt;br /&gt;
&lt;br /&gt;
 nano /etc/nagios3/conf.d/ddns.conf&lt;br /&gt;
 sudo service neosysddns restart&lt;br /&gt;
&lt;br /&gt;
Other NEOSYS DDNS service commands are:&lt;br /&gt;
&lt;br /&gt;
 sudo service neosysddns stop&lt;br /&gt;
 sudo service neosysddns start&lt;br /&gt;
 sudo service neosysddns status&lt;br /&gt;
&lt;br /&gt;
All service commands with the exception of status show nothing if successful or error message if not.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting NEOSYS DDNS Service ==&lt;br /&gt;
&lt;br /&gt;
On nagios/monitor server to see recent ddns updates for a hostname &amp;quot;XXXX&amp;quot; whatever is entered as System ID in System configuration file.&lt;br /&gt;
&lt;br /&gt;
 journalctl|grep -i ddns|grep XXXX&lt;br /&gt;
&lt;br /&gt;
or to watch new ddns updates as they come in&lt;br /&gt;
&lt;br /&gt;
 journalctl -f | grep -i ddns&lt;br /&gt;
&lt;br /&gt;
or to watch new ddns updates as they come in for xxxxxxxx&lt;br /&gt;
&lt;br /&gt;
 journalctl -f | grep -i ddns | grep xxxxxxxx&lt;br /&gt;
&lt;br /&gt;
Lines containing ddns.py are the result of NEOSYS Windows service.&lt;br /&gt;
&lt;br /&gt;
Lines containing apache2 are the result of nagios updates. e.g as shown below:&lt;br /&gt;
&lt;br /&gt;
 Jan 28 00:03:04 monitor apache2: DDNS IP_NO ums &amp;lt;SUCCESS CODE=&amp;quot;200&amp;quot; TEXT=&amp;quot;XXXX.hosts.neosys.com updated to 82.178.63.35&amp;quot; ZONE=&amp;quot;XXXX.hosts.neosys.com&amp;quot;&amp;gt;&lt;br /&gt;
 Jan 28 01:54:26 monitor ddns.py: DDNS IP_NO 4481 &amp;quot;ddns XXXX&amp;quot; No. 11327 was 82.178.63.35 &amp;lt;SUCCESS CODE=&amp;quot;200&amp;quot; TEXT=&amp;quot;XXXX.hosts.neosys.com updated to 85.154.7.138&amp;quot; ZONE=&amp;quot;XXXX.hosts.neosys.com&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Working/Status Files&lt;br /&gt;
&lt;br /&gt;
 ll /var/lib/neosysddns/&lt;br /&gt;
 ll /var/lib/neosysddns/ignored&lt;br /&gt;
&lt;br /&gt;
Configuration File&lt;br /&gt;
&lt;br /&gt;
 nano /etc/nagios3/conf.d/ddnsconf.py&lt;br /&gt;
&lt;br /&gt;
Configuration options&lt;br /&gt;
&lt;br /&gt;
 loginvalid=False          #requests with the wrong format. maybe random packets from the internet.&lt;br /&gt;
 loglanrejected=False      #requests for lan ipno 192.168 172.16-32 10 127&lt;br /&gt;
 logskipped=False          #hostnames that &lt;br /&gt;
 lognotchanged=False       #ipno same as before&lt;br /&gt;
 logzoneeditresponses=True #recommended True so you can see what zoneedit replies to requests to update ipno Success/Failure/Ignored&lt;br /&gt;
 lognthpacket=1000         #always log every nth request if not 0, regardless of other options. useful to check service is active when little is logged.&lt;br /&gt;
&lt;br /&gt;
Hosts that have been seen by Nagios but were ignored because the xxxxxxxx.client file was not present in /var/lib/neosysddns&lt;br /&gt;
&lt;br /&gt;
 ll /var/lib/neosysddns/ignored&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=NEOSYS_DDNS_Service&amp;diff=2713</id>
		<title>NEOSYS DDNS Service</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=NEOSYS_DDNS_Service&amp;diff=2713"/>
		<updated>2016-05-31T21:44:59Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Troubleshooting NEOSYS DDNS Service */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Using NEOSYS DDNS service ==&lt;br /&gt;
&lt;br /&gt;
The NEOSYS monitoring server at monitor.neosys.com will update NEOSYS &lt;br /&gt;
DNS server currently zonedit.com if it is requested to do so by NEOSYS &lt;br /&gt;
installations. NEOSYS installations do that automatically when updating &lt;br /&gt;
Nagios and can also have a Windows service configured to do it at all times.&lt;br /&gt;
&lt;br /&gt;
Normally this would only be used at NEOSYS installations that have a &lt;br /&gt;
dynamic ip number ie do not have a static ip number.&lt;br /&gt;
&lt;br /&gt;
This is not required generally at client installations with static ip &lt;br /&gt;
numbers or NEOSYS win3/win4 installations but it MAY be used in that &lt;br /&gt;
situation too to provide for automatic change of static DNS for example &lt;br /&gt;
to cater for:&lt;br /&gt;
&lt;br /&gt;
*migration from old server to new server&lt;br /&gt;
*moving to backup servers&lt;br /&gt;
*moving back to live servers&lt;br /&gt;
*moving between client&#039;s own server and NEOSYS hosts on win3/win4.&lt;br /&gt;
&lt;br /&gt;
Care will be needed to ensure that the DDNS service is not running &lt;br /&gt;
simultaneously on the both old and new servers.&lt;br /&gt;
&lt;br /&gt;
=== Using Windows service neosysddns ===&lt;br /&gt;
&lt;br /&gt;
This will work even when NEOSYS processes are not running. This is &lt;br /&gt;
useful when NEOSYS processes are stopped overnight and when the server &lt;br /&gt;
is rebooted, for example for Windows Updates, and NEOSYS processes are &lt;br /&gt;
not configured to run automatically after rebooting&lt;br /&gt;
&lt;br /&gt;
==== Starting Windows service on the client server ====&lt;br /&gt;
&lt;br /&gt;
In NEOSYS maintenance mode&lt;br /&gt;
&lt;br /&gt;
 STARTDDNS&lt;br /&gt;
&lt;br /&gt;
==== Stopping the Windows service on the client server ====&lt;br /&gt;
&lt;br /&gt;
In NEOSYS maintenance mode&lt;br /&gt;
&lt;br /&gt;
 STOPDDNS&lt;br /&gt;
&lt;br /&gt;
or you can stop and/or disable the windows service manually&lt;br /&gt;
&lt;br /&gt;
This will NOT stop Nagios based DDNS which has to be done separately. See section below.&lt;br /&gt;
&lt;br /&gt;
=== Nagios based DDNS ===&lt;br /&gt;
&lt;br /&gt;
NAGIOS can update NEOSYS ddns entries (currently on zoneedit) automatically as by product of the processing of NAGIOS server updates from NEOSYS processes running on the client server. This is done independently and in parallel to the NEOSYSDDNS service which runs on NEOSYS servers.&lt;br /&gt;
&lt;br /&gt;
=== Automatic Nagios based DDNS ===&lt;br /&gt;
&lt;br /&gt;
This will occur if a special file exists on the NAGIOS server. This file is automatically created when STARTDDNS has been run on the NEOSYS server, or can be created manually.&lt;br /&gt;
&lt;br /&gt;
Therefore, if you are running NEOSYSDDNS service on the NEOSYS server, DDNS will be ALSO be done in parallel by Nagios. This is useful as a backup for example in the case where the NEOSYSDDNS service has to be stopped on the NEOSYS server eg while Cygwin updates are being processed.&lt;br /&gt;
&lt;br /&gt;
To see what hosts are subject to automatic Nagios based DDNS.&lt;br /&gt;
&lt;br /&gt;
 ll /var/lib/neosysddns&lt;br /&gt;
&lt;br /&gt;
=== Manually starting Nagios based DDNS ===&lt;br /&gt;
&lt;br /&gt;
If you need to switch on DDNS service for some reason but cannot get to the NEOSYS server to do so, then you can request Nagios to perform DDNS by creating a special file in the NAGIOS server as follows:&lt;br /&gt;
&lt;br /&gt;
 touch /var/lib/neosysddns/xxxxxxxx.client&lt;br /&gt;
 chmod a+rw /var/lib/neosysddns/xxxxxxxx.client&lt;br /&gt;
&lt;br /&gt;
=== Stopping Nagios based DDNS ===&lt;br /&gt;
&lt;br /&gt;
If you need to stop DDNS being done by NAGIOS after either automatically or manually starting it as above, you must remove a special file in the NAGIOS server as follows. Note that running STOPDDNS in the NEOSYS server does NOT remove the special file on NAGIOS server, so just running STOPDDNS in the NEOSYS server will NOT stop the parallel NAGIOS server updating DDNS. Therefore if you wish complete cessation of DDNS service for a hostname you will have to do this step AS WELL.&lt;br /&gt;
&lt;br /&gt;
 rm /var/lib/neosysddns/xxxxxxxx.client&lt;br /&gt;
&lt;br /&gt;
=== Configuring neosysddns on monitor.neosys.com ===&lt;br /&gt;
&lt;br /&gt;
The configuration of NEOSYS DDNS service on nagios i.e monitor.neosys.com can be controlled as follows:&lt;br /&gt;
&lt;br /&gt;
Remember that this is the neosysddns service on monitor.neosys.com and NOT the windows service on the server with dynamic ip no.&lt;br /&gt;
&lt;br /&gt;
neosysddns logging level may be configured NOT to show every DDNS update check if the IP no hasn&#039;t changed to save log file space since the neosysddns windows servers triggers every minute.&lt;br /&gt;
&lt;br /&gt;
 nano /etc/nagios3/conf.d/ddns.conf&lt;br /&gt;
 sudo service neosysddns restart&lt;br /&gt;
&lt;br /&gt;
Other NEOSYS DDNS service commands are:&lt;br /&gt;
&lt;br /&gt;
 sudo service neosysddns stop&lt;br /&gt;
 sudo service neosysddns start&lt;br /&gt;
 sudo service neosysddns status&lt;br /&gt;
&lt;br /&gt;
All service commands with the exception of status show nothing if successful or error message if not.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting NEOSYS DDNS Service ==&lt;br /&gt;
&lt;br /&gt;
On nagios/monitor server to see recent ddns updates for a hostname &amp;quot;XXXX&amp;quot; whatever is entered as System ID in System configuration file.&lt;br /&gt;
&lt;br /&gt;
 journalctl|grep DDNS|grep XXXX&lt;br /&gt;
&lt;br /&gt;
or older updates&lt;br /&gt;
&lt;br /&gt;
 grep DDNS /var/log/syslog-*|grep XXXX&lt;br /&gt;
&lt;br /&gt;
or to watch new ddns updates as they come in&lt;br /&gt;
&lt;br /&gt;
 journalctl -f | grep DDNS&lt;br /&gt;
&lt;br /&gt;
or to watch new ddns updates as they come in for xxxxxxxx&lt;br /&gt;
&lt;br /&gt;
 journalctl -f | grep DDNS | grep xxxxxxxx&lt;br /&gt;
&lt;br /&gt;
Lines containing ddns.py are the result of NEOSYS Windows service.&lt;br /&gt;
&lt;br /&gt;
Lines containing apache2 are the result of nagios updates. e.g as shown below:&lt;br /&gt;
&lt;br /&gt;
 Jan 28 00:03:04 monitor apache2: DDNS IP_NO ums &amp;lt;SUCCESS CODE=&amp;quot;200&amp;quot; TEXT=&amp;quot;XXXX.hosts.neosys.com updated to 82.178.63.35&amp;quot; ZONE=&amp;quot;XXXX.hosts.neosys.com&amp;quot;&amp;gt;&lt;br /&gt;
 Jan 28 01:54:26 monitor ddns.py: DDNS IP_NO 4481 &amp;quot;ddns XXXX&amp;quot; No. 11327 was 82.178.63.35 &amp;lt;SUCCESS CODE=&amp;quot;200&amp;quot; TEXT=&amp;quot;XXXX.hosts.neosys.com updated to 85.154.7.138&amp;quot; ZONE=&amp;quot;XXXX.hosts.neosys.com&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Working/Status Files&lt;br /&gt;
&lt;br /&gt;
 ll /var/lib/neosysddns/&lt;br /&gt;
&lt;br /&gt;
Hosts that have been seen by Nagios but were ignored because the xxxxxxxx.client file was not present in /var/lib/neosysddns&lt;br /&gt;
&lt;br /&gt;
 ll /var/lib/neosysddns/ignored&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Backing_up_and_Restoring_IIS_configuration&amp;diff=2699</id>
		<title>Backing up and Restoring IIS configuration</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Backing_up_and_Restoring_IIS_configuration&amp;diff=2699"/>
		<updated>2016-05-21T20:01:32Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Backing up certificate bindings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Backing up and Restoring IIS configuration ==&lt;br /&gt;
&lt;br /&gt;
An automated backup process already exists in Windows IIS in every &lt;br /&gt;
installation but only to C: drive. This article discusses how to get it &lt;br /&gt;
backed up properly off-server by NEOSYS backup processes for servers &lt;br /&gt;
with lots of installations. Small installations hardly need backup of &lt;br /&gt;
IIS since it takes little time to reconfigure a single website.&lt;br /&gt;
&lt;br /&gt;
The main point of this article is to give an understanding of the backup &lt;br /&gt;
process and perhaps most importantly how it can be used to restore on &lt;br /&gt;
servers with large numbers of web sites like win3/win4.&lt;br /&gt;
&lt;br /&gt;
All IIS configuration performed in IIS manager seems to be backed &lt;br /&gt;
up/restored by the following procedures ... EXCEPT imported certificates &lt;br /&gt;
and the binding/mapping of port numbers to certificates which is &lt;br /&gt;
discussed later on in [[Backing up and Restoring IIS &lt;br /&gt;
configuration#Backing up certificate bindings]].&lt;br /&gt;
&lt;br /&gt;
This article does not include backup or restore of actual web site &lt;br /&gt;
directories, files and permissions.&lt;br /&gt;
&lt;br /&gt;
A simple backup of IIS configuration can be done any time and quickly at &lt;br /&gt;
before doing some change you are uncertain of in IIS.&lt;br /&gt;
&lt;br /&gt;
 c:\windows\system32\inetsrv\appcmd add backup SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
A simple restore will put everything back as it was. It appears that &lt;br /&gt;
sites unaffected by the restore are not restarted so this can be done &lt;br /&gt;
while users are online to unaffected websites. In the worst case, users &lt;br /&gt;
will have to login again but as this is a popup in the middle of &lt;br /&gt;
existing NEOSYS screens, they should not lose any work they are doing or &lt;br /&gt;
documents they are entering.&lt;br /&gt;
&lt;br /&gt;
c:\windows\system32\inetsrv\appcmd restore backup SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
Essentially the whole of IIS configuration for all sites is stored in a &lt;br /&gt;
single text file which can be edited, backed up and restored manually by &lt;br /&gt;
simple file copy, or by using the APPCMD.EXE programs which has the &lt;br /&gt;
advantage of automatically reloading IIS at the appropriate time.&lt;br /&gt;
&lt;br /&gt;
 applicationHost.config&lt;br /&gt;
&lt;br /&gt;
Windows provides a command &amp;quot;appcmd.exe&amp;quot; to manage IIS configuration from &lt;br /&gt;
the command line. All APPCMD commmands either need to be run in the &lt;br /&gt;
following directory or to be prefixed with &amp;quot;%windir%\system32\inetsrv\&amp;quot; &lt;br /&gt;
as follows:&lt;br /&gt;
&lt;br /&gt;
 c:&lt;br /&gt;
 cd %windir%\system32\inetsrv&lt;br /&gt;
 appcmd list backup&lt;br /&gt;
&lt;br /&gt;
or all in one line&lt;br /&gt;
&lt;br /&gt;
 %windir%\system32\inetsrv\appcmd list backup&lt;br /&gt;
&lt;br /&gt;
=== Set IIS automatic backup location to d: ===&lt;br /&gt;
&lt;br /&gt;
By default, Windows automatically backups the last 10 IIS configurations &lt;br /&gt;
to c:\inetpub\history, looking for changes every 2 minutes.&lt;br /&gt;
&lt;br /&gt;
Below steps are already done on win3/win4&lt;br /&gt;
&lt;br /&gt;
We need to:&lt;br /&gt;
&lt;br /&gt;
1. Change the location of the automatic backups since NEOSYS backup procedures dont backup C: drive. ESSENTIAL&lt;br /&gt;
2. Increase the number of backups. OPTIONAL&lt;br /&gt;
&lt;br /&gt;
Configure the new backup location on d: and increase the number of historical backups kept from 10 to 100&lt;br /&gt;
&lt;br /&gt;
 mkdir d:\inetpub\history&lt;br /&gt;
 c:&lt;br /&gt;
 cd %windir%\system32\inetsrv&lt;br /&gt;
 appcmd.exe set config -section:system.applicationHost/configHistory /path:&amp;quot;d:\inetpub\history&amp;quot; /commit:apphost&lt;br /&gt;
 appcmd.exe set config -section:system.applicationHost/configHistory /maxHistories:&amp;quot;100&amp;quot; /commit:apphost&lt;br /&gt;
&lt;br /&gt;
Check that automatic backups are in fact now going to D: by making some &lt;br /&gt;
trivial change in IIS and waiting 2 minutes to see the backup appear in D:&lt;br /&gt;
&lt;br /&gt;
=== Using other IIS configuration commands ===&lt;br /&gt;
&lt;br /&gt;
Other APPCMD configuration commands are as follows. Here showing setting &lt;br /&gt;
the default configuration.&lt;br /&gt;
&lt;br /&gt;
 appcmd set config -section:system.applicationHost/configHistory /enabled:&amp;quot;True&amp;quot; /commit:apphost&lt;br /&gt;
 appcmd set config -section:system.applicationHost/configHistory /period:&amp;quot;00:02:00&amp;quot; /commit:apphost&lt;br /&gt;
&lt;br /&gt;
=== Manually triggering backup of IIS ===&lt;br /&gt;
&lt;br /&gt;
 appcmd add backup SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
Manual backups are just copies of the IIS configuration file, the same &lt;br /&gt;
as the automatic backups ... but they are stored in a different place&lt;br /&gt;
&lt;br /&gt;
 C:\Windows\System32\inetsrv\backups\SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
=== Restoring IIS backups ===&lt;br /&gt;
&lt;br /&gt;
Copy the last backup directory (eg CFGHISTORY_0000000913) from d:\inetpub\history to c:\inetpub\history eg using cut and paste&lt;br /&gt;
&lt;br /&gt;
Get to the directory where the APPCMD program is stored&lt;br /&gt;
&lt;br /&gt;
 c:&lt;br /&gt;
 cd %windir%\system32\inetsrv&lt;br /&gt;
&lt;br /&gt;
List available backups and check your backup is available&lt;br /&gt;
&lt;br /&gt;
 appcmd list backup&lt;br /&gt;
&lt;br /&gt;
Perform the restore&lt;br /&gt;
&lt;br /&gt;
 appcmd restore backup CFGHISTORY_0000000913&lt;br /&gt;
&lt;br /&gt;
Note that restoring will also set the backup directory to whereever it was in the backup (ie d:\inetpub\history)&lt;br /&gt;
&lt;br /&gt;
Each backup is stored in a separate directory and you can rename them by simply changing the directory name.&lt;br /&gt;
&lt;br /&gt;
The list of available backups is a merged set from the default automatic &lt;br /&gt;
location, the configured automatic location (changed from the default C: &lt;br /&gt;
to D:), and default manual backup location&lt;br /&gt;
&lt;br /&gt;
 c:\inetpub\history (AUTOMATICALLY TRIGGERED ORIGINALY)&lt;br /&gt;
 D:\inetpub\history\ (AUTOMATICALLY TRIGGERED AFTER RECONFIGURATION)&lt;br /&gt;
 c:\windows\system32\inetsrv\backups (MANUALLY TRIGGERED)&lt;br /&gt;
&lt;br /&gt;
There is no need to restart IIS after restoring using APPCMD RESTORE but &lt;br /&gt;
you may need to press F5 to refresh in IIS manager to see results of &lt;br /&gt;
restore if restore changes anything.&lt;br /&gt;
&lt;br /&gt;
=== Manually editing IIS configuration ===&lt;br /&gt;
&lt;br /&gt;
You can edit the configuration files in any backup and then restore that &lt;br /&gt;
backup.&lt;br /&gt;
&lt;br /&gt;
This is useful in order either to make custom changes that cannot be &lt;br /&gt;
done in the UI, eg removing an https binding without affecting other &lt;br /&gt;
sites that use the same certificate, or to make mass changes that can be &lt;br /&gt;
done quicker by editing a text file than navigating a complex GUI, such &lt;br /&gt;
as removing all http site bindings.&lt;br /&gt;
&lt;br /&gt;
 applicationHost.config&lt;br /&gt;
&lt;br /&gt;
=== other IIS APPCMD config commands ===&lt;br /&gt;
&lt;br /&gt;
 c:&lt;br /&gt;
 cd %windir%\system32\inetsrv&lt;br /&gt;
 appcmd list site&lt;br /&gt;
 appcmd list site demo&lt;br /&gt;
 appcmd list config&lt;br /&gt;
&lt;br /&gt;
=== Backing up certificate bindings ===&lt;br /&gt;
&lt;br /&gt;
There is not a lot too this really but it is better that it is automated.&lt;br /&gt;
&lt;br /&gt;
To make a backup file called bindcerts.sh&lt;br /&gt;
&lt;br /&gt;
Find the hash of the current standard *.hosts.neosys.com certificate. &lt;br /&gt;
This will change only once a year or however often the https certificate &lt;br /&gt;
is renewed, probably once a year. Check the expiry date on the &lt;br /&gt;
certificate. Run the following command and pick the hash next to a port &lt;br /&gt;
you know is currently bound to the certificate. probably most or all &lt;br /&gt;
ports will be bound to the same certificate hash.&lt;br /&gt;
&lt;br /&gt;
 netsh http show sslcert|grep -B1 Hash&lt;br /&gt;
&lt;br /&gt;
Make the backup file called bindcerts.sh. put CERTHASH=.. what you found &lt;br /&gt;
in the previous step. NO SPACES OR QUOTES&lt;br /&gt;
&lt;br /&gt;
 CERTHASH=06249326271595871fd935a37bd1334bb761e519&lt;br /&gt;
&lt;br /&gt;
 netsh http show sslcert| \&lt;br /&gt;
 grep -B1 &amp;quot;$CERTHASH&amp;quot;| \&lt;br /&gt;
 grep port| \&lt;br /&gt;
 awk -v CERTHASH=&amp;quot;$CERTHASH&amp;quot; &#039;{print &amp;quot;netsh http add sslcert ipport=&amp;quot; $3 &amp;quot; certhash= &amp;quot; CERTHASH &amp;quot; appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&amp;quot;}&#039; \&lt;br /&gt;
 | tee bindcerts.sh&lt;br /&gt;
&lt;br /&gt;
The bindcerts.sh created by the above and that we will use to restore certificate binding will contain something like the following:&lt;br /&gt;
&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:443 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4432 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4433 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4436 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4437 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4439 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4440 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4441 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4449 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4451 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4453 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4454 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4460 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4461 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4462 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4463 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4465 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4466 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4469 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4470 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4471 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4472 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4473 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4474 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4475 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
&lt;br /&gt;
If you need to rebind the certificates then you need to delete them first something like the following:&lt;br /&gt;
&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:443&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:4432&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:4433&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:4436&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:4437&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:4439&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:4440&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:4441&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:4449&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:4451&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:4453&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:4454&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:4460&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:4461&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:4462&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:4463&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:4465&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:4466&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:4469&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:4470&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:4471&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:4472&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:4473&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:4474&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:4475&lt;br /&gt;
&lt;br /&gt;
=== Restoring certificate bindings ===&lt;br /&gt;
&lt;br /&gt;
Import the certificate(s) first.&lt;br /&gt;
&lt;br /&gt;
#IIS&lt;br /&gt;
#Server item&lt;br /&gt;
#Server Certificates&lt;br /&gt;
#Import&lt;br /&gt;
#Certificate File D:\hosts\CERTIFICATES\hosts.neosys.com.pfx&lt;br /&gt;
#Password 1fd...&lt;br /&gt;
#Allow to be exported. NO&lt;br /&gt;
&lt;br /&gt;
Bind the certificate to the https ports&lt;br /&gt;
&lt;br /&gt;
If you dont have the binding backup file (bindcerts.sh) then you can just redo the bindings one by one on each website without much effort anyway. This process is more to enable automated restores on warm backup servers.&lt;br /&gt;
&lt;br /&gt;
This will only ADD bindings, it will not delete, nor overwrite any existing bindings so you might have to delete bindings first to allow changes.&lt;br /&gt;
&lt;br /&gt;
Get the bindcerts.sh file from the restore stage&lt;br /&gt;
&lt;br /&gt;
Make the file executable and execute it&lt;br /&gt;
&lt;br /&gt;
 chmod +x bindcerts.sh&lt;br /&gt;
 ./bindcerts.sh&lt;br /&gt;
&lt;br /&gt;
or just cut and paste the contents of the file into a windows command console&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;SSL Certificate add failed, Error: 1312&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
 A specified logon session does not exist. &lt;br /&gt;
 It may already have been terminated.&lt;br /&gt;
&lt;br /&gt;
You didnt import the certificate first OR the HASH in export wasnt correct (doesnt match the imported certificate)&lt;br /&gt;
&lt;br /&gt;
If you get a message &amp;quot;parameter incorrect&amp;quot; then check that your hash is &lt;br /&gt;
correct and everything else is exactly correct. Check characters one by &lt;br /&gt;
one from the BACK of the sentence SLOWLY to ensure you are not suffering &lt;br /&gt;
from inattention to detail!&lt;br /&gt;
&lt;br /&gt;
 The parameter is incorrect.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;SSL Certificate add failed, Error: 183&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
 SSL Certificate add failed, Error: 183&lt;br /&gt;
 Cannot create a file when that file already exists.&lt;br /&gt;
&lt;br /&gt;
perhaps you have already bound the port to the right certificate .. or a wrong/old certificate&lt;br /&gt;
&lt;br /&gt;
... delete the binding and try again. Here is an example of deleting &lt;br /&gt;
binding on port 43999&lt;br /&gt;
&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:43999&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Backing_up_and_Restoring_IIS_configuration&amp;diff=2698</id>
		<title>Backing up and Restoring IIS configuration</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Backing_up_and_Restoring_IIS_configuration&amp;diff=2698"/>
		<updated>2016-05-21T15:36:57Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Restoring certificate bindings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Backing up and Restoring IIS configuration ==&lt;br /&gt;
&lt;br /&gt;
An automated backup process already exists in Windows IIS in every &lt;br /&gt;
installation but only to C: drive. This article discusses how to get it &lt;br /&gt;
backed up properly off-server by NEOSYS backup processes for servers &lt;br /&gt;
with lots of installations. Small installations hardly need backup of &lt;br /&gt;
IIS since it takes little time to reconfigure a single website.&lt;br /&gt;
&lt;br /&gt;
The main point of this article is to give an understanding of the backup &lt;br /&gt;
process and perhaps most importantly how it can be used to restore on &lt;br /&gt;
servers with large numbers of web sites like win3/win4.&lt;br /&gt;
&lt;br /&gt;
All IIS configuration performed in IIS manager seems to be backed &lt;br /&gt;
up/restored by the following procedures ... EXCEPT imported certificates &lt;br /&gt;
and the binding/mapping of port numbers to certificates which is &lt;br /&gt;
discussed later on in [[Backing up and Restoring IIS &lt;br /&gt;
configuration#Backing up certificate bindings]].&lt;br /&gt;
&lt;br /&gt;
This article does not include backup or restore of actual web site &lt;br /&gt;
directories, files and permissions.&lt;br /&gt;
&lt;br /&gt;
A simple backup of IIS configuration can be done any time and quickly at &lt;br /&gt;
before doing some change you are uncertain of in IIS.&lt;br /&gt;
&lt;br /&gt;
 c:\windows\system32\inetsrv\appcmd add backup SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
A simple restore will put everything back as it was. It appears that &lt;br /&gt;
sites unaffected by the restore are not restarted so this can be done &lt;br /&gt;
while users are online to unaffected websites. In the worst case, users &lt;br /&gt;
will have to login again but as this is a popup in the middle of &lt;br /&gt;
existing NEOSYS screens, they should not lose any work they are doing or &lt;br /&gt;
documents they are entering.&lt;br /&gt;
&lt;br /&gt;
c:\windows\system32\inetsrv\appcmd restore backup SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
Essentially the whole of IIS configuration for all sites is stored in a &lt;br /&gt;
single text file which can be edited, backed up and restored manually by &lt;br /&gt;
simple file copy, or by using the APPCMD.EXE programs which has the &lt;br /&gt;
advantage of automatically reloading IIS at the appropriate time.&lt;br /&gt;
&lt;br /&gt;
 applicationHost.config&lt;br /&gt;
&lt;br /&gt;
Windows provides a command &amp;quot;appcmd.exe&amp;quot; to manage IIS configuration from &lt;br /&gt;
the command line. All APPCMD commmands either need to be run in the &lt;br /&gt;
following directory or to be prefixed with &amp;quot;%windir%\system32\inetsrv\&amp;quot; &lt;br /&gt;
as follows:&lt;br /&gt;
&lt;br /&gt;
 c:&lt;br /&gt;
 cd %windir%\system32\inetsrv&lt;br /&gt;
 appcmd list backup&lt;br /&gt;
&lt;br /&gt;
or all in one line&lt;br /&gt;
&lt;br /&gt;
 %windir%\system32\inetsrv\appcmd list backup&lt;br /&gt;
&lt;br /&gt;
=== Set IIS automatic backup location to d: ===&lt;br /&gt;
&lt;br /&gt;
By default, Windows automatically backups the last 10 IIS configurations &lt;br /&gt;
to c:\inetpub\history, looking for changes every 2 minutes.&lt;br /&gt;
&lt;br /&gt;
Below steps are already done on win3/win4&lt;br /&gt;
&lt;br /&gt;
We need to:&lt;br /&gt;
&lt;br /&gt;
1. Change the location of the automatic backups since NEOSYS backup procedures dont backup C: drive. ESSENTIAL&lt;br /&gt;
2. Increase the number of backups. OPTIONAL&lt;br /&gt;
&lt;br /&gt;
Configure the new backup location on d: and increase the number of historical backups kept from 10 to 100&lt;br /&gt;
&lt;br /&gt;
 mkdir d:\inetpub\history&lt;br /&gt;
 c:&lt;br /&gt;
 cd %windir%\system32\inetsrv&lt;br /&gt;
 appcmd.exe set config -section:system.applicationHost/configHistory /path:&amp;quot;d:\inetpub\history&amp;quot; /commit:apphost&lt;br /&gt;
 appcmd.exe set config -section:system.applicationHost/configHistory /maxHistories:&amp;quot;100&amp;quot; /commit:apphost&lt;br /&gt;
&lt;br /&gt;
Check that automatic backups are in fact now going to D: by making some &lt;br /&gt;
trivial change in IIS and waiting 2 minutes to see the backup appear in D:&lt;br /&gt;
&lt;br /&gt;
=== Using other IIS configuration commands ===&lt;br /&gt;
&lt;br /&gt;
Other APPCMD configuration commands are as follows. Here showing setting &lt;br /&gt;
the default configuration.&lt;br /&gt;
&lt;br /&gt;
 appcmd set config -section:system.applicationHost/configHistory /enabled:&amp;quot;True&amp;quot; /commit:apphost&lt;br /&gt;
 appcmd set config -section:system.applicationHost/configHistory /period:&amp;quot;00:02:00&amp;quot; /commit:apphost&lt;br /&gt;
&lt;br /&gt;
=== Manually triggering backup of IIS ===&lt;br /&gt;
&lt;br /&gt;
 appcmd add backup SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
Manual backups are just copies of the IIS configuration file, the same &lt;br /&gt;
as the automatic backups ... but they are stored in a different place&lt;br /&gt;
&lt;br /&gt;
 C:\Windows\System32\inetsrv\backups\SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
=== Restoring IIS backups ===&lt;br /&gt;
&lt;br /&gt;
Copy the last backup directory (eg CFGHISTORY_0000000913) from d:\inetpub\history to c:\inetpub\history eg using cut and paste&lt;br /&gt;
&lt;br /&gt;
Get to the directory where the APPCMD program is stored&lt;br /&gt;
&lt;br /&gt;
 c:&lt;br /&gt;
 cd %windir%\system32\inetsrv&lt;br /&gt;
&lt;br /&gt;
List available backups and check your backup is available&lt;br /&gt;
&lt;br /&gt;
 appcmd list backup&lt;br /&gt;
&lt;br /&gt;
Perform the restore&lt;br /&gt;
&lt;br /&gt;
 appcmd restore backup CFGHISTORY_0000000913&lt;br /&gt;
&lt;br /&gt;
Note that restoring will also set the backup directory to whereever it was in the backup (ie d:\inetpub\history)&lt;br /&gt;
&lt;br /&gt;
Each backup is stored in a separate directory and you can rename them by simply changing the directory name.&lt;br /&gt;
&lt;br /&gt;
The list of available backups is a merged set from the default automatic &lt;br /&gt;
location, the configured automatic location (changed from the default C: &lt;br /&gt;
to D:), and default manual backup location&lt;br /&gt;
&lt;br /&gt;
 c:\inetpub\history (AUTOMATICALLY TRIGGERED ORIGINALY)&lt;br /&gt;
 D:\inetpub\history\ (AUTOMATICALLY TRIGGERED AFTER RECONFIGURATION)&lt;br /&gt;
 c:\windows\system32\inetsrv\backups (MANUALLY TRIGGERED)&lt;br /&gt;
&lt;br /&gt;
There is no need to restart IIS after restoring using APPCMD RESTORE but &lt;br /&gt;
you may need to press F5 to refresh in IIS manager to see results of &lt;br /&gt;
restore if restore changes anything.&lt;br /&gt;
&lt;br /&gt;
=== Manually editing IIS configuration ===&lt;br /&gt;
&lt;br /&gt;
You can edit the configuration files in any backup and then restore that &lt;br /&gt;
backup.&lt;br /&gt;
&lt;br /&gt;
This is useful in order either to make custom changes that cannot be &lt;br /&gt;
done in the UI, eg removing an https binding without affecting other &lt;br /&gt;
sites that use the same certificate, or to make mass changes that can be &lt;br /&gt;
done quicker by editing a text file than navigating a complex GUI, such &lt;br /&gt;
as removing all http site bindings.&lt;br /&gt;
&lt;br /&gt;
 applicationHost.config&lt;br /&gt;
&lt;br /&gt;
=== other IIS APPCMD config commands ===&lt;br /&gt;
&lt;br /&gt;
 c:&lt;br /&gt;
 cd %windir%\system32\inetsrv&lt;br /&gt;
 appcmd list site&lt;br /&gt;
 appcmd list site demo&lt;br /&gt;
 appcmd list config&lt;br /&gt;
&lt;br /&gt;
=== Backing up certificate bindings ===&lt;br /&gt;
&lt;br /&gt;
There is not a lot too this really but it is better that it is automated.&lt;br /&gt;
&lt;br /&gt;
To make a backup file called bindcerts.sh&lt;br /&gt;
&lt;br /&gt;
Find the hash of the current standard *.hosts.neosys.com certificate. &lt;br /&gt;
This will change only once a year or however often the https certificate &lt;br /&gt;
is renewed, probably once a year. Check the expiry date on the &lt;br /&gt;
certificate. Run the following command and pick the hash next to a port &lt;br /&gt;
you know is currently bound to the certificate. probably most or all &lt;br /&gt;
ports will be bound to the same certificate hash.&lt;br /&gt;
&lt;br /&gt;
 netsh http show sslcert|grep -B1 Hash&lt;br /&gt;
&lt;br /&gt;
Make the backup file called bindcerts.sh. put CERTHASH=.. what you found &lt;br /&gt;
in the previous step. NO SPACES OR QUOTES&lt;br /&gt;
&lt;br /&gt;
 CERTHASH=06249326271595871fd935a37bd1334bb761e519&lt;br /&gt;
&lt;br /&gt;
 netsh http show sslcert| \&lt;br /&gt;
 grep -B1 &amp;quot;$CERTHASH&amp;quot;| \&lt;br /&gt;
 grep port| \&lt;br /&gt;
 awk -v CERTHASH=&amp;quot;$CERTHASH&amp;quot; &#039;{print &amp;quot;netsh http add sslcert ipport=&amp;quot; $3 &amp;quot; certhash= &amp;quot; CERTHASH &amp;quot; appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&amp;quot;}&#039; \&lt;br /&gt;
 | tee bindcerts.sh&lt;br /&gt;
&lt;br /&gt;
The bindcerts.sh created by the above and that we will use to restore certificate binding will contain something like the following:&lt;br /&gt;
&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:443 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4432 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4433 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4436 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4437 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4439 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4440 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4441 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4449 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4451 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4453 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4454 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4460 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4461 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4462 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4463 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4465 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4466 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4469 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4470 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4471 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4472 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4473 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4474 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4475 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
&lt;br /&gt;
=== Restoring certificate bindings ===&lt;br /&gt;
&lt;br /&gt;
Import the certificate(s) first.&lt;br /&gt;
&lt;br /&gt;
#IIS&lt;br /&gt;
#Server item&lt;br /&gt;
#Server Certificates&lt;br /&gt;
#Import&lt;br /&gt;
#Certificate File D:\hosts\CERTIFICATES\hosts.neosys.com.pfx&lt;br /&gt;
#Password 1fd...&lt;br /&gt;
#Allow to be exported. NO&lt;br /&gt;
&lt;br /&gt;
Bind the certificate to the https ports&lt;br /&gt;
&lt;br /&gt;
If you dont have the binding backup file (bindcerts.sh) then you can just redo the bindings one by one on each website without much effort anyway. This process is more to enable automated restores on warm backup servers.&lt;br /&gt;
&lt;br /&gt;
This will only ADD bindings, it will not delete, nor overwrite any existing bindings so you might have to delete bindings first to allow changes.&lt;br /&gt;
&lt;br /&gt;
Get the bindcerts.sh file from the restore stage&lt;br /&gt;
&lt;br /&gt;
Make the file executable and execute it&lt;br /&gt;
&lt;br /&gt;
 chmod +x bindcerts.sh&lt;br /&gt;
 ./bindcerts.sh&lt;br /&gt;
&lt;br /&gt;
or just cut and paste the contents of the file into a windows command console&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;SSL Certificate add failed, Error: 1312&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
 A specified logon session does not exist. &lt;br /&gt;
 It may already have been terminated.&lt;br /&gt;
&lt;br /&gt;
You didnt import the certificate first OR the HASH in export wasnt correct (doesnt match the imported certificate)&lt;br /&gt;
&lt;br /&gt;
If you get a message &amp;quot;parameter incorrect&amp;quot; then check that your hash is &lt;br /&gt;
correct and everything else is exactly correct. Check characters one by &lt;br /&gt;
one from the BACK of the sentence SLOWLY to ensure you are not suffering &lt;br /&gt;
from inattention to detail!&lt;br /&gt;
&lt;br /&gt;
 The parameter is incorrect.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;SSL Certificate add failed, Error: 183&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
 SSL Certificate add failed, Error: 183&lt;br /&gt;
 Cannot create a file when that file already exists.&lt;br /&gt;
&lt;br /&gt;
perhaps you have already bound the port to the right certificate .. or a wrong/old certificate&lt;br /&gt;
&lt;br /&gt;
... delete the binding and try again. Here is an example of deleting &lt;br /&gt;
binding on port 43999&lt;br /&gt;
&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:43999&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Backing_up_and_Restoring_IIS_configuration&amp;diff=2697</id>
		<title>Backing up and Restoring IIS configuration</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Backing_up_and_Restoring_IIS_configuration&amp;diff=2697"/>
		<updated>2016-05-21T15:23:23Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Restoring IIS backups */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Backing up and Restoring IIS configuration ==&lt;br /&gt;
&lt;br /&gt;
An automated backup process already exists in Windows IIS in every &lt;br /&gt;
installation but only to C: drive. This article discusses how to get it &lt;br /&gt;
backed up properly off-server by NEOSYS backup processes for servers &lt;br /&gt;
with lots of installations. Small installations hardly need backup of &lt;br /&gt;
IIS since it takes little time to reconfigure a single website.&lt;br /&gt;
&lt;br /&gt;
The main point of this article is to give an understanding of the backup &lt;br /&gt;
process and perhaps most importantly how it can be used to restore on &lt;br /&gt;
servers with large numbers of web sites like win3/win4.&lt;br /&gt;
&lt;br /&gt;
All IIS configuration performed in IIS manager seems to be backed &lt;br /&gt;
up/restored by the following procedures ... EXCEPT imported certificates &lt;br /&gt;
and the binding/mapping of port numbers to certificates which is &lt;br /&gt;
discussed later on in [[Backing up and Restoring IIS &lt;br /&gt;
configuration#Backing up certificate bindings]].&lt;br /&gt;
&lt;br /&gt;
This article does not include backup or restore of actual web site &lt;br /&gt;
directories, files and permissions.&lt;br /&gt;
&lt;br /&gt;
A simple backup of IIS configuration can be done any time and quickly at &lt;br /&gt;
before doing some change you are uncertain of in IIS.&lt;br /&gt;
&lt;br /&gt;
 c:\windows\system32\inetsrv\appcmd add backup SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
A simple restore will put everything back as it was. It appears that &lt;br /&gt;
sites unaffected by the restore are not restarted so this can be done &lt;br /&gt;
while users are online to unaffected websites. In the worst case, users &lt;br /&gt;
will have to login again but as this is a popup in the middle of &lt;br /&gt;
existing NEOSYS screens, they should not lose any work they are doing or &lt;br /&gt;
documents they are entering.&lt;br /&gt;
&lt;br /&gt;
c:\windows\system32\inetsrv\appcmd restore backup SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
Essentially the whole of IIS configuration for all sites is stored in a &lt;br /&gt;
single text file which can be edited, backed up and restored manually by &lt;br /&gt;
simple file copy, or by using the APPCMD.EXE programs which has the &lt;br /&gt;
advantage of automatically reloading IIS at the appropriate time.&lt;br /&gt;
&lt;br /&gt;
 applicationHost.config&lt;br /&gt;
&lt;br /&gt;
Windows provides a command &amp;quot;appcmd.exe&amp;quot; to manage IIS configuration from &lt;br /&gt;
the command line. All APPCMD commmands either need to be run in the &lt;br /&gt;
following directory or to be prefixed with &amp;quot;%windir%\system32\inetsrv\&amp;quot; &lt;br /&gt;
as follows:&lt;br /&gt;
&lt;br /&gt;
 c:&lt;br /&gt;
 cd %windir%\system32\inetsrv&lt;br /&gt;
 appcmd list backup&lt;br /&gt;
&lt;br /&gt;
or all in one line&lt;br /&gt;
&lt;br /&gt;
 %windir%\system32\inetsrv\appcmd list backup&lt;br /&gt;
&lt;br /&gt;
=== Set IIS automatic backup location to d: ===&lt;br /&gt;
&lt;br /&gt;
By default, Windows automatically backups the last 10 IIS configurations &lt;br /&gt;
to c:\inetpub\history, looking for changes every 2 minutes.&lt;br /&gt;
&lt;br /&gt;
Below steps are already done on win3/win4&lt;br /&gt;
&lt;br /&gt;
We need to:&lt;br /&gt;
&lt;br /&gt;
1. Change the location of the automatic backups since NEOSYS backup procedures dont backup C: drive. ESSENTIAL&lt;br /&gt;
2. Increase the number of backups. OPTIONAL&lt;br /&gt;
&lt;br /&gt;
Configure the new backup location on d: and increase the number of historical backups kept from 10 to 100&lt;br /&gt;
&lt;br /&gt;
 mkdir d:\inetpub\history&lt;br /&gt;
 c:&lt;br /&gt;
 cd %windir%\system32\inetsrv&lt;br /&gt;
 appcmd.exe set config -section:system.applicationHost/configHistory /path:&amp;quot;d:\inetpub\history&amp;quot; /commit:apphost&lt;br /&gt;
 appcmd.exe set config -section:system.applicationHost/configHistory /maxHistories:&amp;quot;100&amp;quot; /commit:apphost&lt;br /&gt;
&lt;br /&gt;
Check that automatic backups are in fact now going to D: by making some &lt;br /&gt;
trivial change in IIS and waiting 2 minutes to see the backup appear in D:&lt;br /&gt;
&lt;br /&gt;
=== Using other IIS configuration commands ===&lt;br /&gt;
&lt;br /&gt;
Other APPCMD configuration commands are as follows. Here showing setting &lt;br /&gt;
the default configuration.&lt;br /&gt;
&lt;br /&gt;
 appcmd set config -section:system.applicationHost/configHistory /enabled:&amp;quot;True&amp;quot; /commit:apphost&lt;br /&gt;
 appcmd set config -section:system.applicationHost/configHistory /period:&amp;quot;00:02:00&amp;quot; /commit:apphost&lt;br /&gt;
&lt;br /&gt;
=== Manually triggering backup of IIS ===&lt;br /&gt;
&lt;br /&gt;
 appcmd add backup SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
Manual backups are just copies of the IIS configuration file, the same &lt;br /&gt;
as the automatic backups ... but they are stored in a different place&lt;br /&gt;
&lt;br /&gt;
 C:\Windows\System32\inetsrv\backups\SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
=== Restoring IIS backups ===&lt;br /&gt;
&lt;br /&gt;
Copy the last backup directory (eg CFGHISTORY_0000000913) from d:\inetpub\history to c:\inetpub\history eg using cut and paste&lt;br /&gt;
&lt;br /&gt;
Get to the directory where the APPCMD program is stored&lt;br /&gt;
&lt;br /&gt;
 c:&lt;br /&gt;
 cd %windir%\system32\inetsrv&lt;br /&gt;
&lt;br /&gt;
List available backups and check your backup is available&lt;br /&gt;
&lt;br /&gt;
 appcmd list backup&lt;br /&gt;
&lt;br /&gt;
Perform the restore&lt;br /&gt;
&lt;br /&gt;
 appcmd restore backup CFGHISTORY_0000000913&lt;br /&gt;
&lt;br /&gt;
Note that restoring will also set the backup directory to whereever it was in the backup (ie d:\inetpub\history)&lt;br /&gt;
&lt;br /&gt;
Each backup is stored in a separate directory and you can rename them by simply changing the directory name.&lt;br /&gt;
&lt;br /&gt;
The list of available backups is a merged set from the default automatic &lt;br /&gt;
location, the configured automatic location (changed from the default C: &lt;br /&gt;
to D:), and default manual backup location&lt;br /&gt;
&lt;br /&gt;
 c:\inetpub\history (AUTOMATICALLY TRIGGERED ORIGINALY)&lt;br /&gt;
 D:\inetpub\history\ (AUTOMATICALLY TRIGGERED AFTER RECONFIGURATION)&lt;br /&gt;
 c:\windows\system32\inetsrv\backups (MANUALLY TRIGGERED)&lt;br /&gt;
&lt;br /&gt;
There is no need to restart IIS after restoring using APPCMD RESTORE but &lt;br /&gt;
you may need to press F5 to refresh in IIS manager to see results of &lt;br /&gt;
restore if restore changes anything.&lt;br /&gt;
&lt;br /&gt;
=== Manually editing IIS configuration ===&lt;br /&gt;
&lt;br /&gt;
You can edit the configuration files in any backup and then restore that &lt;br /&gt;
backup.&lt;br /&gt;
&lt;br /&gt;
This is useful in order either to make custom changes that cannot be &lt;br /&gt;
done in the UI, eg removing an https binding without affecting other &lt;br /&gt;
sites that use the same certificate, or to make mass changes that can be &lt;br /&gt;
done quicker by editing a text file than navigating a complex GUI, such &lt;br /&gt;
as removing all http site bindings.&lt;br /&gt;
&lt;br /&gt;
 applicationHost.config&lt;br /&gt;
&lt;br /&gt;
=== other IIS APPCMD config commands ===&lt;br /&gt;
&lt;br /&gt;
 c:&lt;br /&gt;
 cd %windir%\system32\inetsrv&lt;br /&gt;
 appcmd list site&lt;br /&gt;
 appcmd list site demo&lt;br /&gt;
 appcmd list config&lt;br /&gt;
&lt;br /&gt;
=== Backing up certificate bindings ===&lt;br /&gt;
&lt;br /&gt;
There is not a lot too this really but it is better that it is automated.&lt;br /&gt;
&lt;br /&gt;
To make a backup file called bindcerts.sh&lt;br /&gt;
&lt;br /&gt;
Find the hash of the current standard *.hosts.neosys.com certificate. &lt;br /&gt;
This will change only once a year or however often the https certificate &lt;br /&gt;
is renewed, probably once a year. Check the expiry date on the &lt;br /&gt;
certificate. Run the following command and pick the hash next to a port &lt;br /&gt;
you know is currently bound to the certificate. probably most or all &lt;br /&gt;
ports will be bound to the same certificate hash.&lt;br /&gt;
&lt;br /&gt;
 netsh http show sslcert|grep -B1 Hash&lt;br /&gt;
&lt;br /&gt;
Make the backup file called bindcerts.sh. put CERTHASH=.. what you found &lt;br /&gt;
in the previous step. NO SPACES OR QUOTES&lt;br /&gt;
&lt;br /&gt;
 CERTHASH=06249326271595871fd935a37bd1334bb761e519&lt;br /&gt;
&lt;br /&gt;
 netsh http show sslcert| \&lt;br /&gt;
 grep -B1 &amp;quot;$CERTHASH&amp;quot;| \&lt;br /&gt;
 grep port| \&lt;br /&gt;
 awk -v CERTHASH=&amp;quot;$CERTHASH&amp;quot; &#039;{print &amp;quot;netsh http add sslcert ipport=&amp;quot; $3 &amp;quot; certhash= &amp;quot; CERTHASH &amp;quot; appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&amp;quot;}&#039; \&lt;br /&gt;
 | tee bindcerts.sh&lt;br /&gt;
&lt;br /&gt;
The bindcerts.sh created by the above and that we will use to restore certificate binding will contain something like the following:&lt;br /&gt;
&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:443 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4432 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4433 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4436 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4437 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4439 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4440 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4441 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4449 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4451 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4453 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4454 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4460 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4461 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4462 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4463 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4465 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4466 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4469 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4470 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4471 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4472 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4473 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4474 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4475 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
&lt;br /&gt;
=== Restoring certificate bindings ===&lt;br /&gt;
&lt;br /&gt;
If you dont have the backup file then you can just import the &lt;br /&gt;
certificate and redo the bindings without much effort anyway. This &lt;br /&gt;
process is more to enable automated restores on warm backup servers.&lt;br /&gt;
&lt;br /&gt;
This will only ADD bindings, it will not delete, nor overwrite any &lt;br /&gt;
existing bindings so you might have to delete bindings first to allow &lt;br /&gt;
changes.&lt;br /&gt;
&lt;br /&gt;
Get the bindcerts.sh file from the restore stage&lt;br /&gt;
&lt;br /&gt;
Make the file executable and execute it&lt;br /&gt;
&lt;br /&gt;
 chmod +x bindcerts.sh&lt;br /&gt;
 ./bindcerts.sh&lt;br /&gt;
&lt;br /&gt;
If you get a message &amp;quot;parameter incorrect&amp;quot; then check that your hash is &lt;br /&gt;
correct and everything else is exactly correct. Check characters one by &lt;br /&gt;
one from the BACK of the sentence SLOWLY to ensure you are not suffering &lt;br /&gt;
from inattention to detail!&lt;br /&gt;
&lt;br /&gt;
 The parameter is incorrect.&lt;br /&gt;
&lt;br /&gt;
If you get a message &amp;quot;already exists&amp;quot; then perhaps you have already &lt;br /&gt;
bound the port to the right certificate .. or a wrong/old certificate&lt;br /&gt;
&lt;br /&gt;
 SSL Certificate add failed, Error: 183&lt;br /&gt;
 Cannot create a file when that file already exists.&lt;br /&gt;
&lt;br /&gt;
... delete the binding and try again. Here is an example of deleting &lt;br /&gt;
binding on port 43999&lt;br /&gt;
&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:43999&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Backing_up_and_Restoring_IIS_configuration&amp;diff=2696</id>
		<title>Backing up and Restoring IIS configuration</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Backing_up_and_Restoring_IIS_configuration&amp;diff=2696"/>
		<updated>2016-05-21T14:39:09Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Backing up certificate bindings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Backing up and Restoring IIS configuration ==&lt;br /&gt;
&lt;br /&gt;
An automated backup process already exists in Windows IIS in every &lt;br /&gt;
installation but only to C: drive. This article discusses how to get it &lt;br /&gt;
backed up properly off-server by NEOSYS backup processes for servers &lt;br /&gt;
with lots of installations. Small installations hardly need backup of &lt;br /&gt;
IIS since it takes little time to reconfigure a single website.&lt;br /&gt;
&lt;br /&gt;
The main point of this article is to give an understanding of the backup &lt;br /&gt;
process and perhaps most importantly how it can be used to restore on &lt;br /&gt;
servers with large numbers of web sites like win3/win4.&lt;br /&gt;
&lt;br /&gt;
All IIS configuration performed in IIS manager seems to be backed &lt;br /&gt;
up/restored by the following procedures ... EXCEPT imported certificates &lt;br /&gt;
and the binding/mapping of port numbers to certificates which is &lt;br /&gt;
discussed later on in [[Backing up and Restoring IIS &lt;br /&gt;
configuration#Backing up certificate bindings]].&lt;br /&gt;
&lt;br /&gt;
This article does not include backup or restore of actual web site &lt;br /&gt;
directories, files and permissions.&lt;br /&gt;
&lt;br /&gt;
A simple backup of IIS configuration can be done any time and quickly at &lt;br /&gt;
before doing some change you are uncertain of in IIS.&lt;br /&gt;
&lt;br /&gt;
 c:\windows\system32\inetsrv\appcmd add backup SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
A simple restore will put everything back as it was. It appears that &lt;br /&gt;
sites unaffected by the restore are not restarted so this can be done &lt;br /&gt;
while users are online to unaffected websites. In the worst case, users &lt;br /&gt;
will have to login again but as this is a popup in the middle of &lt;br /&gt;
existing NEOSYS screens, they should not lose any work they are doing or &lt;br /&gt;
documents they are entering.&lt;br /&gt;
&lt;br /&gt;
c:\windows\system32\inetsrv\appcmd restore backup SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
Essentially the whole of IIS configuration for all sites is stored in a &lt;br /&gt;
single text file which can be edited, backed up and restored manually by &lt;br /&gt;
simple file copy, or by using the APPCMD.EXE programs which has the &lt;br /&gt;
advantage of automatically reloading IIS at the appropriate time.&lt;br /&gt;
&lt;br /&gt;
 applicationHost.config&lt;br /&gt;
&lt;br /&gt;
Windows provides a command &amp;quot;appcmd.exe&amp;quot; to manage IIS configuration from &lt;br /&gt;
the command line. All APPCMD commmands either need to be run in the &lt;br /&gt;
following directory or to be prefixed with &amp;quot;%windir%\system32\inetsrv\&amp;quot; &lt;br /&gt;
as follows:&lt;br /&gt;
&lt;br /&gt;
 c:&lt;br /&gt;
 cd %windir%\system32\inetsrv&lt;br /&gt;
 appcmd list backup&lt;br /&gt;
&lt;br /&gt;
or all in one line&lt;br /&gt;
&lt;br /&gt;
 %windir%\system32\inetsrv\appcmd list backup&lt;br /&gt;
&lt;br /&gt;
=== Set IIS automatic backup location to d: ===&lt;br /&gt;
&lt;br /&gt;
By default, Windows automatically backups the last 10 IIS configurations &lt;br /&gt;
to c:\inetpub\history, looking for changes every 2 minutes.&lt;br /&gt;
&lt;br /&gt;
Below steps are already done on win3/win4&lt;br /&gt;
&lt;br /&gt;
We need to:&lt;br /&gt;
&lt;br /&gt;
1. Change the location of the automatic backups since NEOSYS backup procedures dont backup C: drive. ESSENTIAL&lt;br /&gt;
2. Increase the number of backups. OPTIONAL&lt;br /&gt;
&lt;br /&gt;
Configure the new backup location on d: and increase the number of historical backups kept from 10 to 100&lt;br /&gt;
&lt;br /&gt;
 mkdir d:\inetpub\history&lt;br /&gt;
 c:&lt;br /&gt;
 cd %windir%\system32\inetsrv&lt;br /&gt;
 appcmd.exe set config -section:system.applicationHost/configHistory /path:&amp;quot;d:\inetpub\history&amp;quot; /commit:apphost&lt;br /&gt;
 appcmd.exe set config -section:system.applicationHost/configHistory /maxHistories:&amp;quot;100&amp;quot; /commit:apphost&lt;br /&gt;
&lt;br /&gt;
Check that automatic backups are in fact now going to D: by making some &lt;br /&gt;
trivial change in IIS and waiting 2 minutes to see the backup appear in D:&lt;br /&gt;
&lt;br /&gt;
=== Using other IIS configuration commands ===&lt;br /&gt;
&lt;br /&gt;
Other APPCMD configuration commands are as follows. Here showing setting &lt;br /&gt;
the default configuration.&lt;br /&gt;
&lt;br /&gt;
 appcmd set config -section:system.applicationHost/configHistory /enabled:&amp;quot;True&amp;quot; /commit:apphost&lt;br /&gt;
 appcmd set config -section:system.applicationHost/configHistory /period:&amp;quot;00:02:00&amp;quot; /commit:apphost&lt;br /&gt;
&lt;br /&gt;
=== Manually triggering backup of IIS ===&lt;br /&gt;
&lt;br /&gt;
 appcmd add backup SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
Manual backups are just copies of the IIS configuration file, the same &lt;br /&gt;
as the automatic backups ... but they are stored in a different place&lt;br /&gt;
&lt;br /&gt;
 C:\Windows\System32\inetsrv\backups\SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
=== Restoring IIS backups ===&lt;br /&gt;
&lt;br /&gt;
IIS backups can be listed, restored and deleted.&lt;br /&gt;
&lt;br /&gt;
 c:&lt;br /&gt;
 cd %windir%\system32\inetsrv&lt;br /&gt;
 appcmd list backup&lt;br /&gt;
 appcmd restore backup SOMEBACKUPNAME&lt;br /&gt;
 appcmd delete backup SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
Each backup is stored in a separate directory and you can rename them by &lt;br /&gt;
simply changing the directory name.&lt;br /&gt;
&lt;br /&gt;
The list of available backups is a merged set from the default automatic &lt;br /&gt;
location, the configured automatic location (changed from the default C: &lt;br /&gt;
to D:), and default manual backup location&lt;br /&gt;
&lt;br /&gt;
 c:\inetpub\history (AUTOMATICALLY TRIGGERED ORIGINALY)&lt;br /&gt;
 D:\inetpub\history\ (AUTOMATICALLY TRIGGERED AFTER RECONFIGURATION)&lt;br /&gt;
 c:\windows\system32\inetsrv\backups (MANUALLY TRIGGERED)&lt;br /&gt;
&lt;br /&gt;
There is no need to restart IIS after restoring using APPCMD RESTORE but &lt;br /&gt;
you may need to press F5 to refresh in IIS manager to see results of &lt;br /&gt;
restore if restore changes anything.&lt;br /&gt;
&lt;br /&gt;
=== Manually editing IIS configuration ===&lt;br /&gt;
&lt;br /&gt;
You can edit the configuration files in any backup and then restore that &lt;br /&gt;
backup.&lt;br /&gt;
&lt;br /&gt;
This is useful in order either to make custom changes that cannot be &lt;br /&gt;
done in the UI, eg removing an https binding without affecting other &lt;br /&gt;
sites that use the same certificate, or to make mass changes that can be &lt;br /&gt;
done quicker by editing a text file than navigating a complex GUI, such &lt;br /&gt;
as removing all http site bindings.&lt;br /&gt;
&lt;br /&gt;
 applicationHost.config&lt;br /&gt;
&lt;br /&gt;
=== other IIS APPCMD config commands ===&lt;br /&gt;
&lt;br /&gt;
 c:&lt;br /&gt;
 cd %windir%\system32\inetsrv&lt;br /&gt;
 appcmd list site&lt;br /&gt;
 appcmd list site demo&lt;br /&gt;
 appcmd list config&lt;br /&gt;
&lt;br /&gt;
=== Backing up certificate bindings ===&lt;br /&gt;
&lt;br /&gt;
There is not a lot too this really but it is better that it is automated.&lt;br /&gt;
&lt;br /&gt;
To make a backup file called bindcerts.sh&lt;br /&gt;
&lt;br /&gt;
Find the hash of the current standard *.hosts.neosys.com certificate. &lt;br /&gt;
This will change only once a year or however often the https certificate &lt;br /&gt;
is renewed, probably once a year. Check the expiry date on the &lt;br /&gt;
certificate. Run the following command and pick the hash next to a port &lt;br /&gt;
you know is currently bound to the certificate. probably most or all &lt;br /&gt;
ports will be bound to the same certificate hash.&lt;br /&gt;
&lt;br /&gt;
 netsh http show sslcert|grep -B1 Hash&lt;br /&gt;
&lt;br /&gt;
Make the backup file called bindcerts.sh. put CERTHASH=.. what you found &lt;br /&gt;
in the previous step. NO SPACES OR QUOTES&lt;br /&gt;
&lt;br /&gt;
 CERTHASH=06249326271595871fd935a37bd1334bb761e519&lt;br /&gt;
&lt;br /&gt;
 netsh http show sslcert| \&lt;br /&gt;
 grep -B1 &amp;quot;$CERTHASH&amp;quot;| \&lt;br /&gt;
 grep port| \&lt;br /&gt;
 awk -v CERTHASH=&amp;quot;$CERTHASH&amp;quot; &#039;{print &amp;quot;netsh http add sslcert ipport=&amp;quot; $3 &amp;quot; certhash= &amp;quot; CERTHASH &amp;quot; appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&amp;quot;}&#039; \&lt;br /&gt;
 | tee bindcerts.sh&lt;br /&gt;
&lt;br /&gt;
The bindcerts.sh created by the above and that we will use to restore certificate binding will contain something like the following:&lt;br /&gt;
&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:443 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4432 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4433 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4436 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4437 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4439 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4440 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4441 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4449 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4451 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4453 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4454 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4460 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4461 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4462 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4463 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4465 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4466 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4469 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4470 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4471 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4472 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4473 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4474 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
 netsh http add sslcert ipport=0.0.0.0:4475 certhash= 06249326271595871fd935a37bd1334bb761e519 appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&lt;br /&gt;
&lt;br /&gt;
=== Restoring certificate bindings ===&lt;br /&gt;
&lt;br /&gt;
If you dont have the backup file then you can just import the &lt;br /&gt;
certificate and redo the bindings without much effort anyway. This &lt;br /&gt;
process is more to enable automated restores on warm backup servers.&lt;br /&gt;
&lt;br /&gt;
This will only ADD bindings, it will not delete, nor overwrite any &lt;br /&gt;
existing bindings so you might have to delete bindings first to allow &lt;br /&gt;
changes.&lt;br /&gt;
&lt;br /&gt;
Get the bindcerts.sh file from the restore stage&lt;br /&gt;
&lt;br /&gt;
Make the file executable and execute it&lt;br /&gt;
&lt;br /&gt;
 chmod +x bindcerts.sh&lt;br /&gt;
 ./bindcerts.sh&lt;br /&gt;
&lt;br /&gt;
If you get a message &amp;quot;parameter incorrect&amp;quot; then check that your hash is &lt;br /&gt;
correct and everything else is exactly correct. Check characters one by &lt;br /&gt;
one from the BACK of the sentence SLOWLY to ensure you are not suffering &lt;br /&gt;
from inattention to detail!&lt;br /&gt;
&lt;br /&gt;
 The parameter is incorrect.&lt;br /&gt;
&lt;br /&gt;
If you get a message &amp;quot;already exists&amp;quot; then perhaps you have already &lt;br /&gt;
bound the port to the right certificate .. or a wrong/old certificate&lt;br /&gt;
&lt;br /&gt;
 SSL Certificate add failed, Error: 183&lt;br /&gt;
 Cannot create a file when that file already exists.&lt;br /&gt;
&lt;br /&gt;
... delete the binding and try again. Here is an example of deleting &lt;br /&gt;
binding on port 43999&lt;br /&gt;
&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:43999&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Configuring_IIS&amp;diff=2695</id>
		<title>Configuring IIS</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Configuring_IIS&amp;diff=2695"/>
		<updated>2016-05-21T14:32:32Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* What is Asymmetric cryptography? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;After you have installed all the NEOSYS program files you need to configure IIS so that you can operate NEOSYS. Instructions are below.&lt;br /&gt;
&lt;br /&gt;
== Configuring IIS for windows 2003 ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a new website in IIS ===&lt;br /&gt;
&lt;br /&gt;
First step is to stop the default website in IIS. Right click on Default Web Site and select &amp;quot;Stop&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Create a website called neosys linked to D:\neosys\neosys.net:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3 Server:&#039;&#039;&#039; Create a website called &amp;quot;clientname&amp;quot; linked to D:\hosts\clientfolder\neosys.net &lt;br /&gt;
&lt;br /&gt;
[[image:figure1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[image:figure3.jpg]]&lt;br /&gt;
&lt;br /&gt;
A new window will pop up &amp;quot;IP Address and Port Setting&amp;quot; after completion of the above step.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039;  Select *(All Unassigned)* from the drop down list of &amp;quot;Enter the IP address to use for the Web site&amp;quot; and keep the default port as 80. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3 Server:&#039;&#039;&#039; Select the static Ip from the drop down list of &amp;quot;Enter the IP address to use for the Web site&amp;quot; and enter then next port available and click on next.&lt;br /&gt;
&lt;br /&gt;
[[image:Figure_2.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Within the above neosys web site folder create a virtual directory called data linked to D:\neosys\data: &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3 Server:&#039;&#039;&#039; Within the above clientwebsite folder create a virtual directory called data linked to D:\hosts\clientfolder\data:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;(I haven’t got the screenshot because I can only get it once I create the above)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== To allow file uploads ===&lt;br /&gt;
&lt;br /&gt;
==== Create IMAGES directory ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client server:&#039;&#039;&#039; create a folder IMAGES under D:\neosys and within the neosys web site folder create a virtual directory called images linked to D:\neosys\images: Modes: READ and WRITE&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3 Server:&#039;&#039;&#039; create a folder IMAGES under D:\hosts\clientfolder and within the client web site folder create a virtual directory called images linked to D:\hosts\clientfolder\images: Modes: READ and WRITE&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;(I haven’t got the screenshot because I can only get it once I create the above)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Permit upload.dll ====&lt;br /&gt;
&lt;br /&gt;
# Right click on dll ( Default Web Site, neosys, NEOSYS, dll) &lt;br /&gt;
# Under Permissions set Execute Permissions: Scripts and Executables&lt;br /&gt;
&lt;br /&gt;
# Internet Information Services (IIS) Manager&lt;br /&gt;
# Web Service Extensions&lt;br /&gt;
# All Unknown ISAPI Extensions: Allowed&lt;br /&gt;
&lt;br /&gt;
===[[Backing_up_and_Restoring_IIS_configuration#Set_IIS_automatic_backup_location_to_d:| Set IIS automatic backup location to D:]] ===&lt;br /&gt;
&lt;br /&gt;
== Configuring IIS for Windows 2008 ==&lt;br /&gt;
&lt;br /&gt;
=== Installing IIS ===&lt;br /&gt;
&lt;br /&gt;
First install IIS from Control Panel &amp;gt; Programs &amp;amp; Features &amp;gt; Turn Windows Features ON or OFF &amp;gt; Add Roles:&lt;br /&gt;
&lt;br /&gt;
[[image:iis1.jpg]]&lt;br /&gt;
&lt;br /&gt;
On the window that pops up click on next and you will get this screen, tick Web Server (IIS) - on the prompt click on Add Required Resources and then on Next:&lt;br /&gt;
&lt;br /&gt;
[[image:iis2.jpg]]&lt;br /&gt;
&lt;br /&gt;
On the next window, click on next until you get this window - tick ASP and ISAPI Extensions:&lt;br /&gt;
&lt;br /&gt;
[[image:iis3.jpg]]&lt;br /&gt;
&lt;br /&gt;
Click on Next and Finish&lt;br /&gt;
&lt;br /&gt;
=== Configuring IIS ===&lt;br /&gt;
====Create a new Website====&lt;br /&gt;
After successfully installing IIS, go to Control Panel &amp;gt; Administrative Tools &amp;gt; Computer Management &amp;gt; Services and Applications &amp;gt; Internet Information Services (IIS) &amp;gt; Machine Name &amp;gt; Sites &amp;gt; Default Website. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Stop the Default Website and then right click on Sites folder and click on Add Website called &#039;&#039;&#039;neosys&#039;&#039;&#039; linked to {{Client server Installation Location}}neosys.net as shown in the screenshot below&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; Right click on Sites folder and click on Add Website. Create a website called &amp;quot;clientname&amp;quot; linked to {{NEOSYS server Installation Location}}neosys.net; &lt;br /&gt;
Since win3 is not connected to any LAN and exclusively serves https only, therefore setup a https binding only with a port number which is unique, unused and one greater than the previous port used in the series which is 4431 onwards. The highest port number used in this series can be found by checking IIS manager -&amp;gt; NEOSYS -&amp;gt;Sites.&lt;br /&gt;
&lt;br /&gt;
Refer to [[Setting_up_HTTPS#Creating_multiple_HTTPS_web_sites_on_NEOSYS_hosted_server| setting up the https for a site on NEOSYS hosted server]] for details.&lt;br /&gt;
&lt;br /&gt;
[[image:iis4.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Link Data Folder====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Within the neosys website folder create a virtual directory called &#039;&#039;&#039;data&#039;&#039;&#039; linked to {{Client server Installation Location}}data&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; Within the &amp;quot;clientname&amp;quot; website folder create a virtual directory called &#039;&#039;&#039;data&#039;&#039;&#039; linked to {{NEOSYS server Installation Location}}data &lt;br /&gt;
&lt;br /&gt;
[[image:iis5.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Allow file uploads====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; create a folder &#039;&#039;&#039;images&#039;&#039;&#039; under D:\neosys and within the neosys web site folder create a virtual directory called &#039;&#039;&#039;images&#039;&#039;&#039; linked to {{Client server Installation Location}}images&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; create a folder &#039;&#039;&#039;images&#039;&#039;&#039; under D:\hosts\clientfolder and within the &amp;quot;clientname&amp;quot; website folder create a virtual directory called &#039;&#039;&#039;images&#039;&#039;&#039; linked to {{NEOSYS server Installation Location}}images&lt;br /&gt;
&lt;br /&gt;
[[image:iis7.jpg]]&lt;br /&gt;
&lt;br /&gt;
After you add all virtual directories the tree map of the Default Website should look as follows:&lt;br /&gt;
&lt;br /&gt;
[[image:iis8.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Configure file uploads besides adding the images directory====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;For single site servers&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go under IIS &amp;gt; Default Website &amp;gt; neosys&lt;br /&gt;
&lt;br /&gt;
Click on Handler Mappings and delete the ISAPI you see there&lt;br /&gt;
&lt;br /&gt;
[[image:iis9a.jpg]]&lt;br /&gt;
&lt;br /&gt;
Thereafter click on Add Script Map and fill in the details as follows – &lt;br /&gt;
&lt;br /&gt;
Request path: *.dll &lt;br /&gt;
&lt;br /&gt;
Executable: {{Client server Installation Location}}neosys.net\NEOSYS\dll\upload.dll&lt;br /&gt;
&lt;br /&gt;
Name: ISAPI &lt;br /&gt;
&lt;br /&gt;
Click on OK and on YES in the confirmation box&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:iis9b.jpg]]&lt;br /&gt;
[[image:hm.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;For multiple site servers&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go under IIS&amp;gt;NEOSYS&amp;gt;Click on Handler Mappings &amp;gt; Edit Feature Permissions &amp;gt; Select Read, Script and Execute &lt;br /&gt;
&lt;br /&gt;
For WIN3 the above setting is already setup&lt;br /&gt;
&lt;br /&gt;
===Editing the hosts file===&lt;br /&gt;
Edit the hosts file under c:\windows\system32\drivers\etc\ - delete the # sign next to 127.0.0.1 localhost and include the # sign before ::1 localhost&lt;br /&gt;
&lt;br /&gt;
[[image:iis10.jpg]]&lt;br /&gt;
&lt;br /&gt;
===[[Backing_up_and_Restoring_IIS_configuration#Set_IIS_automatic_backup_location_to_d:| Set IIS automatic backup location to D:]] ===&lt;br /&gt;
&lt;br /&gt;
== Solving IIS errors ==&lt;br /&gt;
&lt;br /&gt;
=== Solving error during file upload: &amp;quot;Page cannot be displayed&amp;quot; HTTP Error 405 in windows 2003 ===&lt;br /&gt;
&lt;br /&gt;
This error should not occur in normal NEOSYS installations but the solution is as follows:&lt;br /&gt;
&lt;br /&gt;
# Go to Control Panel, Administrative Tools, Internet Information Services&lt;br /&gt;
# Expand the tree to COMPUTERNAME, Web Sites&lt;br /&gt;
# Right-click &amp;quot;Default Web Site&amp;quot; (or specific Web Site if multiple NEOSYS http/https installations on the server as per WIN3)&lt;br /&gt;
# Properties&lt;br /&gt;
# Home Directory&lt;br /&gt;
# Configuration&lt;br /&gt;
# Mappings, Add&lt;br /&gt;
# Browse&lt;br /&gt;
# Dynamic Link Libraries *.dll&amp;quot; from the &amp;quot;Files of Type&amp;quot; dropdown&lt;br /&gt;
# Find and select D:\NEOSYS\neosys.net\NEOSYS\dll\upload.dll (OR upload.dll in the installation directory)&lt;br /&gt;
# Extension Type: dll&lt;br /&gt;
# Limit to: All&lt;br /&gt;
# Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;HTTP Error 503. The service is unavailable.&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
Look in event log for errors saying various dlls have failed to load eg&lt;br /&gt;
&lt;br /&gt;
 The Module DLL C:\Windows\System32\inetsrv\authsspi.dll failed to load.  The data is the error.&lt;br /&gt;
&lt;br /&gt;
These errors indicate that IIS is configured to use various modules that have not been installed, possibly due to restoration of IIS configuration backups which mention them but the restore program restores the configuration but does not install the dll. They may not even be required, but how to exclude them is not solved in this article.&lt;br /&gt;
&lt;br /&gt;
Solution is to install the various required modules by right clicking IIS role and choosing Add Role Service&lt;br /&gt;
&lt;br /&gt;
*inetsrv\filter.dll - ISAPI Filters&lt;br /&gt;
*validcfg.dll - .NET Extensibility?&lt;br /&gt;
*iis_ssi.dll - Server Side Includes&lt;br /&gt;
*authsspi.dll - Windows Authentication&lt;br /&gt;
&lt;br /&gt;
=== Solving HTTP Error 404 Error occurring immediately on opening NEOSYS login page on a new server installation: &amp;quot;System Failure. Do you want to retry?&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This error message is caused by failing to enable Active Server Pages in the IIS configuration. To resolve this in windows 2008, [[Configuring_IIS#Configure_file_uploads_besides_adding_the_images_directory| ensure that Read, Script, Execute is ticked (enabled) in the feature permissions of these Handler Mappings.]]&lt;br /&gt;
&lt;br /&gt;
This message is from IE8 and a Windows 2003 server. The message may be different for other browser versions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Message from web page.&lt;br /&gt;
&lt;br /&gt;
System Failure. Do you want to retry?&lt;br /&gt;
&lt;br /&gt;
The page cannot be found&lt;br /&gt;
The page you are looking for might have been removed, had its name change, or it temporarily unavailable.&lt;br /&gt;
&lt;br /&gt;
Please try the following:&lt;br /&gt;
(omitted)&lt;br /&gt;
HTTP Error 404 - File or directory not found.&lt;br /&gt;
Internet Information Services (IIS)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[image:http404.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Solving HTTP 404 Webpage cannot be found ===&lt;br /&gt;
&lt;br /&gt;
This error message clearly states that the page cannot be found. Check for the requested page in the client website folder under the virtual directory data. This page will be available under the data folder in D:\neosys\data. A possible cause of this error is by failing to create a virtual directory called data linked to D:\neosys\data:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:http404p.jpg]]&lt;br /&gt;
===Solving Error &amp;quot;The specified Executable does not exist on the server&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
While adding Script Map in Handler Mappings in the above step, if you get the below error, this means you have not yet run the Maintenance window/ NEOSYS processes and skipped steps in Installing NEOSYS. File upload.dl_ is installed from NEOSYS.EXE or NEOSYS2.EXE and converted to .dll the first time you run NEOSYS Maintenance/Process. You can also manually rename the file to upload.dll. &lt;br /&gt;
&lt;br /&gt;
[[image:Dll_error.png]]&lt;br /&gt;
&lt;br /&gt;
=== Solving IIS error 500 on uploading for windows 2008===&lt;br /&gt;
&lt;br /&gt;
To test if permissions are the problem, in grant full control to IUSR over the whole client directory e.g d:\neosys or d:\hosts\clientx in security tab of windows explorer and see if you can upload.&lt;br /&gt;
&lt;br /&gt;
Regardless of the result, remove the full control permissions since they are a security risk.&lt;br /&gt;
&lt;br /&gt;
If permissions are the problem then grant specific permissions as follows:&lt;br /&gt;
&lt;br /&gt;
#images folder - read and write permissions (but not execute)&lt;br /&gt;
#dll folder - read and execute permission (no write permission)&lt;br /&gt;
&lt;br /&gt;
=== Solving error &amp;quot;Upload folder cannot be created.The system cannot find the drive specified&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This error message comes up when the file uploads are configured to a different location in the software than what is set up in IIS.&lt;br /&gt;
&lt;br /&gt;
There is an internal system configuration in line 49 of the DOS SYSTEM.CFG file which mentions the upload folder location (normally blank which means xxxxxx\images\ where xxxxxx is the installation directory e.g d:\neosys)&lt;br /&gt;
&lt;br /&gt;
In installations where the images are uploaded to a place other than the installation directory, the configuration may say something like h:\images\ where h represents the drive where the folder is located e.g on an external USB drive. This may be done in case of client installations where file uploads are configured on USB drives due to a huge number of files getting uploaded.&lt;br /&gt;
&lt;br /&gt;
The IIS and internal system configuration must agree, otherwise users will probably not be able to upload files, or the uploaded files may not be saved in the right place and may be lost, not backed up and/or not viewable.&lt;br /&gt;
&lt;br /&gt;
To fix this issue, you MUST link the &#039;&#039;&#039;images&#039;&#039;&#039; folder in IIS to xxxxxx\images\ where xxxxxx is the directory of the images folder as shown in the error message.&lt;br /&gt;
&lt;br /&gt;
[[File:Uploaderror.png]]&lt;br /&gt;
&lt;br /&gt;
== Disabling unsecure SSL3 protocol on Windows IIS web server ==&lt;br /&gt;
&lt;br /&gt;
POODLE is an information leakage attack on client browsers while accessing web server that support the older SSL3 protocol. It is easy to prevent it by reconfiguring web servers to not support SSL3.&lt;br /&gt;
&lt;br /&gt;
=== Securing IIS web server on win2003 and 2008 by disabling unsafe SSL3 protocol ===&lt;br /&gt;
&lt;br /&gt;
#For Systems with https installed check if the web server is vulnerable (see [[Configuring_IIS#Testing_for_IIS_vulnerability| Testing for IIS vulnerability]] ). For systems with no https installed,continue to step2 to prevent SSL3 accidentally being enabled if https is installed in the server in future and then test for vulnerability.&lt;br /&gt;
# run the following commands on the server&lt;br /&gt;
#reg add &amp;quot;HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Server&amp;quot;  /t REG_DWORD  /v Enabled  /d 0 /f&lt;br /&gt;
#reg add &amp;quot;HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server&amp;quot;  /t REG_DWORD  /v Enabled  /d 0 /f&lt;br /&gt;
#reg add &amp;quot;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 40/128&amp;quot;  /t REG_DWORD  /v Enabled  /d 0 /f&lt;br /&gt;
#reg add &amp;quot;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 56/128&amp;quot;  /t REG_DWORD  /v Enabled  /d 0 /f&lt;br /&gt;
#reg add &amp;quot;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 64/128&amp;quot;  /t REG_DWORD  /v Enabled  /d 0 /f&lt;br /&gt;
#reg add &amp;quot;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 128/128&amp;quot;  /t REG_DWORD  /v Enabled  /d 0 /f&lt;br /&gt;
#Reboot the server (at any time later using standard NEOSYS rebooting procedure without disturbing users)&lt;br /&gt;
#Perform the diagnostic for vulnerability&lt;br /&gt;
&lt;br /&gt;
=== Testing for IIS vulnerability ===&lt;br /&gt;
==== A. Determine host and port and where to test from ==== &lt;br /&gt;
If you have a public https server that you can access like https://demo.neosys.com:443, in a linux command prompt eg nagios login:&lt;br /&gt;
&lt;br /&gt;
*$HOST for host name like demo.neosys.com&lt;br /&gt;
*$PORT with something like 443 or 4430 depending on port forwarding on the public router&lt;br /&gt;
&lt;br /&gt;
or if testing a private https server with no public access, using a cygwin installation on the same server in the cygwin prompt:&lt;br /&gt;
&lt;br /&gt;
*$HOST for host name like 127.0.0.1&lt;br /&gt;
*$PORT with something like 443 or 4430 as per IIS manager configuration&lt;br /&gt;
&lt;br /&gt;
If https is enabled on the server/website and you are able to access the website via https using a browser, then you must be able to test for openssl on the same browsed host and port. You must also test this locally to ensure that the right server is being fixed. If the website is not public, then https must not be enabled, which means there is no reason for using cygwin openssl.&lt;br /&gt;
&lt;br /&gt;
==== B. Check you CAN connect to https server using TLS ====&lt;br /&gt;
&lt;br /&gt;
 openssl s_client -host $HOST -port $PORT&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nagios@vm1m:~$ echo|openssl s_client -host demo.neosys.com -port 443&lt;br /&gt;
CONNECTED(00000003)&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=20:unable to get local issuer certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=21:unable to verify the first certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
---&lt;br /&gt;
Certificate chain&lt;br /&gt;
 0 s:/CN=demo.neosys.com&lt;br /&gt;
   i:/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
Server certificate&lt;br /&gt;
-----BEGIN CERTIFICATE-----&lt;br /&gt;
MIIB2DCCAUWgAwIBAgIQd0J0l4kJrpJHonAv5U8VLjAJBgUrDgMCHQUAMBoxGDAW&lt;br /&gt;
BgNVBAMTD2RlbW8ubmVvc3lzLmNvbTAeFw0wODA3MjcxOTUxMDNaFw0zNTEyMTIx&lt;br /&gt;
OTUxMDNaMBoxGDAWBgNVBAMTD2RlbW8ubmVvc3lzLmNvbTCBnzANBgkqhkiG9w0B&lt;br /&gt;
AQEFAAOBjQAwgYkCgYEAxzwtoqq49vV7pyBQ6Ej+PvbB1QxkdsxNn5EZSLSOppCb&lt;br /&gt;
jNjV8fFa98unPR0pGM0UdjWMUYodj12c2pnIrfrtXv7pYf+iC1corPEY7607Icbs&lt;br /&gt;
rSOc5aFwnlUYpktoysV1G1crGYgYgXbXgVOUO9phHXJarpKf6SjVw3uXTLlmPUkC&lt;br /&gt;
AwEAAaMnMCUwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDgYDVR0PBAcDBQCwAAAAMAkG&lt;br /&gt;
BSsOAwIdBQADgYEAmgyW60pT62JuM8GH+KogHW7viaMsifXitm3BC/GfaORpJCox&lt;br /&gt;
aS20fAlzGyAlDe9nZWN4roLSxQv0laJkxyNPDuHvLJt1l0FVdk6/vGB6QH0KqM+S&lt;br /&gt;
UaUTLsDZ99UNS/inotobxD9vXuKl58Uoe2lu7r9vJ+1DWDC6AyueSZ6xnno=&lt;br /&gt;
-----END CERTIFICATE-----&lt;br /&gt;
subject=/CN=demo.neosys.com&lt;br /&gt;
issuer=/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
No client certificate CA names sent&lt;br /&gt;
---&lt;br /&gt;
SSL handshake has read 635 bytes and written 411 bytes&lt;br /&gt;
---&lt;br /&gt;
New, TLSv1/SSLv3, Cipher is AES128-SHA&lt;br /&gt;
Server public key is 1024 bit&lt;br /&gt;
Secure Renegotiation IS supported&lt;br /&gt;
Compression: NONE&lt;br /&gt;
Expansion: NONE&lt;br /&gt;
SSL-Session:&lt;br /&gt;
    Protocol  : TLSv1&lt;br /&gt;
    Cipher    : AES128-SHA&lt;br /&gt;
    Session-ID: 8A0A00002D51DE183AC2845C6B3FF4BC7485181B4DCBC1758E3A2D5399BDD71C&lt;br /&gt;
    Session-ID-ctx:&lt;br /&gt;
    Master-Key: B10B9370E4DF70E873873AB9851B3CEF19623E6ADA697955E375D931DEE8301D798B4CB14C8D33FCF1BA066C0CC23897&lt;br /&gt;
    Key-Arg   : None&lt;br /&gt;
    PSK identity: None&lt;br /&gt;
    PSK identity hint: None&lt;br /&gt;
    SRP username: None&lt;br /&gt;
    Start Time: 1413885416&lt;br /&gt;
    Timeout   : 300 (sec)&lt;br /&gt;
    Verify return code: 21 (unable to verify the first certificate)&lt;br /&gt;
---&lt;br /&gt;
DONE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== C. Check that you cannot CANNOT to https server using SSL3 ====&lt;br /&gt;
&lt;br /&gt;
 openssl s_client -ssl3 -host $HOST -port $PORT&lt;br /&gt;
&lt;br /&gt;
==== CAN CONNECT = VULNERABLE = NOT OK ====&lt;br /&gt;
&lt;br /&gt;
If you get this then you need to configure the server to prevent SSL3&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nagios@vm1m:~$ echo xxx|openssl s_client -ssl3 -host demo.neosys.com -port 4430&lt;br /&gt;
gethostbyname failure&lt;br /&gt;
connect:errno=0&lt;br /&gt;
nagios@vm1m:~$ echo xxx|openssl s_client -ssl3 -host demo.neosys.com -port 4430&lt;br /&gt;
CONNECTED(00000003)&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=20:unable to get local issuer certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=21:unable to verify the first certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
---&lt;br /&gt;
Certificate chain&lt;br /&gt;
 0 s:/CN=demo.neosys.com&lt;br /&gt;
   i:/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
Server certificate&lt;br /&gt;
-----BEGIN CERTIFICATE-----&lt;br /&gt;
MIIB3jCCAUugAwIBAgIQNj9FMjT1vIxGo2Mv2Ta9vzAJBgUrDgMCHQUAMB0xGzAZ&lt;br /&gt;
BgNVBAMTEmFkbGluZWQubmVvc3lzLmNvbTAeFw0wODAzMjUxMTIxMzFaFw0zNTA4&lt;br /&gt;
MTAxMTIxMzFaMB0xGzAZBgNVBAMTEmFkbGluZWQubmVvc3lzLmNvbTCBnzANBgkq&lt;br /&gt;
hkiG9w0BAQEFAAOBjQAwgYkCgYEArRuijA8jz3qBm2ZZEwITIJLWIMlQmZxcUvOo&lt;br /&gt;
HNZL0+3oJuX0AQqtpRZMp/7ob9agngfwJQ36vK+424zcBbmKxA2MweKZRalN2jz+&lt;br /&gt;
rdr1oeZ6/Ff3r8+rCPFj/B8CfMOQbSv6YcR0kVc+8ugybB7qT6Nq5ZWOAczG3Ikt&lt;br /&gt;
4EnOlqUCAwEAAaMnMCUwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDgYDVR0PBAcDBQCw&lt;br /&gt;
AAAAMAkGBSsOAwIdBQADgYEAHIq5Gn2LiMgXFaUYrFEfHeajD4jAwdFw+zrjcBDZ&lt;br /&gt;
qM9LnhndHhdPogow9m9cCv1n57ne9rZL1v7w7Y6C53359hTUVZFqtHFfzcWnNyKD&lt;br /&gt;
uHD9a8QDk6/dSwBr/SWIE6OdFUYAj/kDXRQNB5H459spRVa3Yws8vpwrWZhoklxq&lt;br /&gt;
CQg=&lt;br /&gt;
-----END CERTIFICATE-----&lt;br /&gt;
subject=/CN=demo.neosys.com&lt;br /&gt;
issuer=/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
No client certificate CA names sent&lt;br /&gt;
---&lt;br /&gt;
SSL handshake has read 649 bytes and written 342 bytes&lt;br /&gt;
---&lt;br /&gt;
New, TLSv1/SSLv3, Cipher is RC4-MD5&lt;br /&gt;
Server public key is 1024 bit&lt;br /&gt;
Secure Renegotiation IS supported&lt;br /&gt;
Compression: NONE&lt;br /&gt;
Expansion: NONE&lt;br /&gt;
SSL-Session:&lt;br /&gt;
    Protocol  : SSLv3&lt;br /&gt;
    Cipher    : RC4-MD5&lt;br /&gt;
    Session-ID: 441A0000EBC1D634B2CDB12924F9B980D2A4CF8C4DD6D3FB9728D3C74F62A8FE&lt;br /&gt;
    Session-ID-ctx:&lt;br /&gt;
    Master-Key: 38F040BE3E7098857B7CB9FF3B44937786F8F8C002B0042370B29F20EFB582833F9E24CFC8E6560AFD06751DC93412D3&lt;br /&gt;
    Key-Arg   : None&lt;br /&gt;
    PSK identity: None&lt;br /&gt;
    PSK identity hint: None&lt;br /&gt;
    SRP username: None&lt;br /&gt;
    Start Time: 1413885545&lt;br /&gt;
    Timeout   : 7200 (sec)&lt;br /&gt;
    Verify return code: 21 (unable to verify the first certificate)&lt;br /&gt;
---&lt;br /&gt;
DONE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== CANNOT CONNECT = NOT VULNERABLE = OK ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nagios@vm1m:~$ echo|openssl s_client -ssl3 -host demo.neosys.com -port 443&lt;br /&gt;
CONNECTED(00000003)&lt;br /&gt;
write:errno=104&lt;br /&gt;
---&lt;br /&gt;
no peer certificate available&lt;br /&gt;
---&lt;br /&gt;
No client certificate CA names sent&lt;br /&gt;
---&lt;br /&gt;
SSL handshake has read 0 bytes and written 0 bytes&lt;br /&gt;
---&lt;br /&gt;
New, (NONE), Cipher is (NONE)&lt;br /&gt;
Secure Renegotiation IS NOT supported&lt;br /&gt;
Compression: NONE&lt;br /&gt;
Expansion: NONE&lt;br /&gt;
SSL-Session:&lt;br /&gt;
    Protocol  : SSLv3&lt;br /&gt;
    Cipher    : 0000&lt;br /&gt;
    Session-ID:&lt;br /&gt;
    Session-ID-ctx:&lt;br /&gt;
    Master-Key:&lt;br /&gt;
    Key-Arg   : None&lt;br /&gt;
    PSK identity: None&lt;br /&gt;
    PSK identity hint: None&lt;br /&gt;
    SRP username: None&lt;br /&gt;
    Start Time: 1413885702&lt;br /&gt;
    Timeout   : 7200 (sec)&lt;br /&gt;
    Verify return code: 0 (ok)&lt;br /&gt;
---&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enabling Internet Explorer 6 to access secured https web servers ===&lt;br /&gt;
&lt;br /&gt;
To use Internet explorer 6 (on win2003 and XP-before-SP3) to access secured http web sites you need to enable IE6 to use TLS 1.0. Internet Explorer 6 is present in Windows Server 2003 and Windows XP-pre-SP3.&lt;br /&gt;
&lt;br /&gt;
You can also disable SSL 2.0 and SSL 3.0 for additional safety. This good for later versions of Internet Explorer too.&lt;br /&gt;
&lt;br /&gt;
[[File:IE_options.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Generating IIS certificates for https using openssl ==&lt;br /&gt;
&lt;br /&gt;
This covers the two main type of certificates:&lt;br /&gt;
&lt;br /&gt;
#&amp;quot;proper&amp;quot; certificates (accepted by all browsers without complaint) - issued by bona fide certification authority only on proof of control of a domain name - usually for a small fee&lt;br /&gt;
#&amp;quot;self signed&amp;quot; certificates (not accepted by all browsers without error messages without special configuration) - easily&lt;br /&gt;
issued by anybody without the slightest restriction&lt;br /&gt;
&lt;br /&gt;
NEOSYS&#039; proper https certificate for *.hosts.neosys.com, valid approx Jan-Dec 2016, issued by Comodo, was purchased from namecheap.com for a small fraction of the price of purchasing from Comodo or one of the other main certification authorities.&lt;br /&gt;
&lt;br /&gt;
There is no technical requirement to renew certificates with the same issuing authority, nor is their any restriction whatsoever from having multiple concurrent overlapping certificates, in any combination, for the the same domain name or subsets of a domain name. For a certificate to be &amp;quot;proper&amp;quot; it merely has to be issued by (not necessarily purchased from) one of the certificate authorities registered in all the main browsers using by NEOSYS clients. Unlike DNS domain name registrars, of which you can only have one at any one time, and which take to change, certificates are simply installed in particular servers without reference to each other, nor to any imaginary central internet registry, as IS the case for the DNS domain name registry.&lt;br /&gt;
&lt;br /&gt;
The sales of certificates is a bit of scam really because anybody can get a certificate from the main commercial certificate authorities merely by proving control over a domain name - for example, by receiving an email to ADMIN@xxxxx.com. Except for EV certificates such as those issued to banks etc, most https certificates are issued without any check on physical identity or reputation, therefore the cost of issuing https certificates rests merely on the fact that the certification authority has managed to inveigle itself into all the main browsers and have their public key installed along with the browser software. Hoowever, the market seems to be collapsing, with even free certificate authorities appearing although with some minor limitations like short duration of validity of certificates.&lt;br /&gt;
&lt;br /&gt;
Excellent summary of using openssl to manage certificates .. no Alternate Names though&lt;br /&gt;
https://www.digitalocean.com/community/tutorials/openssl-essentials-working-with-ssl-certificates-private-keys-and-csrs&lt;br /&gt;
&lt;br /&gt;
Excellent summary of selfsigned and properly signed certificate&lt;br /&gt;
https://httpd.apache.org/docs/2.4/ssl/ssl_faq.html&lt;br /&gt;
&lt;br /&gt;
==== Commentary on https security ====&lt;br /&gt;
&lt;br /&gt;
With the general move to using https instead of http after the Snowdon revelations, people have begun to better understand how https certificates really work. People are more aware now that most https certificates mean little more than that their communication with the server is a) confidential b) not tampered with c) is truly with the server/domain name apparent and not some other. ALL WITH THE EXCEPTION OF *ANYBODY* WHO IS A CERTIFICATE AUTHORITY REGISTERED IN THE MAIN BROWSERS - WHICH IS MANY - INCLUDING NON-FRIENDLY NATIONAL STATE ACTORS!&lt;br /&gt;
&lt;br /&gt;
It is possible however to be virtually certain of confidentiality and accuracy of your communication using standard browsers, EVEN VERSUS CERTIFICATION AUTHORITIES. If, by inspecting the certificate when you are browsing a particular web site, you can satisfy  yourself that it is in fact truly the one in use by the web server, the chances of your communication being secure is virtually 100% The only chance is some failure in fundamental encryption protocols. Such failures would either be public knowledge very quickly, or not used versus you, for fear of it becoming public knowledge, unless you really have something incredibly valuable to hide. In this sense, self-certified certificates are the most secure, since you can obtain them by some other secure channel directly from the web server operator and do not change without your action. Note that in order to ensure that a certificate does not change during your session, to say an unknown valid certificate that breaks your security, your browser must support certificate pinning, in which case the browser will either prevent, or inform you if the certificate for the web site changes, either between or within sessions.&lt;br /&gt;
&lt;br /&gt;
To gain a practical understanding of the issues raised if you trust the certification authorities built in to your browser, consider the fact that many companies require an additional certificate authority to be installed in all corporate browsers (and in some famous cases have installed it covertly), and thereafter all https communications are decrypted in the company firewall/proxy using the corporate certificate, checked for content and reencrypted with the true certificate before being passed on - or vice versa, depending on the direction of flow of information. This, for example means that an employee accessing their bank account would be completely exposed to the corporate gaze. Two factor security would prevent corporate interference in say, instructions to make payments, but all information would be exposed and probably logged in possibly long term records. The same would apply to all https web sites accessed by the employee. Courts seem to agree that corporations have every right to do this but the average person is commonly not aware of it. If a person understood how https security works, they could inspect the https certificate to make sure it is the correct (same one issued by their bank apparent at home for example), since it is unlikely that an adversary (or in this case their employer) would control their actual browser software, but security is an arms race and once everybody knows how to defend themselves, adversaries and security operators will simply move to the next level. The next level may be preventing users from using their own browsers. This is already the case in most secure environment, but not all, and BYOD attitudes may prevail in the long run. Whatever the issues are in this case, the same general principle apply in other situations involving security.&lt;br /&gt;
&lt;br /&gt;
=== Generating a self signed certificate in pfx form for IIS ===&lt;br /&gt;
&lt;br /&gt;
Generating certificates and keys https://httpd.apache.org/docs/2.4/ssl/ssl_faq.html&lt;br /&gt;
&lt;br /&gt;
Generating a pfx using openssl https://langui.sh/2009/01/24/generating-a-pkcs12-pfx-via-openssl/&lt;br /&gt;
&lt;br /&gt;
==== Generate standard cert and key pair ====&lt;br /&gt;
&lt;br /&gt;
First generate a matching pair of certificate and key files (x509 and rsa format respectively)&lt;br /&gt;
&lt;br /&gt;
Example for *.mydomain and validity 9999 days from now&lt;br /&gt;
&lt;br /&gt;
 signer=self&lt;br /&gt;
 mydomain=neosys.com&lt;br /&gt;
 mydomains=*.neosys.com&lt;br /&gt;
 expirydays=9999&lt;br /&gt;
 keyno=`date`&lt;br /&gt;
 certno=$keyno&lt;br /&gt;
 #&lt;br /&gt;
 certfilename=$mydomain-$signer-$certno.cer&lt;br /&gt;
 keyfilename=$mydomain-$keyno.key&lt;br /&gt;
 #&amp;quot;-nodes&amp;quot; means -no-DES ie no encryption ie generate a key file without encrypting it and therefore without requiring a password on it&lt;br /&gt;
 openssl req -new -x509 -nodes -days $expirydays -out &amp;quot;$certfilename&amp;quot; -keyout &amp;quot;$keyfilename&amp;quot; \&lt;br /&gt;
     -subj &amp;quot;/C=AE/ST=DUBAI/O=NEOSYS/CN=*.neosys.com&amp;quot; \&lt;br /&gt;
     -reqexts SAN     -config &amp;lt;(cat /etc/ssl/openssl.cnf \&lt;br /&gt;
      &amp;lt;(printf &amp;quot;[SAN]\nsubjectAltName=DNS:*.hosts.neosys.com,DNS:*.support.neosys.com&amp;quot;)) \&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Consider adding subject and subject alternative names&lt;br /&gt;
&lt;br /&gt;
 openssl x509 -req -new -sha256 \&lt;br /&gt;
     -newkey rsa:2048 \&lt;br /&gt;
     -keyout neosys.com-102.key \&lt;br /&gt;
     -subj &amp;quot;/C=AE/ST=DUBAI/O=NEOSYS/CN=*.neosys.com&amp;quot; \&lt;br /&gt;
     -reqexts SAN     -config &amp;lt;(cat /etc/ssl/openssl.cnf \&lt;br /&gt;
      &amp;lt;(printf &amp;quot;[SAN]\nsubjectAltName=DNS:*.hosts.neosys.com,DNS:*.support.neosys.com&amp;quot;)) \&lt;br /&gt;
     -out neosys.com-102.crt \&lt;br /&gt;
     -nodes \&lt;br /&gt;
     -days 9999&lt;br /&gt;
&lt;br /&gt;
Example session:&lt;br /&gt;
&lt;br /&gt;
 Country Name (2 letter code) [AU]:AE&lt;br /&gt;
 State or Province Name (full name) [Some-State]:DUBAI&lt;br /&gt;
 Locality Name (eg, city) []:DUBAI&lt;br /&gt;
 Organization Name (eg, company) [Internet Widgits Pty Ltd]:NEOSYS&lt;br /&gt;
 Organizational Unit Name (eg, section) []:IT&lt;br /&gt;
 Common Name (e.g. server FQDN or YOUR name) []:*.neosys.com&lt;br /&gt;
 Email Address []:it@neosys.com&lt;br /&gt;
&lt;br /&gt;
=== Generating a properly signed certificate ===&lt;br /&gt;
&lt;br /&gt;
http://wiki.gandi.net/en/ssl/csr#sha-2_certificate_request&lt;br /&gt;
&lt;br /&gt;
==== Generate key and CSR file ====&lt;br /&gt;
&lt;br /&gt;
A certificate signing request file (.csr) for *.hosts.neosys.com (wildcard certificate)&lt;br /&gt;
&lt;br /&gt;
if you are renewing (and want to reuse an existing secret server key file mydomain.key, although not clear on the benefit ATM)&lt;br /&gt;
&lt;br /&gt;
 openssl req -new -nodes -sha256 -key mydomain.key -subj &amp;quot;/C=AE/ST=DUBAI/O=NEOSYS/CN=*.hosts.neosys.com&amp;quot; -out mydomain.csr&lt;br /&gt;
&lt;br /&gt;
or if you want to generate a new secret server key file&lt;br /&gt;
&lt;br /&gt;
 openssl req -new -nodes -sha256 -newkey rsa:2048 -keyout mydomain.key -subj &amp;quot;/C=AE/ST=DUBAI/O=NEOSYS/CN=*.hosts.neosys.com&amp;quot; -out mydomain.csr&lt;br /&gt;
&lt;br /&gt;
or if you want to request SAN subdomain wildcards (unlikely to be granted by main cert authorities but perfectly legal and can be self certified)&lt;br /&gt;
&lt;br /&gt;
 openssl req -new -nodes -sha256 -newkey rsa:2048 -keyout mydomain.key -subj &amp;quot;/C=AE/ST=DUBAI/O=NEOSYS/CN=*.neosys.com&amp;quot; -out mydomain.csr \&lt;br /&gt;
     -reqexts SAN     -config &amp;lt;(cat /etc/ssl/openssl.cnf \&lt;br /&gt;
        &amp;lt;(printf &amp;quot;[SAN]\nsubjectAltName=DNS:neosys.com,DNS:*.neosys.com,DNS:*.support.neosys.com,DNS:*.hosts.neosys.com&amp;quot;))&lt;br /&gt;
&lt;br /&gt;
View the csr and verify correct (check that SAN additional domains are listed if you requested them above)&lt;br /&gt;
&lt;br /&gt;
 openssl req -in mydomain.csr -noout -text&lt;br /&gt;
&lt;br /&gt;
==== Either send to CA and get crt/cer file back ====&lt;br /&gt;
&lt;br /&gt;
Send the csr file to the certifying authority and put their response in a mydomain.crt file&lt;br /&gt;
&lt;br /&gt;
Make sure you inform them that the type of software you used to generate the csr is &amp;quot;mod Apache/ModSSL&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 mydomain.csr -&amp;gt; mydomain.cer&lt;br /&gt;
&lt;br /&gt;
==== Or self sign to test all ok ====&lt;br /&gt;
&lt;br /&gt;
 nano ssl.conf&lt;br /&gt;
&lt;br /&gt;
 [req_distinguished_name]&lt;br /&gt;
 countryName = Country Name (2 letter code)&lt;br /&gt;
 countryName_default = AE&lt;br /&gt;
 stateOrProvinceName = State or Province Name (full name)&lt;br /&gt;
 stateOrProvinceName_default = Dubai&lt;br /&gt;
 localityName = Locality Name (eg, city)&lt;br /&gt;
 localityName_default = Dubai&lt;br /&gt;
 organizationalUnitName  = Organizational Unit Name (eg, section)&lt;br /&gt;
 organizationalUnitName_default  = IT&lt;br /&gt;
 commonName = *.neosys.com&lt;br /&gt;
 commonName_max  = 64&lt;br /&gt;
 #&lt;br /&gt;
 [ v3_req ]&lt;br /&gt;
 # Extensions to add to a certificate request&lt;br /&gt;
 basicConstraints = CA:FALSE&lt;br /&gt;
 #keyUsage = nonRepudiation, digitalSignature, keyEncipherment&lt;br /&gt;
 subjectAltName = @alt_names&lt;br /&gt;
 #&lt;br /&gt;
 [alt_names]&lt;br /&gt;
 DNS.1 = neosys.com&lt;br /&gt;
 DNS.2 = *.neosys.com&lt;br /&gt;
 DNS.3 = *.hosts.neosys.com&lt;br /&gt;
 DNS.4 = *.support.neosys.com&lt;br /&gt;
&lt;br /&gt;
 openssl x509 -signkey mydomain.key -in mydomain.csr -req -days 9999 -extensions v3_req   -extfile ssl.conf -out mydomain.crt&lt;br /&gt;
&lt;br /&gt;
view the cert and check extensions (additional domain names) are present if required&lt;br /&gt;
&lt;br /&gt;
 openssl x509 -in mydomain.crt -text -noout&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Merge private key and signed public cert into password protected pfx file ====&lt;br /&gt;
&lt;br /&gt;
Convert the pair of standard files into a single pfx file that IIS can import&lt;br /&gt;
&lt;br /&gt;
 friendlyname=&amp;quot;COMODO SIGNED hosts.neosys.com *.hosts.neosys.com&amp;quot;&lt;br /&gt;
 openssl pkcs12 -export -in mydomain.crt -inkey mydomain.key -name &amp;quot;$friendlyname&amp;quot; -out mydomain.pfx&lt;br /&gt;
&lt;br /&gt;
It will ask for a password .. the usual NEOSYS one is 1f... which will be required when you import the pfx file into IIS before binding to web sites&lt;br /&gt;
&lt;br /&gt;
Example session:&lt;br /&gt;
&lt;br /&gt;
 Enter Export Password:&lt;br /&gt;
 Verifying - Enter Export Password:&lt;br /&gt;
&lt;br /&gt;
Check the pfx file&lt;br /&gt;
&lt;br /&gt;
 openssl pkcs12 -in mydomain.pfx&lt;br /&gt;
&lt;br /&gt;
 openssl pkcs12 -in mydomain.pfx | openssl x509 -noout -text&lt;br /&gt;
&lt;br /&gt;
==== Copy the pfx file to the IIS server and import/bind in the usual way ====&lt;br /&gt;
&lt;br /&gt;
Copy it to the https server&lt;br /&gt;
&lt;br /&gt;
 mysshport=&amp;quot;-P 19510&amp;quot;&lt;br /&gt;
 mysshtarget=&amp;quot;administrator@win3.neosys.com:/cygdrive/d/hosts/CERTIFICATES&amp;quot;&lt;br /&gt;
 scp $mysshport mydomain.pfx $mysshtarget&lt;br /&gt;
&lt;br /&gt;
==== Friendly name in pfx file ====&lt;br /&gt;
&lt;br /&gt;
On the IIS server after importing, if you have multiple certificates for the same domain name you might like to add a &amp;quot;friendly name&amp;quot; to distinguish them in the dropdown when binding certificates to web sites.&lt;br /&gt;
&lt;br /&gt;
You might also want to add the friendly name to the pfx file if you intend to import it again or elsewhere using certificate export to pfx with options Include All and Export All&lt;br /&gt;
&lt;br /&gt;
https://rickardrobin.wordpress.com/2012/12/05/specifying-a-friendly-name-to-a-certificate/&lt;br /&gt;
&lt;br /&gt;
=== Understanding SSL certificates ===&lt;br /&gt;
&lt;br /&gt;
==== What are RSA Private Keys, CSRs and Certificates? ====&lt;br /&gt;
&lt;br /&gt;
YOUR RSA PRIVATE KEY FILE&lt;br /&gt;
&lt;br /&gt;
is a digital file created by you and never ever shared with others. It is USED ONLY BY YOU (never by others) to either:&lt;br /&gt;
&lt;br /&gt;
*to DECRYPT secret, encrypted, messages received by you from others&lt;br /&gt;
*to SIGN messages before sending them to others providing them certainty that the message came from you without being tampered with and that you cannot deny signing them.&lt;br /&gt;
&lt;br /&gt;
YOUR RSA PUBLIC KEY FILE&lt;br /&gt;
&lt;br /&gt;
is a digital file created by you and freely shared with others. It is USED BY OTHERS (never by you) to either:&lt;br /&gt;
&lt;br /&gt;
*ENCRYPT messages before sending them to you&lt;br /&gt;
*VERIFY that signed messages were in fact signed by you and not tampered with and you cannot deny signing them.&lt;br /&gt;
&lt;br /&gt;
OTHER PERSON&#039;S RSA PUBLIC KEY FILE&lt;br /&gt;
&lt;br /&gt;
is a digital file created by the other person and freely shared with you and others. It is USED BY YOU OR ANYBODY (never by the other person) to either:&lt;br /&gt;
&lt;br /&gt;
*ENCRYPT messages to achieve secrecy before sending them to the other person.&lt;br /&gt;
*VERIFY that signed messages received were in fact signed by the other person and that they cannot deny signing them nor claim they have been tampered with.&lt;br /&gt;
&lt;br /&gt;
To obtain someone&#039;s public key, you need a trusted channel, ie a signed channel, but not a secret or encrypted channel since the information is public and not confidential.&lt;br /&gt;
&lt;br /&gt;
Using your private key and someones public key together:&lt;br /&gt;
&lt;br /&gt;
*If you want to send a signed secret message to someone and allow them to be sure it came unmodified from you, you first sign the message using YOUR PRIVATE KEY, then encrypt the message using THEIR PUBLIC KEY&lt;br /&gt;
*If you want to receive a secret message and verify that it came unmodified from someone in particular, you first you decrypt the message using YOUR PRIVATE KEY, then verify the message using THEIR PUBLIC KEY&lt;br /&gt;
&lt;br /&gt;
Signing and Verification = Encryption and Decryption Mathematical Process with keys reversed&lt;br /&gt;
&lt;br /&gt;
Actually, the process of &amp;quot;signing&amp;quot; is doing the same mathematical process as encryption, but since you use the recipients public key, the resultant &amp;quot;encrypted&amp;quot; messege is not secret because it can be &amp;quot;decrypted&amp;quot; using a public key which are freely available.&lt;br /&gt;
&lt;br /&gt;
Likewise, the process of &amp;quot;verification&amp;quot; on a received message is doing the same mathematical process as decryption, but since you are using the senders public key, and anybody could &amp;quot;decrypt&amp;quot; the message, it was not really encrypted in the sense of being secret.&lt;br /&gt;
&lt;br /&gt;
So we have two processes, one called Encryption/Signing but is exactly the same mathematical process with two names depending on whether we use a public or private key, and another process called Decryption/Verification which uses the opposite key.&lt;br /&gt;
&lt;br /&gt;
What YOU use for what:&lt;br /&gt;
&lt;br /&gt;
*YOUR (PRIVATE) KEY = USED BY YOU for decryption and signing&lt;br /&gt;
*THEIR (PUBLIC) KEY = USED BY YOU for encryption and verification&lt;br /&gt;
&lt;br /&gt;
*YOUR (PUBLIC) KEY = NEVER USED BY YOU - since anybody else could do the same thing so no trust or secrecy could be obtained&lt;br /&gt;
*THEIR (PRIVATE) KEY = NEVER USED BY YOU - since you dont have it!&lt;br /&gt;
&lt;br /&gt;
What to use:&lt;br /&gt;
&lt;br /&gt;
*ENCRYPT OUTGOING = Use THEIR (public) key&lt;br /&gt;
*VERIFY INCOMING = Use THEIR (public) key&lt;br /&gt;
&lt;br /&gt;
*DECRYPT INCOMING = Use YOUR (private) key&lt;br /&gt;
*SIGN OUTGOING = Use YOUR (private) key&lt;br /&gt;
&lt;br /&gt;
So the slightly strange thing is that you dont encrypt messages with your private key as might be assumed naturally. You encrypt using the target recipient&#039;s public key. This is perfectly logical if you understand the concept asymmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
One thing to note is that, while it is obvious that other people never use your private key, since they dont have it, it is not obvious, but perfectly true, that you never use your public key. NOBODY EVER USES THEIR OWN PUBLIC KEY ... THEY ONLY GIVE IT TO OTHERS TO USE.&lt;br /&gt;
&lt;br /&gt;
CERTIFICATE&lt;br /&gt;
&lt;br /&gt;
It has a public component which you distribute (via your Certificate file) which allows people to encrypt those messages to you. It can also be used by you to sign messages that can be verified as having come from you by anyone who receives the signed message, using your public key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CSR FILE&lt;br /&gt;
&lt;br /&gt;
A Certificate Signing Request (CSR) is a digital file which contains your public key and your details eg name/domain name etc. You send the CSR to a Certifying Authority (CA), who will create a real Certificate containing your detail eg your domain name and your public key, signed by them using their private RSA private key.&lt;br /&gt;
&lt;br /&gt;
CERTIFICATE&lt;br /&gt;
&lt;br /&gt;
A Certificate contains your RSA public key, your name, the name of the CA, and is digitally signed by the CA. Browsers that know the CA can verify the signature on that Certificate, thereby obtaining your RSA public key. That enables them to send messages which only you can decrypt.&lt;br /&gt;
&lt;br /&gt;
==== What is Asymmetric cryptography? ====&lt;br /&gt;
&lt;br /&gt;
Asymmetric cryptography allows you to freely publish a &amp;quot;public&amp;quot; key that can be used by anyone to send you encrypted messages. Such messages can only be decrypted by you using a special matching &amp;quot;private&amp;quot; key which you always keep secret.&lt;br /&gt;
&lt;br /&gt;
Asymmetric cryptography also allows you to publish &amp;quot;signed&amp;quot; messages that can be verified by anyone as coming directly from you without any modification by others. Such messages are created using your &amp;quot;private&amp;quot; key and can be verified by anyone who has your &amp;quot;public&amp;quot; key. Creation involves the same process as encryption. Verification uses the same process as decryption.&lt;br /&gt;
&lt;br /&gt;
Note that you dont ever actually use your own public key. You use your private key to decrypt messages sent to you, and you use the same key to &amp;quot;sign&amp;quot; messages to prove they came from you and without modification. Likewise other people only ever use your &amp;quot;public&amp;quot; key - either for encrypting messages that they want to send to you, or verifying that signed messages did come from you unmodified.&lt;br /&gt;
&lt;br /&gt;
So we have a pair of keys that if either one is used for encryption/signing, then the other one is required for decryption/verifying. In that sense, it does not matter which we choose to keep private and which public, but ensure that we only ever publish one of them and forever keep the other secret.&lt;br /&gt;
&lt;br /&gt;
So, to start encrypting or signing, you need a matched pair of keys, and you need to publish one to other people and forever keep the other one secret.&lt;br /&gt;
&lt;br /&gt;
.key a file that contains a random collection of characters that can be used to encrypt&lt;br /&gt;
&lt;br /&gt;
.cer a file that contains a random collection of characters that can be given out publicly and used by anybody to encrypt something to be sent to you&lt;br /&gt;
&lt;br /&gt;
A certificate is some information that has been processed by a private and secret key.&lt;br /&gt;
&lt;br /&gt;
pfx contains a private key and public certificate which contains your public key embedded. Usually pfx files are encrypted and you have to enter a password before using them, ie importing them.&lt;br /&gt;
&lt;br /&gt;
==[[Backing up and Restoring IIS configuration]]==&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Setting_up_and_using_remote_support&amp;diff=2694</id>
		<title>Setting up and using remote support</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Setting_up_and_using_remote_support&amp;diff=2694"/>
		<updated>2016-05-21T10:49:15Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Configuring SSHD to use a non-standard port number */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Getting agreement of client IT staff to provide remote support ==&lt;br /&gt;
&lt;br /&gt;
[[Letter to obtain agreement of client IT staff to provide remote support]]&lt;br /&gt;
&lt;br /&gt;
== Initial Connection to the server before setting up permanent remote connection ==&lt;br /&gt;
&lt;br /&gt;
In case of a remote installation you need to get an initial connection to the server before you can setup Cygwin for a permanent remote connection. For this purpose you can either use your customised reverse connect UltraVNC SC file or the one-time run Teamviewer utility.&lt;br /&gt;
&lt;br /&gt;
Support MUST not provide NEOSYS support via Microsoft Remote Desktop Client (RDP/RDC) on port 3389 at anytime because it is a BAD idea to simply open port 3389 since an open port 3389 attracts scanners/hackers like flies. &lt;br /&gt;
&lt;br /&gt;
Also, IT suppliers not aware of the situation often setup the initial administrator password to something obvious like &amp;quot;password&amp;quot; or the arent-I-clever &amp;quot;P@ssw0rd&amp;quot; or even blank. In this case there is a good chance internet worms will discover the &amp;quot;open door&amp;quot; and install themselves before you get the chance to put a strong password.&lt;br /&gt;
&lt;br /&gt;
If the client has already gone ahead and provided Microsoft RDP with an obvious/weak system password, then Support MANDATORY MUST get Windows reinstalled from scratch. Antivirus may not be able to tell that the server has been infected and rootkitted and therefore a scan does not prove it has not been infected.&lt;br /&gt;
&lt;br /&gt;
== Installing and configuring SSH ==&lt;br /&gt;
=== Installing Cygwin with OPENSSH ===&lt;br /&gt;
&lt;br /&gt;
These instruction are only for installing in a server NOT part of a domain. For installing in a server that is part of a domain, see http://cygwin.com/faq-nochunks.html#faq.using.sshd-in-domain&lt;br /&gt;
&lt;br /&gt;
Watch out for non-intuitive steps like clicking &amp;quot;skip&amp;quot; to install something.&lt;br /&gt;
&lt;br /&gt;
# Read [[Avoiding Corrupt Cygwin Installations]]&lt;br /&gt;
# ENSURE that you are logged in as the local (NOT DOMAIN) administrator&lt;br /&gt;
# Download/Run/Install http://www.cygwin.com/setup.exe&amp;lt;br&amp;gt;(you might have to go to the home page http://www.cygwin.com and click the link to setup.exe)&lt;br /&gt;
# Download source: &#039;&#039;&#039;Install from Internet&#039;&#039;&#039;&lt;br /&gt;
# Root Directory: &#039;&#039;&#039;c:\cygwin&#039;&#039;&#039;&lt;br /&gt;
# Local Package Directory: &#039;&#039;&#039;c:\cygwin.lib&#039;&#039;&#039;&lt;br /&gt;
# Choose &amp;quot;yes&amp;quot; to &amp;quot;Folder does not exist. Create new?&amp;quot;&lt;br /&gt;
# Internet Connection: &#039;&#039;&#039;Direct Connection&#039;&#039;&#039;&lt;br /&gt;
# Download Site: &#039;&#039;&#039;http://mirrors.kernel.org&#039;&#039;&#039; (near the bottom)&amp;lt;br&amp;gt;(If this does not show in the list, key in the URL in the field &#039;&#039;&#039;User URL&#039;&#039;&#039; and click on Add)&lt;br /&gt;
# Select Packages: Maximise window then click &#039;&#039;&#039;View&#039;&#039;&#039; once to get &#039;&#039;&#039;Full&#039;&#039;&#039;. You can then enter the name of the desired packages in the Search box to speed up location of the desired packages.&lt;br /&gt;
# Next to the package &#039;&#039;&#039;OPENSSH&#039;&#039;&#039;, click the word &#039;&#039;&#039;Skip&#039;&#039;&#039; (once!) to get version 4.4p1-1 or later&lt;br /&gt;
# Next to the package &#039;&#039;&#039;NANO&#039;&#039;&#039;, click the word &#039;&#039;&#039;Skip&#039;&#039;&#039; (once!) to get the latest version available&lt;br /&gt;
# Check the NEOSYS INSTALLATION CHECKLIST for any other packages to install like the above.&lt;br /&gt;
# Click Next and complete the installation&lt;br /&gt;
&lt;br /&gt;
=== Win32 Error ===&lt;br /&gt;
&lt;br /&gt;
The Win32 Error occur when the bad file is cached in internet explorer cache. You can try clearing the internet explorer cache and redownloading or you can try to download from cygwin.com instead of www.cygwin.com so it doesnt look in the cache or www.cygwin.com if your original download was from cygwin.com. All else failing, you can simply upload the setup.exe file from your own pc to the server. &lt;br /&gt;
&lt;br /&gt;
All this relates to win32 error when running a downloaded file. Any downloaded file and not just cygwin.com/setup.exe&lt;br /&gt;
&lt;br /&gt;
===Error during setup===&lt;br /&gt;
&lt;br /&gt;
In case of the following error, check for proxy settings in internet explorer. It is possible that the client uses a proxy setting. In that case, in Step 7 instead of choosing &amp;lt;b&amp;gt;Direct Connection&amp;lt;/b&amp;gt;, choose &amp;lt;b&amp;gt;Use Internet Explorer Proxy Setting&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 Unable to get setup.ini from &amp;lt;http://mirrors.kernel.org/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Cygwin install error.png]]&lt;br /&gt;
&lt;br /&gt;
=== Configuring and starting SSHD ===&lt;br /&gt;
Open the Cygwin icon to get a linux/bash command line and type:&lt;br /&gt;
&lt;br /&gt;
Run the following commands: (not needed in recent versions of Cygwin so dont do this)&lt;br /&gt;
&lt;br /&gt;
 chmod +r /etc/passwd&lt;br /&gt;
 chmod +r /etc/group&lt;br /&gt;
 chmod 777 /var&lt;br /&gt;
&lt;br /&gt;
Refer [[Setting_up_and_using_remote_support#Reinstalling_SSHD_if_service_fails_to_startup| here]] if you get an error while doing the above steps.&lt;br /&gt;
&lt;br /&gt;
Prevent cygwin from using Unix like permissions on files it creates&lt;br /&gt;
&lt;br /&gt;
 nano /etc/fstab&lt;br /&gt;
&lt;br /&gt;
add the line or just add &amp;quot;,noacl&amp;quot; to the existing similar line. (What is the effect of omitting this?)&lt;br /&gt;
&lt;br /&gt;
 none /cygdrive cygdrive binary,posix=0,user,noacl 0 0&lt;br /&gt;
&lt;br /&gt;
Thereafter start with the ssh configuration:&lt;br /&gt;
&lt;br /&gt;
 ssh-host-config&lt;br /&gt;
&lt;br /&gt;
Then on the following options type:&lt;br /&gt;
 Only asked if running again:&lt;br /&gt;
 Overwrite existing /etc/ssh_config file? yes&lt;br /&gt;
 Overwrite existing /etc/sshs_config file? yes&lt;br /&gt;
 .&lt;br /&gt;
 StrictModes                 -   no&lt;br /&gt;
 Privilege                   –   yes&lt;br /&gt;
 New local sshd account      -   yes&lt;br /&gt;
 Install SSHD as a service   -   yes&lt;br /&gt;
 Enter value of daemon       -   Just press Enter&lt;br /&gt;
 Different name              -   no&lt;br /&gt;
 Create new privileged user  -   yes&lt;br /&gt;
 Enter a password now        -   Invent a NEW totally random password with caps and both upper and lower case.&lt;br /&gt;
 Re-enter the password       -   Enter it again. Dont record it anywhere. Forget it.&lt;br /&gt;
&lt;br /&gt;
At the command prompt type&lt;br /&gt;
&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
=== Configuring SSHD to use a non-standard port number ===&lt;br /&gt;
&lt;br /&gt;
This is necessary if the router cannot forward port 19580 --&amp;gt; 22 and we don’t want to open port 22 directly.&lt;br /&gt;
&lt;br /&gt;
Capitalization is SIGNIFICANT AND CANNOT BE IGNORED in cygwin/linux commands&lt;br /&gt;
&lt;br /&gt;
open cygwin command prompt&lt;br /&gt;
&lt;br /&gt;
 cd /etc&lt;br /&gt;
 nano sshd_config&lt;br /&gt;
&lt;br /&gt;
change the Port to look like this:&lt;br /&gt;
&lt;br /&gt;
 #Port 22&lt;br /&gt;
 Port 19580&lt;br /&gt;
&lt;br /&gt;
Also add the last line to the following section. Refer [[Setting_up_and_using_remote_support#Solving_.22Authentication_that_can_continue:_publickey.2Cpassword.22_Error_when_connecting_to_remote_servers_via_remote_access_clients| Error when connecting to remote servers]] to see why this line is added.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Change to no to disable s/key passwords&lt;br /&gt;
#ChallengeResponseAuthentication yes&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Press Ctrl+x to save. On the confirmation type Y and on the next prompt hit enter.&lt;br /&gt;
&lt;br /&gt;
 net stop sshd&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
To check that the server is running and listening on port 19580&lt;br /&gt;
&lt;br /&gt;
 ssh -p 19580 administrator@localhost&lt;br /&gt;
&lt;br /&gt;
If you are asked for to confirm the server id is correct or enter password then the check is successful. No need to continue.&lt;br /&gt;
&lt;br /&gt;
=== Changing ssh login from “Administrator” to “administrator” ===&lt;br /&gt;
Current NEOSYS policy to cater for recent versions of Cygwin is to rename the windows Administrator user to administrator to keep a consistent ssh login across all installations.&lt;br /&gt;
&lt;br /&gt;
If you forget to do this before installing or upgrading Cygwin then you must to the following:&lt;br /&gt;
&lt;br /&gt;
#Rename “Administrator” to “administrator” in Windows&lt;br /&gt;
#*If you cannot rename Administrator to administrator, follow the procedure mentioned at [[Changing username from Administrator to administrator]]&lt;br /&gt;
#In a Cygwin console do:&lt;br /&gt;
&lt;br /&gt;
 mkpasswd &amp;gt; /etc/passwd&lt;br /&gt;
&lt;br /&gt;
It should come back with nothing&lt;br /&gt;
&lt;br /&gt;
=== Error while changing Cygwin port 22 to 19580 ===&lt;br /&gt;
&lt;br /&gt;
Error Message:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;Could not open file for writing: permission denied&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Occurrence:&lt;br /&gt;
Sometimes when you edit the sshd_config file through NANO.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
In SSH shell, follow these commands:&lt;br /&gt;
&lt;br /&gt;
 cp sshd_config ashwin_temp #copies sshd_config to a new file ashwin_temp&lt;br /&gt;
 rm sshd_config             #deletes sshd_config&lt;br /&gt;
 cp ashwin_temp sshd_config #copies ashwin_temp to sshd_config&lt;br /&gt;
&lt;br /&gt;
In case it does not copy sshd_config to ashwin_temp, than check whether an ashwin_temp filename exists and delete it using the rm command.&lt;br /&gt;
&lt;br /&gt;
=== Opening up ssh connections to additional source ip nos ===&lt;br /&gt;
&lt;br /&gt;
Starting a NEOSYS process will automatically restrict cygwin ssh to accept connections from known NEOSYS company static ip numbers.&lt;br /&gt;
&lt;br /&gt;
In the cygwin command line, insert a line in the list of allowable hosts&lt;br /&gt;
&lt;br /&gt;
DO NOT ALLOW ALL OR GENERAL SSH ACCESS TO NEOSYS CLIENTS SERVERS WITHOUT GETTING PERMISSION *AND* INSTALLING EMAIL ALERTS FOR LOGINS AS DESCRIBED BELOW&lt;br /&gt;
&lt;br /&gt;
 nano /etc/hosts.allow&lt;br /&gt;
&lt;br /&gt;
 sshd: ALL&lt;br /&gt;
&lt;br /&gt;
or a ip numbers or CIDR format&lt;br /&gt;
&lt;br /&gt;
 sshd 12.34.56.78&lt;br /&gt;
 sshd 12.34.0.0/16&lt;br /&gt;
&lt;br /&gt;
=== Setting up email alerts for cygwin ssh logins  ===&lt;br /&gt;
&lt;br /&gt;
Use http://www.cygwin.com/setup.exe to install &amp;quot;email&amp;quot; and &amp;quot;whois&amp;quot; packages&lt;br /&gt;
&lt;br /&gt;
Insert the following script using cygwin command prompt.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;NOTE! it@neosys.com to whatever you want.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 cd /etc&lt;br /&gt;
 nano sshrc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#&lt;br /&gt;
#you configure this&lt;br /&gt;
&lt;br /&gt;
ALERTEMAILADDRESS=it@neosys.com&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get the ip number without the ipv6 prefix&lt;br /&gt;
FROMIPNO=`echo $SSH_CLIENT|cut -f 1 -d &amp;quot; &amp;quot;|sed &#039;s/::ffff://&#039;`&lt;br /&gt;
#&lt;br /&gt;
#quit with no message if from a known host&lt;br /&gt;
&lt;br /&gt;
if grep -x $FROMIPNO /etc/trustedipnos&lt;br /&gt;
then exit&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get the host name by reverse lookup&lt;br /&gt;
&lt;br /&gt;
FROMHOST=`nslookup $FROMIPNO|grep &amp;quot;name =&amp;quot;`&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get whois info about the login ip number&lt;br /&gt;
&lt;br /&gt;
#and pipe it into the mail program&lt;br /&gt;
#&amp;quot;&amp;amp;&amp;quot; on the end creates a new process in order not to delay login&lt;br /&gt;
&lt;br /&gt;
whois $FROMIPNO|\&lt;br /&gt;
email -q -f nl1@neosys.com -s &amp;quot;login $USER $FROMIPNO $FROMHOST&amp;quot; -r \&lt;br /&gt;
mailout.neosys.com -p 2500 $ALERTEMAILADDRESS&amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that you configure the file permissions&lt;br /&gt;
&lt;br /&gt;
 chmod a+x sshrc&lt;br /&gt;
&lt;br /&gt;
Inserted trusted ip nos.&lt;br /&gt;
&lt;br /&gt;
 cd /etc&lt;br /&gt;
 nano trustedipnos&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#sorry, ip ranges and cidr etc not accepted yet&lt;br /&gt;
&lt;br /&gt;
#vm1.neosys.com for remote checking&lt;br /&gt;
85.17.154.105&lt;br /&gt;
&lt;br /&gt;
#nl1.neosys.com&lt;br /&gt;
83.149.104.167&lt;br /&gt;
&lt;br /&gt;
#nl2.neosys.com&lt;br /&gt;
85.17.154.66&lt;br /&gt;
&lt;br /&gt;
#uk.neosys.com&lt;br /&gt;
78.143.212.191&lt;br /&gt;
&lt;br /&gt;
#nl3.neosys.com&lt;br /&gt;
94.75.233.2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that you configure the file permissions&lt;br /&gt;
&lt;br /&gt;
 chmod a+x sshrc&lt;br /&gt;
&lt;br /&gt;
=== Testing SSH connection to the NEOSYS server over port 19580 ===&lt;br /&gt;
&lt;br /&gt;
If you cannot connect to the server using SSH, see [[Troubleshooting_NEOSYS_Generally#Troubleshooting_NEOSYS_remote_support_port_forwarding|Troubleshooting NEOSYS remote support port forwarding]]&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting SSH: If SSH connects and then disconnects immediately without exchanging keys ===&lt;br /&gt;
 &lt;br /&gt;
The first time that NEOSYS runs, it automatically adds source ip number restrictions to the sshd remote support configuration in /etc/hosts.allow and /etc/hosts.deny. This is an important security procedure to allow connection to clients systems from NEOSYS ip numbers only. This process allows only local and known NEOSYS ip numbers to connect using SSH. Upgrading NEOSYS will add and/or remove allowable ip numbers as NEOSYS configuration changes.&lt;br /&gt;
&lt;br /&gt;
It is possible that in some client network configurations incoming ssh connections will appear to be from the clients internal routers with an ip unknown to NEOSYS due to NAT configurations. Therefore ssh connections will be blocked unless specifically allow the local ip number or it is added into an upgraded version of NEOSYS.&lt;br /&gt;
&lt;br /&gt;
NOTE: Therefore you must check that remote support via ssh works AFTER you have run NEOSYS once (maintenance mode). &lt;br /&gt;
 &lt;br /&gt;
#Look in the Windows, Computer Management, System Tools, Event Viewer, Application&lt;br /&gt;
#Search for entries from source &amp;quot;sshd&amp;quot;, double click and look in the Event Properties, Description for ip numbers&lt;br /&gt;
#Information type sshd entries will give the ip number of successful sshd connections.&lt;br /&gt;
#Warning type sshd entries will give the ip number of failed sshd connections.&lt;br /&gt;
#Find the ip number of failed connections.&lt;br /&gt;
&lt;br /&gt;
==== Possible Problem 1 - Port mapping in router is using NAT ====&lt;br /&gt;
&lt;br /&gt;
If the ip number of failed connections is some local ip number (of the router for example) then possibly the inbound port forwarding has been done with NAT and the source ip number has been lost. Therefore the NEOSYS ip restrictions are blocking ssh connections because they appear to be coming from an unknown ip number (ie that of the router)&lt;br /&gt;
&lt;br /&gt;
==== Solution 1A ====&lt;br /&gt;
&lt;br /&gt;
Change the router configuration to not use NAT and leave the genuine original source IP number&lt;br /&gt;
&lt;br /&gt;
==== Solution 1B ====&lt;br /&gt;
The router is sadly using NAT instead of plain old port forwarding.&lt;br /&gt;
&lt;br /&gt;
DO NOT USE THIS PROCEDURE TO BREAK NEOSYS SECURITY. DO NOT GRANT ACCESS TO ANY IP OTHER THAN CLIENTS ROUTER IPS&lt;br /&gt;
&lt;br /&gt;
The solution is to add NAT router IP to the list of authorised IP numbers on the NEOSYS server. This solution provides access to NEOSYS server from outside office unrestricted by IP number, hence Client Management approval must be obtained before this solution is applied.&lt;br /&gt;
&lt;br /&gt;
Sample Email to Management-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Dear XXXX,&lt;br /&gt;
 &lt;br /&gt;
 Support must have remote access to the NEOSYS server via SSH but currently we don’t have access.&lt;br /&gt;
 &lt;br /&gt;
 This is because your router is using NAT. The NAT router translates the source IP to its own hence the source IP is lost. NEOSYS server &lt;br /&gt;
 has  a list of allowed source IPs and since the router’s IP is not in the list, connection fails.&lt;br /&gt;
 &lt;br /&gt;
 The solution to establish successful connectivity is to allow access to NEOSYS server from your NAT router by adding the router’s IP in&lt;br /&gt;
 list of allowed IPs on the server.&lt;br /&gt;
 &lt;br /&gt;
 We need your agreement to carry out this solution because authorizing this access means access to NEOSYS from outside office will not be  &lt;br /&gt;
 restricted by IP any more.&lt;br /&gt;
 &lt;br /&gt;
 Please confirm that this solution is OK.&lt;br /&gt;
 &lt;br /&gt;
 Best Regards&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
On receipt of Management approval, add the routers IP number to the list of authorised IP numbers in the cygwin hosts.allow file as follows:&lt;br /&gt;
&lt;br /&gt;
 nano /etc/hosts.allow&lt;br /&gt;
&lt;br /&gt;
and add the line as follows but put the IP number of your router&lt;br /&gt;
&lt;br /&gt;
 sshd: allow 192.168.0.99&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Warning&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#If the router IP changes then NEOSYS remote support will fail until this line is changed&lt;br /&gt;
#Do not grant access to 192.168.* etc. since this allows local LAN viruses to attack&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting sshd ===&lt;br /&gt;
&lt;br /&gt;
You can run the sshd service interactively to see all messages instead of having to search logs/events etc.&lt;br /&gt;
&lt;br /&gt;
Unfortunately this will not work the same as the normal windows sshd service unless you assume the identity of the sshd_server user. To assume the identity of the sshd_server user you will have to reset its password to something new (since we dont take a record of it during sshd-host-setup) AND ALSO place the new password in the logon properties of the sshd windows service.&lt;br /&gt;
&lt;br /&gt;
 su sshd_server&lt;br /&gt;
 /usr/sbin/sshd -D -p 19580&lt;br /&gt;
&lt;br /&gt;
=== Reinstalling SSHD if service fails to startup ===&lt;br /&gt;
&lt;br /&gt;
====Error message====&lt;br /&gt;
 chmod: cannot access &#039;/etc/passwd&#039;: No such file or directory&lt;br /&gt;
 chmod: cannot access ‘/etc/group’: No such file or directory&lt;br /&gt;
&lt;br /&gt;
====Solution====&lt;br /&gt;
Sometimes reinstallation isnt necessary and sshd can be made to restart by doing&lt;br /&gt;
 &lt;br /&gt;
 mkpasswd &amp;gt; /etc/passwd&lt;br /&gt;
 mkgroup &amp;gt; /etc/group&lt;br /&gt;
&lt;br /&gt;
If all else fails:&lt;br /&gt;
&lt;br /&gt;
#Look in &#039;&#039;&#039;/var/log/sshd.log&#039;&#039;&#039; for errors&lt;br /&gt;
#Delete the following users: &#039;&#039;&#039;sshd&#039;&#039;&#039; and &#039;&#039;&#039;sshd_server&#039;&#039;&#039;&lt;br /&gt;
#Remove the sshd service at the cygwin prompt type &#039;&#039;&#039;cygrunsrv –R sshd&#039;&#039;&#039;&lt;br /&gt;
#Do the above Configuration and starting SSHD step again&lt;br /&gt;
&lt;br /&gt;
Note that you don&#039;t have to reinstall cygwin entirely, just sshd with the above steps.&lt;br /&gt;
&lt;br /&gt;
== Upgrading SSHD / Cygwin ==&lt;br /&gt;
NEOSYS relies on cygwin to provide secure network access and support various linux/unix services under Windows, mainly rsync for interoffice consolidation.&lt;br /&gt;
&lt;br /&gt;
Just like MS Windows update, cygwin should be updated at regular intervals to close security holes discovered in the software by its authors. This is particularly important for cygwin&#039;s remote access service sshd since it is exposed to the internet although on a non-standard port.&lt;br /&gt;
&lt;br /&gt;
Join the cygwin and sshd security news email lists to learn about when cygwin upgrades sshd and/or when there are issues generally with sshd&lt;br /&gt;
&lt;br /&gt;
To find out what versions of cygwin/sshd are installed at NEOSYS clients, in Nagios check &amp;quot;Status Information&amp;quot; of the neosys-ssh service &lt;br /&gt;
&lt;br /&gt;
 SSH OK - OpenSSH_5.9 (protocol 2.0) &lt;br /&gt;
&lt;br /&gt;
=== Upgrading Cygwin remotely ===&lt;br /&gt;
&lt;br /&gt;
NEOSYS normal remote server support connection uses cygwin/ssh. Cygwin can be upgraded while in use with a script as explained in the section below.&lt;br /&gt;
&lt;br /&gt;
==== Upgrading Cygwin with a script ====&lt;br /&gt;
&lt;br /&gt;
The following script can be used to automatically upgrade cygwin to the latest version quite easily even when people are using NEOSYS. However it carries a small risk described below.&lt;br /&gt;
&lt;br /&gt;
WARNING This script temporarily disconnects and disables all ssh remote support connections, including any ssh connection you are using to initiate the process, for the duration of the upgrade.&lt;br /&gt;
&lt;br /&gt;
Since something may go wrong and the script might FAIL to re enable ssh remote connections, you can take one of the precautionary measures listed below.&lt;br /&gt;
&lt;br /&gt;
* either perform a temporary Teamviewer installation. The quick teamviewer zero installation remote support method will not work under rdp/tunnelier/remmina&lt;br /&gt;
* or ensure that client IT support is available ONSITE to provide temporary teamviewer access in the event of any problem&lt;br /&gt;
* or be prepared to lose the ability to provide remote support to the installation until the previous item is available&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TeamViewer 9 issue&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When attempting to connect to client server via TeamViewer 9 (setup via Tunnelier with unattended access) it shows the error below&lt;br /&gt;
&lt;br /&gt;
[[File:TVerror.jpg]]&lt;br /&gt;
&lt;br /&gt;
SOLUTION: Install TeamViewer 7 which does not give this error. Contact NEOSYS IT for TeamViewer7 commercial license. You must have the client server&#039;s administrator password to login using TeamViewer. After the upgrade, REMOVE SETTINGS for unattended access and UNINSTALL Teamviewer. Teamviewer must NOT BE LEFT with permanent login by number and password! Teamviewer options, security, REMOVE &amp;quot;Predefined password (For unattended access)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===== Running the script =====&lt;br /&gt;
&lt;br /&gt;
[[Setting_up_and_using_remote_support#Finding_the_script|Just locate the upgradecygwin.cmd script]] and run it some usual way by clicking and pressing Enter. &lt;br /&gt;
&lt;br /&gt;
You MUST inspect the version of the pre-installed script against the http version and upgrade to the latest. As the script is updated with fixes for problems faced in the past.&lt;br /&gt;
&lt;br /&gt;
If you initiate the script while connected on ssh using tunnelier/remmina etc. half way through the script you will be disconnected.&lt;br /&gt;
&lt;br /&gt;
The script will take a few minutes to download and install any cygwin upgrades.&lt;br /&gt;
&lt;br /&gt;
Once the script is finished, it will re enable creation of new incoming ssh connections and attempt to send an email to support@neosys.com via the standard mailout.neosys.com:2500 email server.&lt;br /&gt;
&lt;br /&gt;
You should then be able to reconnect using ssh and tunnelier/remmina. If you do not get any email then perhaps the script is unable to send email to the standard mailout.neosys.com:2500 email server due to a firewall. In this case after 10 minutes or so you should be able to reconnect using ssh anyway.&lt;br /&gt;
&lt;br /&gt;
*upgradecygwin.log - contents of the email that would have been sent&lt;br /&gt;
*upgradecygwin.err - any errors that prevent sending email&lt;br /&gt;
&lt;br /&gt;
If you cannot connect on ssh using tunnelier/remmina after say 20 minutes then the script must have failed. To resolve that problem, either use your existing Teamviewer connection or get client IT support to physically access the server to install Teamviewer for you.&lt;br /&gt;
&lt;br /&gt;
Running the script multiple times will not cause any issue. If there is little or nothing to upgrade then the time to complete will be short since there is less to download and install.&lt;br /&gt;
&lt;br /&gt;
===== Verifying successful run =====&lt;br /&gt;
&lt;br /&gt;
#You must carefully inspect the email or log for &amp;quot;error&amp;quot; or &amp;quot;fail&amp;quot; and intelligently and thoughtfully find any other unexpected results and deal with them. It is impossible to give guidelines for everything so this requires brainwork.&lt;br /&gt;
#[[Setting_up_and_using_remote_support#How_to_check_Cygwin_version_.3F|You must check the versions of &amp;quot;cygwin&amp;quot; and &amp;quot;openssh&amp;quot;]] at a minimum and ensure they agree with the latest expected version numbers.&lt;br /&gt;
#You must check for the word &amp;quot;reboot&amp;quot; especially in the following scenarios:&lt;br /&gt;
&lt;br /&gt;
 Installing file cygfile:///usr/bin/cygwin1.dll&lt;br /&gt;
 io_stream_cygfile: fopen(/usr/bin/cygwin1.dll) failed 13 Permission denied&lt;br /&gt;
 Failed to open cygfile:///usr/bin/cygwin1.dll for writing.&lt;br /&gt;
 Scheduled reboot replacement of file C:\cygwin\bin/cygwin1.dll with C:\cygwin\bin/cygwin1.dll.new&lt;br /&gt;
&lt;br /&gt;
 mbox note: In-use files have been replaced. You need to reboot as soon as possible to activate the new versions. Cygwin may operate  &lt;br /&gt;
 incorrectly until you reboot.&lt;br /&gt;
&lt;br /&gt;
 note: In-use files have been replaced. You need to reboot as soon as possible to activate the new versions. Cygwin may operate incorrectly &lt;br /&gt;
 until you reboot.&lt;br /&gt;
 Ending cygwin install&lt;br /&gt;
&lt;br /&gt;
===== Dealing with reboot required =====&lt;br /&gt;
&lt;br /&gt;
The script attempts to shutdown sshd and some services that may be present in some installations like rsync and exim.&lt;br /&gt;
&lt;br /&gt;
The script attempts to avoid causing &amp;quot;reboot required&amp;quot; by stopping the upgrade if any cygwin processes are found to be running. &amp;quot;Reboot required&amp;quot; indicates that some cygwin program was running while the upgrade process was running and this usually IRRETRIEVABLY BREAKS the cygwin functionality because cygwin&#039;s upgrade isnt smart enough to deal with this.&lt;br /&gt;
&lt;br /&gt;
It is quite likely that a reboot will NOT solve various problems.&lt;br /&gt;
&lt;br /&gt;
Rerunning the script will not show the errors again but the problem of bad upgrade.&lt;br /&gt;
&lt;br /&gt;
SOLUTION: You should completely clean out all traces of cygwin in the computer and then reinstall cygwin completely from scratch. How to clean thoroughly is documented in wiki.&lt;br /&gt;
&lt;br /&gt;
===== Finding the script =====&lt;br /&gt;
&lt;br /&gt;
The script is installed in the neosys\neosys directory or for older versions of NEOSYS it can be created or upgraded as follows:&lt;br /&gt;
&lt;br /&gt;
First find the text of the script at http://www.neosys.com/support/upgradecygwin.cmd&lt;br /&gt;
&lt;br /&gt;
Then, assuming that NEOSYS is installed in the root directory of D:&lt;br /&gt;
&lt;br /&gt;
Single installation&lt;br /&gt;
 notepad d:\neosys\neosys\upgradecygwin.cmdzz&lt;br /&gt;
&lt;br /&gt;
Multiple installation&lt;br /&gt;
 notepad d:\hosts\CLIENTCODE\neosys\upgradecygwin.cmd&lt;br /&gt;
&lt;br /&gt;
==== How to check Cygwin version ?  ====&lt;br /&gt;
&lt;br /&gt;
If you are looking for the version number for the whole Cygwin release, there is none. &lt;br /&gt;
&lt;br /&gt;
Each package in the Cygwin release has its own version. You can find out the Cygwin.dll version by using the following command:&lt;br /&gt;
&lt;br /&gt;
 cygcheck -V&lt;br /&gt;
&lt;br /&gt;
To find the version of the Cygwin Package installed, you can use &lt;br /&gt;
&lt;br /&gt;
 cygcheck -c PACKAGE_NAME&lt;br /&gt;
&lt;br /&gt;
eg - To check the version of the openssh package you will have to type the following command in cygwin:&lt;br /&gt;
&lt;br /&gt;
 cygcheck -c openssh&lt;br /&gt;
&lt;br /&gt;
The output should be as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package           Version           Status&lt;br /&gt;
 openssh           6.0p1-2             OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to uninstall/reinstall cygwin ==&lt;br /&gt;
&lt;br /&gt;
With setup.exe (the installer file of cygwin) you can uninstall individual packages but not Cygwin.&lt;br /&gt;
&lt;br /&gt;
Before you do this, make sure you have stopped the cygwin service (NET STOP SSHD), removed the sshd server (cygrunsrv -R sshd), deleted the sshd &amp;amp; sshd_server users (net user sshd /DELETE)&lt;br /&gt;
&lt;br /&gt;
To uninstall Cygwin you have to run the following in DOS prompt:&lt;br /&gt;
&lt;br /&gt;
 rmdir /s /q C:\cygwin&lt;br /&gt;
&lt;br /&gt;
You cannot delete the cygwin folder from Windows explorer due to a Access Denied error and this is the best way to uninstall cygwin.&lt;br /&gt;
&lt;br /&gt;
== Adding packages to Cygwin after installation ==&lt;br /&gt;
&lt;br /&gt;
Adding packages causes Cygwin to also upgrade but upgrade requires a special process because it cant be upgraded remotely while Cygwin sshd server is working.&lt;br /&gt;
&lt;br /&gt;
#Upgrade Cygwin&lt;br /&gt;
#Add the package using Cygwin normal setup program&lt;br /&gt;
&lt;br /&gt;
Step 1 is NOT optional if you want to do step 2.&lt;br /&gt;
&lt;br /&gt;
In the above procedure upgrade Cygwin using the script and follow the precautionary measures listed in [[Setting up and using remote support#Upgrading Cygwin with a script | Upgrade using script]], in case script fails to renable ssh remote connection. Next run setup.exe file present in D:\neosys\neosys to install the required the package.&lt;br /&gt;
&lt;br /&gt;
=== Adding individual packages to cygwin without doing a full upgrade ===&lt;br /&gt;
&lt;br /&gt;
You can add individual packages to cygwin without doing a full upgrade in many cases. The installed or upgraded version of cygwin should be recent since the current version of the package you want to install might not work with an old version installed cygwin.dll.&lt;br /&gt;
&lt;br /&gt;
To figure out if the cygwin version is recent and will be compatible with the new package, compare the current installed version with the latest version of cygwin.&lt;br /&gt;
&lt;br /&gt;
Cygwin DLL has been named cygwin1.dll and the number 1 is present in the beginning of the release name. Additionally there are DLL major and minor numbers that correspond to the name of the release and a release number respectively. The major version number gets incremented only when a change is made that makes existing software incompatible. The minor version changes every time a new backward compatible Cygwin release is made available. Therefore we need to check the major version of cygwin on the server.&lt;br /&gt;
&lt;br /&gt;
In other words cygwin-1.7.1-2 means cygwin1.dll, major version 7, minor version 1 and release 2.&lt;br /&gt;
&lt;br /&gt;
e.g if the current version of Cygwin DLL is 2.3.0 and latest version is 2.4.1-1 that means there is a change in the major version from 3 to 4 so we cannot go ahead with installing a new package.&lt;br /&gt;
&lt;br /&gt;
Commands below to add or remove packages. Press the View button repeatedly in the installation wizard to get to &amp;quot;Pending&amp;quot; to see what will be installed.&lt;br /&gt;
 #adding&lt;br /&gt;
 setup-x86 -P PACKAGE_NAME&lt;br /&gt;
&lt;br /&gt;
 #removing&lt;br /&gt;
 setup-x86 -x PACKAGE_NAME&lt;br /&gt;
&lt;br /&gt;
== Getting Ownership and Permissions Correct ==&lt;br /&gt;
&lt;br /&gt;
Installation of cygwin under domain administrator account needs to be fixed as follows:&lt;br /&gt;
&lt;br /&gt;
#c:\cygwin Properties, Security, Advanced&lt;br /&gt;
#Change owner to: Administrators&lt;br /&gt;
#Tick: Replace owner on subcontainers&lt;br /&gt;
&lt;br /&gt;
After changing ownership of all cygwin folders to Administrators all ssh login will be blocked and you will get a windows application event log message. &amp;quot;root&amp;quot; actually means sshd&#039;s user which is sshd_server by default or can be found in the cygwin ssh windows services properties under log on&lt;br /&gt;
&lt;br /&gt;
 fatal: /var/empty must be owned by root and not group or world-writable.&lt;br /&gt;
&lt;br /&gt;
Fix this in cygwin console as follows:&lt;br /&gt;
&lt;br /&gt;
 chown sshd_server /var/empty&lt;br /&gt;
&lt;br /&gt;
== Configuring Firewall/Router ==&lt;br /&gt;
&lt;br /&gt;
You will have to port forward 19580 on the router to port 19580 on the neosys server. Some routers call port forwarding “port mapping” or “virtual servers”&lt;br /&gt;
&lt;br /&gt;
It is BAD idea to simply open port 22 since an open port 22 attracts scanners/hackers like flies.&lt;br /&gt;
&lt;br /&gt;
Configure port forwarding of port 4430 ONLY if access from outside office is required by the client. Support MUST obtain Client management permission before port forwarding 4430.&lt;br /&gt;
&lt;br /&gt;
== Configuring Specific Client Routers ==&lt;br /&gt;
&lt;br /&gt;
[[Adline Dubai - CISCO PIX Firewall]]&lt;br /&gt;
&lt;br /&gt;
[[Sonicwall Firewall Configuration]]&lt;br /&gt;
&lt;br /&gt;
== How to install ssh on port 19580 over vnc on port 19580 ==&lt;br /&gt;
&lt;br /&gt;
Install vnc on port 19580&lt;br /&gt;
 &lt;br /&gt;
connect on vnc&lt;br /&gt;
 &lt;br /&gt;
setup cygwin sshd on port 22&lt;br /&gt;
 &lt;br /&gt;
test you can login on port 22&lt;br /&gt;
&lt;br /&gt;
 ssh neosys@127.0.0.1&lt;br /&gt;
 &lt;br /&gt;
change sshd port to 19580 (but it wont start)&lt;br /&gt;
 &lt;br /&gt;
schedule a windows system reboot in 10 mins at windows command prompt&lt;br /&gt;
 &lt;br /&gt;
 shutdown -t 600&lt;br /&gt;
 &lt;br /&gt;
change vnc port to 5900 (if will disconnect you)&lt;br /&gt;
 &lt;br /&gt;
wait for 10 mins and try to ssh login on port 19580&lt;br /&gt;
&lt;br /&gt;
== Changing user on Cygwin==&lt;br /&gt;
&lt;br /&gt;
On SSH command line:&lt;br /&gt;
&lt;br /&gt;
 ssh neosys@127.0.0.1 (where &#039;neosys&#039; is the username)&lt;br /&gt;
&lt;br /&gt;
== Installing and configuring UltraVNC ==&lt;br /&gt;
&lt;br /&gt;
VNC/Putty is not typically used for NEOSYS remote support anymore and has been replaced by tunnelier/rdp&lt;br /&gt;
&lt;br /&gt;
[[Installing and configuring UltraVNC]]&lt;br /&gt;
&lt;br /&gt;
== Remote Desktop Connection ==&lt;br /&gt;
&lt;br /&gt;
Servers are normally not exposed to the internet so IT staff and suppliers are often not careful to use strong passwords and use things like &amp;quot;password&amp;quot; or blank.&lt;br /&gt;
&lt;br /&gt;
Given the above, it is NEOSYS policy NOT to use remote desktop via direct access from the internet at all and especially not long term. This is to prevent worms from instantly discovering possible entry points - typically before NEOSYS can even begin to enforce strong administrator password.&lt;br /&gt;
&lt;br /&gt;
If it is otherwise IMPOSSIBLE (difficult or inconvenient does NOT count as impossible!) to avoid using remote desktop protocol to the public internet then a simple and effective way of significantly increasing security is to change the remote desktop port from 3389 to something else e.g. 33890 as per NEOSYS convention.&lt;br /&gt;
&lt;br /&gt;
=== Changing RDC port from standard to nonstandard ===&lt;br /&gt;
&lt;br /&gt;
# Start Registry Editor.&lt;br /&gt;
# Locate and then click the following registry subkey:&lt;br /&gt;
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber&lt;br /&gt;
# On the Edit menu, click Modify, and then click Decimal.&lt;br /&gt;
# Type the new port number, and then click OK.&lt;br /&gt;
# Quit Registry Editor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solving &amp;quot;Authentication that can continue: publickey,password&amp;quot; Error when connecting to remote servers via remote access clients ==&lt;br /&gt;
&lt;br /&gt;
Some remote access clients cannot connect to ssh servers without special configuration.&lt;br /&gt;
&lt;br /&gt;
For example remina/ssh cannot connect to windows/cygwin/sshd in their default configuration.&lt;br /&gt;
&lt;br /&gt;
=== Error Message ===&lt;br /&gt;
[[Image:Sshremmina.jpg]]&lt;br /&gt;
&lt;br /&gt;
 SSH password authentication failed: Access denied. Authentication that can continue: publickey,password,keyboard-interactive&lt;br /&gt;
&lt;br /&gt;
=== Solution 1 ===&lt;br /&gt;
&lt;br /&gt;
If possible configure the client to not perform challenge response during login.&lt;br /&gt;
&lt;br /&gt;
There appears to be no way to do this for remina currently&lt;br /&gt;
&lt;br /&gt;
=== Solution 2 ===&lt;br /&gt;
&lt;br /&gt;
On the target server:&lt;br /&gt;
&lt;br /&gt;
Edit the ssh service configuration&lt;br /&gt;
&lt;br /&gt;
  nano /etc/sshd_config&lt;br /&gt;
&lt;br /&gt;
Add the last line to the following section&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Change to no to disable s/key passwords&lt;br /&gt;
#ChallengeResponseAuthentication yes&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the ssh service&lt;br /&gt;
&lt;br /&gt;
 net stop sshd&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
Check that you can login using password from one workstation and it will be solved for all workstations for that server&lt;br /&gt;
&lt;br /&gt;
=== Solution 3 ===&lt;br /&gt;
&lt;br /&gt;
On a client workstation:&lt;br /&gt;
&lt;br /&gt;
#Use the autologin.sh script to configure automatic login. Refer [[Backup_and_Restore#Creating.2FUpgrading_autologin.sh_if_it_doesn.E2.80.99t_exist_or_is_out_of_date| Autologin.sh]]&lt;br /&gt;
#For &amp;quot;Authentication/Login Method&amp;quot; choose option &amp;quot;Public Key&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Check that you can login using password. This will have to be done on every workstation for every server so is rather tedious but it does not require reconfiguration of the server.&lt;br /&gt;
&lt;br /&gt;
=== Solution 4 ===&lt;br /&gt;
&lt;br /&gt;
On the target server, check whether authorized_keys file contains your public key. You can do that by checking the user name displayed at the end of each key.&lt;br /&gt;
&lt;br /&gt;
To view the authorized_keys file, open cygwin terminal and type&lt;br /&gt;
&lt;br /&gt;
 cat .ssh/authorized_keys&lt;br /&gt;
&lt;br /&gt;
If authorized_keys file does not contain your public key, then copy it from authorized_keys.backup file using the below command:&lt;br /&gt;
&lt;br /&gt;
 cat .ssh/authorized_keys.backup&lt;br /&gt;
&lt;br /&gt;
Next edit the authorized_keys file using the below command:&lt;br /&gt;
&lt;br /&gt;
 nano .ssh/authorized_keys&lt;br /&gt;
&lt;br /&gt;
Then paste the copied key in a new line. Ensure that the key appears in a single line and then close the authorized_keys file.&lt;br /&gt;
&lt;br /&gt;
Check that you can connect to the target server using automatic SSH authentication (SSH Agent or Public key)&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Setting_up_and_using_remote_support&amp;diff=2693</id>
		<title>Setting up and using remote support</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Setting_up_and_using_remote_support&amp;diff=2693"/>
		<updated>2016-05-21T10:36:34Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Configuring and starting SSHD */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Getting agreement of client IT staff to provide remote support ==&lt;br /&gt;
&lt;br /&gt;
[[Letter to obtain agreement of client IT staff to provide remote support]]&lt;br /&gt;
&lt;br /&gt;
== Initial Connection to the server before setting up permanent remote connection ==&lt;br /&gt;
&lt;br /&gt;
In case of a remote installation you need to get an initial connection to the server before you can setup Cygwin for a permanent remote connection. For this purpose you can either use your customised reverse connect UltraVNC SC file or the one-time run Teamviewer utility.&lt;br /&gt;
&lt;br /&gt;
Support MUST not provide NEOSYS support via Microsoft Remote Desktop Client (RDP/RDC) on port 3389 at anytime because it is a BAD idea to simply open port 3389 since an open port 3389 attracts scanners/hackers like flies. &lt;br /&gt;
&lt;br /&gt;
Also, IT suppliers not aware of the situation often setup the initial administrator password to something obvious like &amp;quot;password&amp;quot; or the arent-I-clever &amp;quot;P@ssw0rd&amp;quot; or even blank. In this case there is a good chance internet worms will discover the &amp;quot;open door&amp;quot; and install themselves before you get the chance to put a strong password.&lt;br /&gt;
&lt;br /&gt;
If the client has already gone ahead and provided Microsoft RDP with an obvious/weak system password, then Support MANDATORY MUST get Windows reinstalled from scratch. Antivirus may not be able to tell that the server has been infected and rootkitted and therefore a scan does not prove it has not been infected.&lt;br /&gt;
&lt;br /&gt;
== Installing and configuring SSH ==&lt;br /&gt;
=== Installing Cygwin with OPENSSH ===&lt;br /&gt;
&lt;br /&gt;
These instruction are only for installing in a server NOT part of a domain. For installing in a server that is part of a domain, see http://cygwin.com/faq-nochunks.html#faq.using.sshd-in-domain&lt;br /&gt;
&lt;br /&gt;
Watch out for non-intuitive steps like clicking &amp;quot;skip&amp;quot; to install something.&lt;br /&gt;
&lt;br /&gt;
# Read [[Avoiding Corrupt Cygwin Installations]]&lt;br /&gt;
# ENSURE that you are logged in as the local (NOT DOMAIN) administrator&lt;br /&gt;
# Download/Run/Install http://www.cygwin.com/setup.exe&amp;lt;br&amp;gt;(you might have to go to the home page http://www.cygwin.com and click the link to setup.exe)&lt;br /&gt;
# Download source: &#039;&#039;&#039;Install from Internet&#039;&#039;&#039;&lt;br /&gt;
# Root Directory: &#039;&#039;&#039;c:\cygwin&#039;&#039;&#039;&lt;br /&gt;
# Local Package Directory: &#039;&#039;&#039;c:\cygwin.lib&#039;&#039;&#039;&lt;br /&gt;
# Choose &amp;quot;yes&amp;quot; to &amp;quot;Folder does not exist. Create new?&amp;quot;&lt;br /&gt;
# Internet Connection: &#039;&#039;&#039;Direct Connection&#039;&#039;&#039;&lt;br /&gt;
# Download Site: &#039;&#039;&#039;http://mirrors.kernel.org&#039;&#039;&#039; (near the bottom)&amp;lt;br&amp;gt;(If this does not show in the list, key in the URL in the field &#039;&#039;&#039;User URL&#039;&#039;&#039; and click on Add)&lt;br /&gt;
# Select Packages: Maximise window then click &#039;&#039;&#039;View&#039;&#039;&#039; once to get &#039;&#039;&#039;Full&#039;&#039;&#039;. You can then enter the name of the desired packages in the Search box to speed up location of the desired packages.&lt;br /&gt;
# Next to the package &#039;&#039;&#039;OPENSSH&#039;&#039;&#039;, click the word &#039;&#039;&#039;Skip&#039;&#039;&#039; (once!) to get version 4.4p1-1 or later&lt;br /&gt;
# Next to the package &#039;&#039;&#039;NANO&#039;&#039;&#039;, click the word &#039;&#039;&#039;Skip&#039;&#039;&#039; (once!) to get the latest version available&lt;br /&gt;
# Check the NEOSYS INSTALLATION CHECKLIST for any other packages to install like the above.&lt;br /&gt;
# Click Next and complete the installation&lt;br /&gt;
&lt;br /&gt;
=== Win32 Error ===&lt;br /&gt;
&lt;br /&gt;
The Win32 Error occur when the bad file is cached in internet explorer cache. You can try clearing the internet explorer cache and redownloading or you can try to download from cygwin.com instead of www.cygwin.com so it doesnt look in the cache or www.cygwin.com if your original download was from cygwin.com. All else failing, you can simply upload the setup.exe file from your own pc to the server. &lt;br /&gt;
&lt;br /&gt;
All this relates to win32 error when running a downloaded file. Any downloaded file and not just cygwin.com/setup.exe&lt;br /&gt;
&lt;br /&gt;
===Error during setup===&lt;br /&gt;
&lt;br /&gt;
In case of the following error, check for proxy settings in internet explorer. It is possible that the client uses a proxy setting. In that case, in Step 7 instead of choosing &amp;lt;b&amp;gt;Direct Connection&amp;lt;/b&amp;gt;, choose &amp;lt;b&amp;gt;Use Internet Explorer Proxy Setting&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 Unable to get setup.ini from &amp;lt;http://mirrors.kernel.org/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Cygwin install error.png]]&lt;br /&gt;
&lt;br /&gt;
=== Configuring and starting SSHD ===&lt;br /&gt;
Open the Cygwin icon to get a linux/bash command line and type:&lt;br /&gt;
&lt;br /&gt;
Run the following commands: (not needed in recent versions of Cygwin so dont do this)&lt;br /&gt;
&lt;br /&gt;
 chmod +r /etc/passwd&lt;br /&gt;
 chmod +r /etc/group&lt;br /&gt;
 chmod 777 /var&lt;br /&gt;
&lt;br /&gt;
Refer [[Setting_up_and_using_remote_support#Reinstalling_SSHD_if_service_fails_to_startup| here]] if you get an error while doing the above steps.&lt;br /&gt;
&lt;br /&gt;
Prevent cygwin from using Unix like permissions on files it creates&lt;br /&gt;
&lt;br /&gt;
 nano /etc/fstab&lt;br /&gt;
&lt;br /&gt;
add the line or just add &amp;quot;,noacl&amp;quot; to the existing similar line. (What is the effect of omitting this?)&lt;br /&gt;
&lt;br /&gt;
 none /cygdrive cygdrive binary,posix=0,user,noacl 0 0&lt;br /&gt;
&lt;br /&gt;
Thereafter start with the ssh configuration:&lt;br /&gt;
&lt;br /&gt;
 ssh-host-config&lt;br /&gt;
&lt;br /&gt;
Then on the following options type:&lt;br /&gt;
 Only asked if running again:&lt;br /&gt;
 Overwrite existing /etc/ssh_config file? yes&lt;br /&gt;
 Overwrite existing /etc/sshs_config file? yes&lt;br /&gt;
 .&lt;br /&gt;
 StrictModes                 -   no&lt;br /&gt;
 Privilege                   –   yes&lt;br /&gt;
 New local sshd account      -   yes&lt;br /&gt;
 Install SSHD as a service   -   yes&lt;br /&gt;
 Enter value of daemon       -   Just press Enter&lt;br /&gt;
 Different name              -   no&lt;br /&gt;
 Create new privileged user  -   yes&lt;br /&gt;
 Enter a password now        -   Invent a NEW totally random password with caps and both upper and lower case.&lt;br /&gt;
 Re-enter the password       -   Enter it again. Dont record it anywhere. Forget it.&lt;br /&gt;
&lt;br /&gt;
At the command prompt type&lt;br /&gt;
&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
=== Configuring SSHD to use a non-standard port number ===&lt;br /&gt;
This is necessary if the router cannot forward port 19580 --&amp;gt; 22 and we don’t want to open port 22 directly.&lt;br /&gt;
&lt;br /&gt;
Capitalization is signification in cygwin/linux commands&lt;br /&gt;
&lt;br /&gt;
open cygwin command prompt&lt;br /&gt;
 cd /etc&lt;br /&gt;
 chown administrator sshd_config&lt;br /&gt;
 nano sshd_config (assuming that you have installed the NANO editor)&lt;br /&gt;
 notepad sshd_config (incase you havent installed the NANO editor)&lt;br /&gt;
Move your cursor to &#039;&#039;&#039;Port 22&#039;&#039;&#039; and change 22 to 19580. &amp;lt;br&amp;gt;&lt;br /&gt;
Also add the last line to the following section. Refer [[Setting_up_and_using_remote_support#Solving_.22Authentication_that_can_continue:_publickey.2Cpassword.22_Error_when_connecting_to_remote_servers_via_remote_access_clients| Error when connecting to remote servers]] to see why this line is added.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Change to no to disable s/key passwords&lt;br /&gt;
#ChallengeResponseAuthentication yes&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Press Ctrl+x to save. On the confirmation type Y and on the next prompt hit enter.&lt;br /&gt;
 chown system sshd_config&lt;br /&gt;
 net stop sshd&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
To check that the connection to port 19580 is successful you can run the following test:&lt;br /&gt;
 ssh -p 19580 administrator@localhost&lt;br /&gt;
&lt;br /&gt;
You will be prompted to confirm the connection (say yes)&lt;br /&gt;
&lt;br /&gt;
Now enter the system password to complete the procedure.&lt;br /&gt;
&lt;br /&gt;
=== Changing ssh login from “Administrator” to “administrator” ===&lt;br /&gt;
Current NEOSYS policy to cater for recent versions of Cygwin is to rename the windows Administrator user to administrator to keep a consistent ssh login across all installations.&lt;br /&gt;
&lt;br /&gt;
If you forget to do this before installing or upgrading Cygwin then you must to the following:&lt;br /&gt;
&lt;br /&gt;
#Rename “Administrator” to “administrator” in Windows&lt;br /&gt;
#*If you cannot rename Administrator to administrator, follow the procedure mentioned at [[Changing username from Administrator to administrator]]&lt;br /&gt;
#In a Cygwin console do:&lt;br /&gt;
&lt;br /&gt;
 mkpasswd &amp;gt; /etc/passwd&lt;br /&gt;
&lt;br /&gt;
It should come back with nothing&lt;br /&gt;
&lt;br /&gt;
=== Error while changing Cygwin port 22 to 19580 ===&lt;br /&gt;
&lt;br /&gt;
Error Message:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;Could not open file for writing: permission denied&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Occurrence:&lt;br /&gt;
Sometimes when you edit the sshd_config file through NANO.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
In SSH shell, follow these commands:&lt;br /&gt;
&lt;br /&gt;
 cp sshd_config ashwin_temp #copies sshd_config to a new file ashwin_temp&lt;br /&gt;
 rm sshd_config             #deletes sshd_config&lt;br /&gt;
 cp ashwin_temp sshd_config #copies ashwin_temp to sshd_config&lt;br /&gt;
&lt;br /&gt;
In case it does not copy sshd_config to ashwin_temp, than check whether an ashwin_temp filename exists and delete it using the rm command.&lt;br /&gt;
&lt;br /&gt;
=== Opening up ssh connections to additional source ip nos ===&lt;br /&gt;
&lt;br /&gt;
Starting a NEOSYS process will automatically restrict cygwin ssh to accept connections from known NEOSYS company static ip numbers.&lt;br /&gt;
&lt;br /&gt;
In the cygwin command line, insert a line in the list of allowable hosts&lt;br /&gt;
&lt;br /&gt;
DO NOT ALLOW ALL OR GENERAL SSH ACCESS TO NEOSYS CLIENTS SERVERS WITHOUT GETTING PERMISSION *AND* INSTALLING EMAIL ALERTS FOR LOGINS AS DESCRIBED BELOW&lt;br /&gt;
&lt;br /&gt;
 nano /etc/hosts.allow&lt;br /&gt;
&lt;br /&gt;
 sshd: ALL&lt;br /&gt;
&lt;br /&gt;
or a ip numbers or CIDR format&lt;br /&gt;
&lt;br /&gt;
 sshd 12.34.56.78&lt;br /&gt;
 sshd 12.34.0.0/16&lt;br /&gt;
&lt;br /&gt;
=== Setting up email alerts for cygwin ssh logins  ===&lt;br /&gt;
&lt;br /&gt;
Use http://www.cygwin.com/setup.exe to install &amp;quot;email&amp;quot; and &amp;quot;whois&amp;quot; packages&lt;br /&gt;
&lt;br /&gt;
Insert the following script using cygwin command prompt.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;NOTE! it@neosys.com to whatever you want.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 cd /etc&lt;br /&gt;
 nano sshrc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#&lt;br /&gt;
#you configure this&lt;br /&gt;
&lt;br /&gt;
ALERTEMAILADDRESS=it@neosys.com&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get the ip number without the ipv6 prefix&lt;br /&gt;
FROMIPNO=`echo $SSH_CLIENT|cut -f 1 -d &amp;quot; &amp;quot;|sed &#039;s/::ffff://&#039;`&lt;br /&gt;
#&lt;br /&gt;
#quit with no message if from a known host&lt;br /&gt;
&lt;br /&gt;
if grep -x $FROMIPNO /etc/trustedipnos&lt;br /&gt;
then exit&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get the host name by reverse lookup&lt;br /&gt;
&lt;br /&gt;
FROMHOST=`nslookup $FROMIPNO|grep &amp;quot;name =&amp;quot;`&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
#get whois info about the login ip number&lt;br /&gt;
&lt;br /&gt;
#and pipe it into the mail program&lt;br /&gt;
#&amp;quot;&amp;amp;&amp;quot; on the end creates a new process in order not to delay login&lt;br /&gt;
&lt;br /&gt;
whois $FROMIPNO|\&lt;br /&gt;
email -q -f nl1@neosys.com -s &amp;quot;login $USER $FROMIPNO $FROMHOST&amp;quot; -r \&lt;br /&gt;
mailout.neosys.com -p 2500 $ALERTEMAILADDRESS&amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that you configure the file permissions&lt;br /&gt;
&lt;br /&gt;
 chmod a+x sshrc&lt;br /&gt;
&lt;br /&gt;
Inserted trusted ip nos.&lt;br /&gt;
&lt;br /&gt;
 cd /etc&lt;br /&gt;
 nano trustedipnos&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#sorry, ip ranges and cidr etc not accepted yet&lt;br /&gt;
&lt;br /&gt;
#vm1.neosys.com for remote checking&lt;br /&gt;
85.17.154.105&lt;br /&gt;
&lt;br /&gt;
#nl1.neosys.com&lt;br /&gt;
83.149.104.167&lt;br /&gt;
&lt;br /&gt;
#nl2.neosys.com&lt;br /&gt;
85.17.154.66&lt;br /&gt;
&lt;br /&gt;
#uk.neosys.com&lt;br /&gt;
78.143.212.191&lt;br /&gt;
&lt;br /&gt;
#nl3.neosys.com&lt;br /&gt;
94.75.233.2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that you configure the file permissions&lt;br /&gt;
&lt;br /&gt;
 chmod a+x sshrc&lt;br /&gt;
&lt;br /&gt;
=== Testing SSH connection to the NEOSYS server over port 19580 ===&lt;br /&gt;
&lt;br /&gt;
If you cannot connect to the server using SSH, see [[Troubleshooting_NEOSYS_Generally#Troubleshooting_NEOSYS_remote_support_port_forwarding|Troubleshooting NEOSYS remote support port forwarding]]&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting SSH: If SSH connects and then disconnects immediately without exchanging keys ===&lt;br /&gt;
 &lt;br /&gt;
The first time that NEOSYS runs, it automatically adds source ip number restrictions to the sshd remote support configuration in /etc/hosts.allow and /etc/hosts.deny. This is an important security procedure to allow connection to clients systems from NEOSYS ip numbers only. This process allows only local and known NEOSYS ip numbers to connect using SSH. Upgrading NEOSYS will add and/or remove allowable ip numbers as NEOSYS configuration changes.&lt;br /&gt;
&lt;br /&gt;
It is possible that in some client network configurations incoming ssh connections will appear to be from the clients internal routers with an ip unknown to NEOSYS due to NAT configurations. Therefore ssh connections will be blocked unless specifically allow the local ip number or it is added into an upgraded version of NEOSYS.&lt;br /&gt;
&lt;br /&gt;
NOTE: Therefore you must check that remote support via ssh works AFTER you have run NEOSYS once (maintenance mode). &lt;br /&gt;
 &lt;br /&gt;
#Look in the Windows, Computer Management, System Tools, Event Viewer, Application&lt;br /&gt;
#Search for entries from source &amp;quot;sshd&amp;quot;, double click and look in the Event Properties, Description for ip numbers&lt;br /&gt;
#Information type sshd entries will give the ip number of successful sshd connections.&lt;br /&gt;
#Warning type sshd entries will give the ip number of failed sshd connections.&lt;br /&gt;
#Find the ip number of failed connections.&lt;br /&gt;
&lt;br /&gt;
==== Possible Problem 1 - Port mapping in router is using NAT ====&lt;br /&gt;
&lt;br /&gt;
If the ip number of failed connections is some local ip number (of the router for example) then possibly the inbound port forwarding has been done with NAT and the source ip number has been lost. Therefore the NEOSYS ip restrictions are blocking ssh connections because they appear to be coming from an unknown ip number (ie that of the router)&lt;br /&gt;
&lt;br /&gt;
==== Solution 1A ====&lt;br /&gt;
&lt;br /&gt;
Change the router configuration to not use NAT and leave the genuine original source IP number&lt;br /&gt;
&lt;br /&gt;
==== Solution 1B ====&lt;br /&gt;
The router is sadly using NAT instead of plain old port forwarding.&lt;br /&gt;
&lt;br /&gt;
DO NOT USE THIS PROCEDURE TO BREAK NEOSYS SECURITY. DO NOT GRANT ACCESS TO ANY IP OTHER THAN CLIENTS ROUTER IPS&lt;br /&gt;
&lt;br /&gt;
The solution is to add NAT router IP to the list of authorised IP numbers on the NEOSYS server. This solution provides access to NEOSYS server from outside office unrestricted by IP number, hence Client Management approval must be obtained before this solution is applied.&lt;br /&gt;
&lt;br /&gt;
Sample Email to Management-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Dear XXXX,&lt;br /&gt;
 &lt;br /&gt;
 Support must have remote access to the NEOSYS server via SSH but currently we don’t have access.&lt;br /&gt;
 &lt;br /&gt;
 This is because your router is using NAT. The NAT router translates the source IP to its own hence the source IP is lost. NEOSYS server &lt;br /&gt;
 has  a list of allowed source IPs and since the router’s IP is not in the list, connection fails.&lt;br /&gt;
 &lt;br /&gt;
 The solution to establish successful connectivity is to allow access to NEOSYS server from your NAT router by adding the router’s IP in&lt;br /&gt;
 list of allowed IPs on the server.&lt;br /&gt;
 &lt;br /&gt;
 We need your agreement to carry out this solution because authorizing this access means access to NEOSYS from outside office will not be  &lt;br /&gt;
 restricted by IP any more.&lt;br /&gt;
 &lt;br /&gt;
 Please confirm that this solution is OK.&lt;br /&gt;
 &lt;br /&gt;
 Best Regards&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
On receipt of Management approval, add the routers IP number to the list of authorised IP numbers in the cygwin hosts.allow file as follows:&lt;br /&gt;
&lt;br /&gt;
 nano /etc/hosts.allow&lt;br /&gt;
&lt;br /&gt;
and add the line as follows but put the IP number of your router&lt;br /&gt;
&lt;br /&gt;
 sshd: allow 192.168.0.99&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Warning&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#If the router IP changes then NEOSYS remote support will fail until this line is changed&lt;br /&gt;
#Do not grant access to 192.168.* etc. since this allows local LAN viruses to attack&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting sshd ===&lt;br /&gt;
&lt;br /&gt;
You can run the sshd service interactively to see all messages instead of having to search logs/events etc.&lt;br /&gt;
&lt;br /&gt;
Unfortunately this will not work the same as the normal windows sshd service unless you assume the identity of the sshd_server user. To assume the identity of the sshd_server user you will have to reset its password to something new (since we dont take a record of it during sshd-host-setup) AND ALSO place the new password in the logon properties of the sshd windows service.&lt;br /&gt;
&lt;br /&gt;
 su sshd_server&lt;br /&gt;
 /usr/sbin/sshd -D -p 19580&lt;br /&gt;
&lt;br /&gt;
=== Reinstalling SSHD if service fails to startup ===&lt;br /&gt;
&lt;br /&gt;
====Error message====&lt;br /&gt;
 chmod: cannot access &#039;/etc/passwd&#039;: No such file or directory&lt;br /&gt;
 chmod: cannot access ‘/etc/group’: No such file or directory&lt;br /&gt;
&lt;br /&gt;
====Solution====&lt;br /&gt;
Sometimes reinstallation isnt necessary and sshd can be made to restart by doing&lt;br /&gt;
 &lt;br /&gt;
 mkpasswd &amp;gt; /etc/passwd&lt;br /&gt;
 mkgroup &amp;gt; /etc/group&lt;br /&gt;
&lt;br /&gt;
If all else fails:&lt;br /&gt;
&lt;br /&gt;
#Look in &#039;&#039;&#039;/var/log/sshd.log&#039;&#039;&#039; for errors&lt;br /&gt;
#Delete the following users: &#039;&#039;&#039;sshd&#039;&#039;&#039; and &#039;&#039;&#039;sshd_server&#039;&#039;&#039;&lt;br /&gt;
#Remove the sshd service at the cygwin prompt type &#039;&#039;&#039;cygrunsrv –R sshd&#039;&#039;&#039;&lt;br /&gt;
#Do the above Configuration and starting SSHD step again&lt;br /&gt;
&lt;br /&gt;
Note that you don&#039;t have to reinstall cygwin entirely, just sshd with the above steps.&lt;br /&gt;
&lt;br /&gt;
== Upgrading SSHD / Cygwin ==&lt;br /&gt;
NEOSYS relies on cygwin to provide secure network access and support various linux/unix services under Windows, mainly rsync for interoffice consolidation.&lt;br /&gt;
&lt;br /&gt;
Just like MS Windows update, cygwin should be updated at regular intervals to close security holes discovered in the software by its authors. This is particularly important for cygwin&#039;s remote access service sshd since it is exposed to the internet although on a non-standard port.&lt;br /&gt;
&lt;br /&gt;
Join the cygwin and sshd security news email lists to learn about when cygwin upgrades sshd and/or when there are issues generally with sshd&lt;br /&gt;
&lt;br /&gt;
To find out what versions of cygwin/sshd are installed at NEOSYS clients, in Nagios check &amp;quot;Status Information&amp;quot; of the neosys-ssh service &lt;br /&gt;
&lt;br /&gt;
 SSH OK - OpenSSH_5.9 (protocol 2.0) &lt;br /&gt;
&lt;br /&gt;
=== Upgrading Cygwin remotely ===&lt;br /&gt;
&lt;br /&gt;
NEOSYS normal remote server support connection uses cygwin/ssh. Cygwin can be upgraded while in use with a script as explained in the section below.&lt;br /&gt;
&lt;br /&gt;
==== Upgrading Cygwin with a script ====&lt;br /&gt;
&lt;br /&gt;
The following script can be used to automatically upgrade cygwin to the latest version quite easily even when people are using NEOSYS. However it carries a small risk described below.&lt;br /&gt;
&lt;br /&gt;
WARNING This script temporarily disconnects and disables all ssh remote support connections, including any ssh connection you are using to initiate the process, for the duration of the upgrade.&lt;br /&gt;
&lt;br /&gt;
Since something may go wrong and the script might FAIL to re enable ssh remote connections, you can take one of the precautionary measures listed below.&lt;br /&gt;
&lt;br /&gt;
* either perform a temporary Teamviewer installation. The quick teamviewer zero installation remote support method will not work under rdp/tunnelier/remmina&lt;br /&gt;
* or ensure that client IT support is available ONSITE to provide temporary teamviewer access in the event of any problem&lt;br /&gt;
* or be prepared to lose the ability to provide remote support to the installation until the previous item is available&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TeamViewer 9 issue&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When attempting to connect to client server via TeamViewer 9 (setup via Tunnelier with unattended access) it shows the error below&lt;br /&gt;
&lt;br /&gt;
[[File:TVerror.jpg]]&lt;br /&gt;
&lt;br /&gt;
SOLUTION: Install TeamViewer 7 which does not give this error. Contact NEOSYS IT for TeamViewer7 commercial license. You must have the client server&#039;s administrator password to login using TeamViewer. After the upgrade, REMOVE SETTINGS for unattended access and UNINSTALL Teamviewer. Teamviewer must NOT BE LEFT with permanent login by number and password! Teamviewer options, security, REMOVE &amp;quot;Predefined password (For unattended access)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===== Running the script =====&lt;br /&gt;
&lt;br /&gt;
[[Setting_up_and_using_remote_support#Finding_the_script|Just locate the upgradecygwin.cmd script]] and run it some usual way by clicking and pressing Enter. &lt;br /&gt;
&lt;br /&gt;
You MUST inspect the version of the pre-installed script against the http version and upgrade to the latest. As the script is updated with fixes for problems faced in the past.&lt;br /&gt;
&lt;br /&gt;
If you initiate the script while connected on ssh using tunnelier/remmina etc. half way through the script you will be disconnected.&lt;br /&gt;
&lt;br /&gt;
The script will take a few minutes to download and install any cygwin upgrades.&lt;br /&gt;
&lt;br /&gt;
Once the script is finished, it will re enable creation of new incoming ssh connections and attempt to send an email to support@neosys.com via the standard mailout.neosys.com:2500 email server.&lt;br /&gt;
&lt;br /&gt;
You should then be able to reconnect using ssh and tunnelier/remmina. If you do not get any email then perhaps the script is unable to send email to the standard mailout.neosys.com:2500 email server due to a firewall. In this case after 10 minutes or so you should be able to reconnect using ssh anyway.&lt;br /&gt;
&lt;br /&gt;
*upgradecygwin.log - contents of the email that would have been sent&lt;br /&gt;
*upgradecygwin.err - any errors that prevent sending email&lt;br /&gt;
&lt;br /&gt;
If you cannot connect on ssh using tunnelier/remmina after say 20 minutes then the script must have failed. To resolve that problem, either use your existing Teamviewer connection or get client IT support to physically access the server to install Teamviewer for you.&lt;br /&gt;
&lt;br /&gt;
Running the script multiple times will not cause any issue. If there is little or nothing to upgrade then the time to complete will be short since there is less to download and install.&lt;br /&gt;
&lt;br /&gt;
===== Verifying successful run =====&lt;br /&gt;
&lt;br /&gt;
#You must carefully inspect the email or log for &amp;quot;error&amp;quot; or &amp;quot;fail&amp;quot; and intelligently and thoughtfully find any other unexpected results and deal with them. It is impossible to give guidelines for everything so this requires brainwork.&lt;br /&gt;
#[[Setting_up_and_using_remote_support#How_to_check_Cygwin_version_.3F|You must check the versions of &amp;quot;cygwin&amp;quot; and &amp;quot;openssh&amp;quot;]] at a minimum and ensure they agree with the latest expected version numbers.&lt;br /&gt;
#You must check for the word &amp;quot;reboot&amp;quot; especially in the following scenarios:&lt;br /&gt;
&lt;br /&gt;
 Installing file cygfile:///usr/bin/cygwin1.dll&lt;br /&gt;
 io_stream_cygfile: fopen(/usr/bin/cygwin1.dll) failed 13 Permission denied&lt;br /&gt;
 Failed to open cygfile:///usr/bin/cygwin1.dll for writing.&lt;br /&gt;
 Scheduled reboot replacement of file C:\cygwin\bin/cygwin1.dll with C:\cygwin\bin/cygwin1.dll.new&lt;br /&gt;
&lt;br /&gt;
 mbox note: In-use files have been replaced. You need to reboot as soon as possible to activate the new versions. Cygwin may operate  &lt;br /&gt;
 incorrectly until you reboot.&lt;br /&gt;
&lt;br /&gt;
 note: In-use files have been replaced. You need to reboot as soon as possible to activate the new versions. Cygwin may operate incorrectly &lt;br /&gt;
 until you reboot.&lt;br /&gt;
 Ending cygwin install&lt;br /&gt;
&lt;br /&gt;
===== Dealing with reboot required =====&lt;br /&gt;
&lt;br /&gt;
The script attempts to shutdown sshd and some services that may be present in some installations like rsync and exim.&lt;br /&gt;
&lt;br /&gt;
The script attempts to avoid causing &amp;quot;reboot required&amp;quot; by stopping the upgrade if any cygwin processes are found to be running. &amp;quot;Reboot required&amp;quot; indicates that some cygwin program was running while the upgrade process was running and this usually IRRETRIEVABLY BREAKS the cygwin functionality because cygwin&#039;s upgrade isnt smart enough to deal with this.&lt;br /&gt;
&lt;br /&gt;
It is quite likely that a reboot will NOT solve various problems.&lt;br /&gt;
&lt;br /&gt;
Rerunning the script will not show the errors again but the problem of bad upgrade.&lt;br /&gt;
&lt;br /&gt;
SOLUTION: You should completely clean out all traces of cygwin in the computer and then reinstall cygwin completely from scratch. How to clean thoroughly is documented in wiki.&lt;br /&gt;
&lt;br /&gt;
===== Finding the script =====&lt;br /&gt;
&lt;br /&gt;
The script is installed in the neosys\neosys directory or for older versions of NEOSYS it can be created or upgraded as follows:&lt;br /&gt;
&lt;br /&gt;
First find the text of the script at http://www.neosys.com/support/upgradecygwin.cmd&lt;br /&gt;
&lt;br /&gt;
Then, assuming that NEOSYS is installed in the root directory of D:&lt;br /&gt;
&lt;br /&gt;
Single installation&lt;br /&gt;
 notepad d:\neosys\neosys\upgradecygwin.cmdzz&lt;br /&gt;
&lt;br /&gt;
Multiple installation&lt;br /&gt;
 notepad d:\hosts\CLIENTCODE\neosys\upgradecygwin.cmd&lt;br /&gt;
&lt;br /&gt;
==== How to check Cygwin version ?  ====&lt;br /&gt;
&lt;br /&gt;
If you are looking for the version number for the whole Cygwin release, there is none. &lt;br /&gt;
&lt;br /&gt;
Each package in the Cygwin release has its own version. You can find out the Cygwin.dll version by using the following command:&lt;br /&gt;
&lt;br /&gt;
 cygcheck -V&lt;br /&gt;
&lt;br /&gt;
To find the version of the Cygwin Package installed, you can use &lt;br /&gt;
&lt;br /&gt;
 cygcheck -c PACKAGE_NAME&lt;br /&gt;
&lt;br /&gt;
eg - To check the version of the openssh package you will have to type the following command in cygwin:&lt;br /&gt;
&lt;br /&gt;
 cygcheck -c openssh&lt;br /&gt;
&lt;br /&gt;
The output should be as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Package           Version           Status&lt;br /&gt;
 openssh           6.0p1-2             OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to uninstall/reinstall cygwin ==&lt;br /&gt;
&lt;br /&gt;
With setup.exe (the installer file of cygwin) you can uninstall individual packages but not Cygwin.&lt;br /&gt;
&lt;br /&gt;
Before you do this, make sure you have stopped the cygwin service (NET STOP SSHD), removed the sshd server (cygrunsrv -R sshd), deleted the sshd &amp;amp; sshd_server users (net user sshd /DELETE)&lt;br /&gt;
&lt;br /&gt;
To uninstall Cygwin you have to run the following in DOS prompt:&lt;br /&gt;
&lt;br /&gt;
 rmdir /s /q C:\cygwin&lt;br /&gt;
&lt;br /&gt;
You cannot delete the cygwin folder from Windows explorer due to a Access Denied error and this is the best way to uninstall cygwin.&lt;br /&gt;
&lt;br /&gt;
== Adding packages to Cygwin after installation ==&lt;br /&gt;
&lt;br /&gt;
Adding packages causes Cygwin to also upgrade but upgrade requires a special process because it cant be upgraded remotely while Cygwin sshd server is working.&lt;br /&gt;
&lt;br /&gt;
#Upgrade Cygwin&lt;br /&gt;
#Add the package using Cygwin normal setup program&lt;br /&gt;
&lt;br /&gt;
Step 1 is NOT optional if you want to do step 2.&lt;br /&gt;
&lt;br /&gt;
In the above procedure upgrade Cygwin using the script and follow the precautionary measures listed in [[Setting up and using remote support#Upgrading Cygwin with a script | Upgrade using script]], in case script fails to renable ssh remote connection. Next run setup.exe file present in D:\neosys\neosys to install the required the package.&lt;br /&gt;
&lt;br /&gt;
=== Adding individual packages to cygwin without doing a full upgrade ===&lt;br /&gt;
&lt;br /&gt;
You can add individual packages to cygwin without doing a full upgrade in many cases. The installed or upgraded version of cygwin should be recent since the current version of the package you want to install might not work with an old version installed cygwin.dll.&lt;br /&gt;
&lt;br /&gt;
To figure out if the cygwin version is recent and will be compatible with the new package, compare the current installed version with the latest version of cygwin.&lt;br /&gt;
&lt;br /&gt;
Cygwin DLL has been named cygwin1.dll and the number 1 is present in the beginning of the release name. Additionally there are DLL major and minor numbers that correspond to the name of the release and a release number respectively. The major version number gets incremented only when a change is made that makes existing software incompatible. The minor version changes every time a new backward compatible Cygwin release is made available. Therefore we need to check the major version of cygwin on the server.&lt;br /&gt;
&lt;br /&gt;
In other words cygwin-1.7.1-2 means cygwin1.dll, major version 7, minor version 1 and release 2.&lt;br /&gt;
&lt;br /&gt;
e.g if the current version of Cygwin DLL is 2.3.0 and latest version is 2.4.1-1 that means there is a change in the major version from 3 to 4 so we cannot go ahead with installing a new package.&lt;br /&gt;
&lt;br /&gt;
Commands below to add or remove packages. Press the View button repeatedly in the installation wizard to get to &amp;quot;Pending&amp;quot; to see what will be installed.&lt;br /&gt;
 #adding&lt;br /&gt;
 setup-x86 -P PACKAGE_NAME&lt;br /&gt;
&lt;br /&gt;
 #removing&lt;br /&gt;
 setup-x86 -x PACKAGE_NAME&lt;br /&gt;
&lt;br /&gt;
== Getting Ownership and Permissions Correct ==&lt;br /&gt;
&lt;br /&gt;
Installation of cygwin under domain administrator account needs to be fixed as follows:&lt;br /&gt;
&lt;br /&gt;
#c:\cygwin Properties, Security, Advanced&lt;br /&gt;
#Change owner to: Administrators&lt;br /&gt;
#Tick: Replace owner on subcontainers&lt;br /&gt;
&lt;br /&gt;
After changing ownership of all cygwin folders to Administrators all ssh login will be blocked and you will get a windows application event log message. &amp;quot;root&amp;quot; actually means sshd&#039;s user which is sshd_server by default or can be found in the cygwin ssh windows services properties under log on&lt;br /&gt;
&lt;br /&gt;
 fatal: /var/empty must be owned by root and not group or world-writable.&lt;br /&gt;
&lt;br /&gt;
Fix this in cygwin console as follows:&lt;br /&gt;
&lt;br /&gt;
 chown sshd_server /var/empty&lt;br /&gt;
&lt;br /&gt;
== Configuring Firewall/Router ==&lt;br /&gt;
&lt;br /&gt;
You will have to port forward 19580 on the router to port 19580 on the neosys server. Some routers call port forwarding “port mapping” or “virtual servers”&lt;br /&gt;
&lt;br /&gt;
It is BAD idea to simply open port 22 since an open port 22 attracts scanners/hackers like flies.&lt;br /&gt;
&lt;br /&gt;
Configure port forwarding of port 4430 ONLY if access from outside office is required by the client. Support MUST obtain Client management permission before port forwarding 4430.&lt;br /&gt;
&lt;br /&gt;
== Configuring Specific Client Routers ==&lt;br /&gt;
&lt;br /&gt;
[[Adline Dubai - CISCO PIX Firewall]]&lt;br /&gt;
&lt;br /&gt;
[[Sonicwall Firewall Configuration]]&lt;br /&gt;
&lt;br /&gt;
== How to install ssh on port 19580 over vnc on port 19580 ==&lt;br /&gt;
&lt;br /&gt;
Install vnc on port 19580&lt;br /&gt;
 &lt;br /&gt;
connect on vnc&lt;br /&gt;
 &lt;br /&gt;
setup cygwin sshd on port 22&lt;br /&gt;
 &lt;br /&gt;
test you can login on port 22&lt;br /&gt;
&lt;br /&gt;
 ssh neosys@127.0.0.1&lt;br /&gt;
 &lt;br /&gt;
change sshd port to 19580 (but it wont start)&lt;br /&gt;
 &lt;br /&gt;
schedule a windows system reboot in 10 mins at windows command prompt&lt;br /&gt;
 &lt;br /&gt;
 shutdown -t 600&lt;br /&gt;
 &lt;br /&gt;
change vnc port to 5900 (if will disconnect you)&lt;br /&gt;
 &lt;br /&gt;
wait for 10 mins and try to ssh login on port 19580&lt;br /&gt;
&lt;br /&gt;
== Changing user on Cygwin==&lt;br /&gt;
&lt;br /&gt;
On SSH command line:&lt;br /&gt;
&lt;br /&gt;
 ssh neosys@127.0.0.1 (where &#039;neosys&#039; is the username)&lt;br /&gt;
&lt;br /&gt;
== Installing and configuring UltraVNC ==&lt;br /&gt;
&lt;br /&gt;
VNC/Putty is not typically used for NEOSYS remote support anymore and has been replaced by tunnelier/rdp&lt;br /&gt;
&lt;br /&gt;
[[Installing and configuring UltraVNC]]&lt;br /&gt;
&lt;br /&gt;
== Remote Desktop Connection ==&lt;br /&gt;
&lt;br /&gt;
Servers are normally not exposed to the internet so IT staff and suppliers are often not careful to use strong passwords and use things like &amp;quot;password&amp;quot; or blank.&lt;br /&gt;
&lt;br /&gt;
Given the above, it is NEOSYS policy NOT to use remote desktop via direct access from the internet at all and especially not long term. This is to prevent worms from instantly discovering possible entry points - typically before NEOSYS can even begin to enforce strong administrator password.&lt;br /&gt;
&lt;br /&gt;
If it is otherwise IMPOSSIBLE (difficult or inconvenient does NOT count as impossible!) to avoid using remote desktop protocol to the public internet then a simple and effective way of significantly increasing security is to change the remote desktop port from 3389 to something else e.g. 33890 as per NEOSYS convention.&lt;br /&gt;
&lt;br /&gt;
=== Changing RDC port from standard to nonstandard ===&lt;br /&gt;
&lt;br /&gt;
# Start Registry Editor.&lt;br /&gt;
# Locate and then click the following registry subkey:&lt;br /&gt;
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber&lt;br /&gt;
# On the Edit menu, click Modify, and then click Decimal.&lt;br /&gt;
# Type the new port number, and then click OK.&lt;br /&gt;
# Quit Registry Editor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solving &amp;quot;Authentication that can continue: publickey,password&amp;quot; Error when connecting to remote servers via remote access clients ==&lt;br /&gt;
&lt;br /&gt;
Some remote access clients cannot connect to ssh servers without special configuration.&lt;br /&gt;
&lt;br /&gt;
For example remina/ssh cannot connect to windows/cygwin/sshd in their default configuration.&lt;br /&gt;
&lt;br /&gt;
=== Error Message ===&lt;br /&gt;
[[Image:Sshremmina.jpg]]&lt;br /&gt;
&lt;br /&gt;
 SSH password authentication failed: Access denied. Authentication that can continue: publickey,password,keyboard-interactive&lt;br /&gt;
&lt;br /&gt;
=== Solution 1 ===&lt;br /&gt;
&lt;br /&gt;
If possible configure the client to not perform challenge response during login.&lt;br /&gt;
&lt;br /&gt;
There appears to be no way to do this for remina currently&lt;br /&gt;
&lt;br /&gt;
=== Solution 2 ===&lt;br /&gt;
&lt;br /&gt;
On the target server:&lt;br /&gt;
&lt;br /&gt;
Edit the ssh service configuration&lt;br /&gt;
&lt;br /&gt;
  nano /etc/sshd_config&lt;br /&gt;
&lt;br /&gt;
Add the last line to the following section&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Change to no to disable s/key passwords&lt;br /&gt;
#ChallengeResponseAuthentication yes&lt;br /&gt;
ChallengeResponseAuthentication no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the ssh service&lt;br /&gt;
&lt;br /&gt;
 net stop sshd&lt;br /&gt;
 net start sshd&lt;br /&gt;
&lt;br /&gt;
Check that you can login using password from one workstation and it will be solved for all workstations for that server&lt;br /&gt;
&lt;br /&gt;
=== Solution 3 ===&lt;br /&gt;
&lt;br /&gt;
On a client workstation:&lt;br /&gt;
&lt;br /&gt;
#Use the autologin.sh script to configure automatic login. Refer [[Backup_and_Restore#Creating.2FUpgrading_autologin.sh_if_it_doesn.E2.80.99t_exist_or_is_out_of_date| Autologin.sh]]&lt;br /&gt;
#For &amp;quot;Authentication/Login Method&amp;quot; choose option &amp;quot;Public Key&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Check that you can login using password. This will have to be done on every workstation for every server so is rather tedious but it does not require reconfiguration of the server.&lt;br /&gt;
&lt;br /&gt;
=== Solution 4 ===&lt;br /&gt;
&lt;br /&gt;
On the target server, check whether authorized_keys file contains your public key. You can do that by checking the user name displayed at the end of each key.&lt;br /&gt;
&lt;br /&gt;
To view the authorized_keys file, open cygwin terminal and type&lt;br /&gt;
&lt;br /&gt;
 cat .ssh/authorized_keys&lt;br /&gt;
&lt;br /&gt;
If authorized_keys file does not contain your public key, then copy it from authorized_keys.backup file using the below command:&lt;br /&gt;
&lt;br /&gt;
 cat .ssh/authorized_keys.backup&lt;br /&gt;
&lt;br /&gt;
Next edit the authorized_keys file using the below command:&lt;br /&gt;
&lt;br /&gt;
 nano .ssh/authorized_keys&lt;br /&gt;
&lt;br /&gt;
Then paste the copied key in a new line. Ensure that the key appears in a single line and then close the authorized_keys file.&lt;br /&gt;
&lt;br /&gt;
Check that you can connect to the target server using automatic SSH authentication (SSH Agent or Public key)&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Configuring_IIS&amp;diff=2658</id>
		<title>Configuring IIS</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Configuring_IIS&amp;diff=2658"/>
		<updated>2016-04-22T19:41:50Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Solving error during file upload: &amp;quot;Page cannot be displayed&amp;quot; HTTP Error 405 in windows 2003 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;After you have installed all the NEOSYS program files you need to configure IIS so that you can operate NEOSYS. Instructions are below.&lt;br /&gt;
&lt;br /&gt;
== Configuring IIS for windows 2003 ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a new website in IIS ===&lt;br /&gt;
&lt;br /&gt;
First step is to stop the default website in IIS. Right click on Default Web Site and select &amp;quot;Stop&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Create a website called neosys linked to D:\neosys\neosys.net:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3 Server:&#039;&#039;&#039; Create a website called &amp;quot;clientname&amp;quot; linked to D:\hosts\clientfolder\neosys.net &lt;br /&gt;
&lt;br /&gt;
[[image:figure1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[image:figure3.jpg]]&lt;br /&gt;
&lt;br /&gt;
A new window will pop up &amp;quot;IP Address and Port Setting&amp;quot; after completion of the above step.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039;  Select *(All Unassigned)* from the drop down list of &amp;quot;Enter the IP address to use for the Web site&amp;quot; and keep the default port as 80. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3 Server:&#039;&#039;&#039; Select the static Ip from the drop down list of &amp;quot;Enter the IP address to use for the Web site&amp;quot; and enter then next port available and click on next.&lt;br /&gt;
&lt;br /&gt;
[[image:Figure_2.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Within the above neosys web site folder create a virtual directory called data linked to D:\neosys\data: &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3 Server:&#039;&#039;&#039; Within the above clientwebsite folder create a virtual directory called data linked to D:\hosts\clientfolder\data:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;(I haven’t got the screenshot because I can only get it once I create the above)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== To allow file uploads ===&lt;br /&gt;
&lt;br /&gt;
==== Create IMAGES directory ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client server:&#039;&#039;&#039; create a folder IMAGES under D:\neosys and within the neosys web site folder create a virtual directory called images linked to D:\neosys\images: Modes: READ and WRITE&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3 Server:&#039;&#039;&#039; create a folder IMAGES under D:\hosts\clientfolder and within the client web site folder create a virtual directory called images linked to D:\hosts\clientfolder\images: Modes: READ and WRITE&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;(I haven’t got the screenshot because I can only get it once I create the above)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Permit upload.dll ====&lt;br /&gt;
&lt;br /&gt;
# Right click on dll ( Default Web Site, neosys, NEOSYS, dll) &lt;br /&gt;
# Under Permissions set Execute Permissions: Scripts and Executables&lt;br /&gt;
&lt;br /&gt;
# Internet Information Services (IIS) Manager&lt;br /&gt;
# Web Service Extensions&lt;br /&gt;
# All Unknown ISAPI Extensions: Allowed&lt;br /&gt;
&lt;br /&gt;
===[[Backing_up_and_Restoring_IIS_configuration#Set_IIS_automatic_backup_location_to_d:| Set IIS automatic backup location to D:]] ===&lt;br /&gt;
&lt;br /&gt;
== Configuring IIS for Windows 2008 ==&lt;br /&gt;
&lt;br /&gt;
=== Installing IIS ===&lt;br /&gt;
&lt;br /&gt;
First install IIS from Control Panel &amp;gt; Programs &amp;amp; Features &amp;gt; Turn Windows Features ON or OFF &amp;gt; Add Roles:&lt;br /&gt;
&lt;br /&gt;
[[image:iis1.jpg]]&lt;br /&gt;
&lt;br /&gt;
On the window that pops up click on next and you will get this screen, tick Web Server (IIS) - on the prompt click on Add Required Resources and then on Next:&lt;br /&gt;
&lt;br /&gt;
[[image:iis2.jpg]]&lt;br /&gt;
&lt;br /&gt;
On the next window, click on next until you get this window - tick ASP and ISAPI Extensions:&lt;br /&gt;
&lt;br /&gt;
[[image:iis3.jpg]]&lt;br /&gt;
&lt;br /&gt;
Click on Next and Finish&lt;br /&gt;
&lt;br /&gt;
=== Configuring IIS ===&lt;br /&gt;
====Create a new Website====&lt;br /&gt;
After successfully installing IIS, go to Control Panel &amp;gt; Administrative Tools &amp;gt; Computer Management &amp;gt; Services and Applications &amp;gt; Internet Information Services (IIS) &amp;gt; Machine Name &amp;gt; Sites &amp;gt; Default Website. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Stop the Default Website and then right click on Sites folder and click on Add Website called &#039;&#039;&#039;neosys&#039;&#039;&#039; linked to {{Client server Installation Location}}neosys.net as shown in the screenshot below&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; Right click on Sites folder and click on Add Website. Create a website called &amp;quot;clientname&amp;quot; linked to {{NEOSYS server Installation Location}}neosys.net; &lt;br /&gt;
Since win3 is not connected to any LAN and exclusively serves https only, therefore setup a https binding only with a port number which is unique, unused and one greater than the previous port used in the series which is 4431 onwards. The highest port number used in this series can be found by checking IIS manager -&amp;gt; NEOSYS -&amp;gt;Sites.&lt;br /&gt;
&lt;br /&gt;
Refer to [[Setting_up_HTTPS#Creating_multiple_HTTPS_web_sites_on_NEOSYS_hosted_server| setting up the https for a site on NEOSYS hosted server]] for details.&lt;br /&gt;
&lt;br /&gt;
[[image:iis4.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Link Data Folder====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; Within the neosys website folder create a virtual directory called &#039;&#039;&#039;data&#039;&#039;&#039; linked to {{Client server Installation Location}}data&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; Within the &amp;quot;clientname&amp;quot; website folder create a virtual directory called &#039;&#039;&#039;data&#039;&#039;&#039; linked to {{NEOSYS server Installation Location}}data &lt;br /&gt;
&lt;br /&gt;
[[image:iis5.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Allow file uploads====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Client Server:&#039;&#039;&#039; create a folder &#039;&#039;&#039;images&#039;&#039;&#039; under D:\neosys and within the neosys web site folder create a virtual directory called &#039;&#039;&#039;images&#039;&#039;&#039; linked to {{Client server Installation Location}}images&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WIN3:&#039;&#039;&#039; create a folder &#039;&#039;&#039;images&#039;&#039;&#039; under D:\hosts\clientfolder and within the &amp;quot;clientname&amp;quot; website folder create a virtual directory called &#039;&#039;&#039;images&#039;&#039;&#039; linked to {{NEOSYS server Installation Location}}images&lt;br /&gt;
&lt;br /&gt;
[[image:iis7.jpg]]&lt;br /&gt;
&lt;br /&gt;
After you add all virtual directories the tree map of the Default Website should look as follows:&lt;br /&gt;
&lt;br /&gt;
[[image:iis8.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Configure file uploads besides adding the images directory====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;For single site servers&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go under IIS &amp;gt; Default Website &amp;gt; neosys&lt;br /&gt;
&lt;br /&gt;
Click on Handler Mappings and delete the ISAPI you see there&lt;br /&gt;
&lt;br /&gt;
[[image:iis9a.jpg]]&lt;br /&gt;
&lt;br /&gt;
Thereafter click on Add Script Map and fill in the details as follows – &lt;br /&gt;
&lt;br /&gt;
Request path: *.dll &lt;br /&gt;
&lt;br /&gt;
Executable: {{Client server Installation Location}}neosys.net\NEOSYS\dll\upload.dll&lt;br /&gt;
&lt;br /&gt;
Name: ISAPI &lt;br /&gt;
&lt;br /&gt;
Click on OK and on YES in the confirmation box&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:iis9b.jpg]]&lt;br /&gt;
[[image:hm.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;For multiple site servers&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go under IIS&amp;gt;NEOSYS&amp;gt;Click on Handler Mappings &amp;gt; Edit Feature Permissions &amp;gt; Select Read, Script and Execute &lt;br /&gt;
&lt;br /&gt;
For WIN3 the above setting is already setup&lt;br /&gt;
&lt;br /&gt;
===Editing the hosts file===&lt;br /&gt;
Edit the hosts file under c:\windows\system32\drivers\etc\ - delete the # sign next to 127.0.0.1 localhost and include the # sign before ::1 localhost&lt;br /&gt;
&lt;br /&gt;
[[image:iis10.jpg]]&lt;br /&gt;
&lt;br /&gt;
===[[Backing_up_and_Restoring_IIS_configuration#Set_IIS_automatic_backup_location_to_d:| Set IIS automatic backup location to D:]] ===&lt;br /&gt;
&lt;br /&gt;
== Solving IIS errors ==&lt;br /&gt;
&lt;br /&gt;
=== Solving error during file upload: &amp;quot;Page cannot be displayed&amp;quot; HTTP Error 405 in windows 2003 ===&lt;br /&gt;
&lt;br /&gt;
This error should not occur in normal NEOSYS installations but the solution is as follows:&lt;br /&gt;
&lt;br /&gt;
# Go to Control Panel, Administrative Tools, Internet Information Services&lt;br /&gt;
# Expand the tree to COMPUTERNAME, Web Sites&lt;br /&gt;
# Right-click &amp;quot;Default Web Site&amp;quot; (or specific Web Site if multiple NEOSYS http/https installations on the server as per WIN3)&lt;br /&gt;
# Properties&lt;br /&gt;
# Home Directory&lt;br /&gt;
# Configuration&lt;br /&gt;
# Mappings, Add&lt;br /&gt;
# Browse&lt;br /&gt;
# Dynamic Link Libraries *.dll&amp;quot; from the &amp;quot;Files of Type&amp;quot; dropdown&lt;br /&gt;
# Find and select D:\NEOSYS\neosys.net\NEOSYS\dll\upload.dll (OR upload.dll in the installation directory)&lt;br /&gt;
# Extension Type: dll&lt;br /&gt;
# Limit to: All&lt;br /&gt;
# Click the &amp;quot;OK&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;HTTP Error 503. The service is unavailable.&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
Look in event log for errors saying various dlls have failed to load eg&lt;br /&gt;
&lt;br /&gt;
 The Module DLL C:\Windows\System32\inetsrv\authsspi.dll failed to load.  The data is the error.&lt;br /&gt;
&lt;br /&gt;
These errors indicate that IIS is configured to use various modules that have not been installed, possibly due to restoration of IIS configuration backups which mention them but the restore program restores the configuration but does not install the dll. They may not even be required, but how to exclude them is not solved in this article.&lt;br /&gt;
&lt;br /&gt;
Solution is to install the various required modules by right clicking IIS role and choosing Add Role Service&lt;br /&gt;
&lt;br /&gt;
*inetsrv\filter.dll - ISAPI Filters&lt;br /&gt;
*validcfg.dll - .NET Extensibility?&lt;br /&gt;
*iis_ssi.dll - Server Side Includes&lt;br /&gt;
*authsspi.dll - Windows Authentication&lt;br /&gt;
&lt;br /&gt;
=== Solving HTTP Error 404 Error occurring immediately on opening NEOSYS login page on a new server installation: &amp;quot;System Failure. Do you want to retry?&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This error message is caused by failing to enable Active Server Pages in the IIS configuration. To resolve this in windows 2008, [[Configuring_IIS#Configure_file_uploads_besides_adding_the_images_directory| ensure that Read, Script, Execute is ticked (enabled) in the feature permissions of these Handler Mappings.]]&lt;br /&gt;
&lt;br /&gt;
This message is from IE8 and a Windows 2003 server. The message may be different for other browser versions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Message from web page.&lt;br /&gt;
&lt;br /&gt;
System Failure. Do you want to retry?&lt;br /&gt;
&lt;br /&gt;
The page cannot be found&lt;br /&gt;
The page you are looking for might have been removed, had its name change, or it temporarily unavailable.&lt;br /&gt;
&lt;br /&gt;
Please try the following:&lt;br /&gt;
(omitted)&lt;br /&gt;
HTTP Error 404 - File or directory not found.&lt;br /&gt;
Internet Information Services (IIS)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[image:http404.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Solving HTTP 404 Webpage cannot be found ===&lt;br /&gt;
&lt;br /&gt;
This error message clearly states that the page cannot be found. Check for the requested page in the client website folder under the virtual directory data. This page will be available under the data folder in D:\neosys\data. A possible cause of this error is by failing to create a virtual directory called data linked to D:\neosys\data:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:http404p.jpg]]&lt;br /&gt;
===Solving Error &amp;quot;The specified Executable does not exist on the server&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
While adding Script Map in Handler Mappings in the above step, if you get the below error, this means you have not yet run the Maintenance window/ NEOSYS processes and skipped steps in Installing NEOSYS. File upload.dl_ is installed from NEOSYS.EXE or NEOSYS2.EXE and converted to .dll the first time you run NEOSYS Maintenance/Process. You can also manually rename the file to upload.dll. &lt;br /&gt;
&lt;br /&gt;
[[image:Dll_error.png]]&lt;br /&gt;
&lt;br /&gt;
=== Solving IIS error 500 on uploading for windows 2008===&lt;br /&gt;
&lt;br /&gt;
To test if permissions are the problem, in grant full control to IUSR over the whole client directory e.g d:\neosys or d:\hosts\clientx in security tab of windows explorer and see if you can upload.&lt;br /&gt;
&lt;br /&gt;
Regardless of the result, remove the full control permissions since they are a security risk.&lt;br /&gt;
&lt;br /&gt;
If permissions are the problem then grant specific permissions as follows:&lt;br /&gt;
&lt;br /&gt;
#images folder - read and write permissions (but not execute)&lt;br /&gt;
#dll folder - read and execute permission (no write permission)&lt;br /&gt;
&lt;br /&gt;
=== Solving error &amp;quot;Upload folder cannot be created.The system cannot find the drive specified&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
This error message comes up when the file uploads are configured to a different location in the software than what is set up in IIS.&lt;br /&gt;
&lt;br /&gt;
There is an internal system configuration in line 49 of the DOS SYSTEM.CFG file which mentions the upload folder location (normally blank which means xxxxxx\images\ where xxxxxx is the installation directory e.g d:\neosys)&lt;br /&gt;
&lt;br /&gt;
In installations where the images are uploaded to a place other than the installation directory, the configuration may say something like h:\images\ where h represents the drive where the folder is located e.g on an external USB drive. This may be done in case of client installations where file uploads are configured on USB drives due to a huge number of files getting uploaded.&lt;br /&gt;
&lt;br /&gt;
The IIS and internal system configuration must agree, otherwise users will probably not be able to upload files, or the uploaded files may not be saved in the right place and may be lost, not backed up and/or not viewable.&lt;br /&gt;
&lt;br /&gt;
To fix this issue, you MUST link the &#039;&#039;&#039;images&#039;&#039;&#039; folder in IIS to xxxxxx\images\ where xxxxxx is the directory of the images folder as shown in the error message.&lt;br /&gt;
&lt;br /&gt;
[[File:Uploaderror.png]]&lt;br /&gt;
&lt;br /&gt;
== Disabling unsecure SSL3 protocol on Windows IIS web server ==&lt;br /&gt;
&lt;br /&gt;
POODLE is an information leakage attack on client browsers while accessing web server that support the older SSL3 protocol. It is easy to prevent it by reconfiguring web servers to not support SSL3.&lt;br /&gt;
&lt;br /&gt;
=== Securing IIS web server on win2003 and 2008 by disabling unsafe SSL3 protocol ===&lt;br /&gt;
&lt;br /&gt;
#For Systems with https installed check if the web server is vulnerable (see [[Configuring_IIS#Testing_for_IIS_vulnerability| Testing for IIS vulnerability]] ). For systems with no https installed,continue to step2 to prevent SSL3 accidentally being enabled if https is installed in the server in future and then test for vulnerability.&lt;br /&gt;
# run the following commands on the server&lt;br /&gt;
#reg add &amp;quot;HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Server&amp;quot;  /t REG_DWORD  /v Enabled  /d 0 /f&lt;br /&gt;
#reg add &amp;quot;HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server&amp;quot;  /t REG_DWORD  /v Enabled  /d 0 /f&lt;br /&gt;
#reg add &amp;quot;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 40/128&amp;quot;  /t REG_DWORD  /v Enabled  /d 0 /f&lt;br /&gt;
#reg add &amp;quot;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 56/128&amp;quot;  /t REG_DWORD  /v Enabled  /d 0 /f&lt;br /&gt;
#reg add &amp;quot;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 64/128&amp;quot;  /t REG_DWORD  /v Enabled  /d 0 /f&lt;br /&gt;
#reg add &amp;quot;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 128/128&amp;quot;  /t REG_DWORD  /v Enabled  /d 0 /f&lt;br /&gt;
#Reboot the server (at any time later using standard NEOSYS rebooting procedure without disturbing users)&lt;br /&gt;
#Perform the diagnostic for vulnerability&lt;br /&gt;
&lt;br /&gt;
=== Testing for IIS vulnerability ===&lt;br /&gt;
==== A. Determine host and port and where to test from ==== &lt;br /&gt;
If you have a public https server that you can access like https://demo.neosys.com:443, in a linux command prompt eg nagios login:&lt;br /&gt;
&lt;br /&gt;
*$HOST for host name like demo.neosys.com&lt;br /&gt;
*$PORT with something like 443 or 4430 depending on port forwarding on the public router&lt;br /&gt;
&lt;br /&gt;
or if testing a private https server with no public access, using a cygwin installation on the same server in the cygwin prompt:&lt;br /&gt;
&lt;br /&gt;
*$HOST for host name like 127.0.0.1&lt;br /&gt;
*$PORT with something like 443 or 4430 as per IIS manager configuration&lt;br /&gt;
&lt;br /&gt;
If https is enabled on the server/website and you are able to access the website via https using a browser, then you must be able to test for openssl on the same browsed host and port. You must also test this locally to ensure that the right server is being fixed. If the website is not public, then https must not be enabled, which means there is no reason for using cygwin openssl.&lt;br /&gt;
&lt;br /&gt;
==== B. Check you CAN connect to https server using TLS ====&lt;br /&gt;
&lt;br /&gt;
 openssl s_client -host $HOST -port $PORT&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nagios@vm1m:~$ echo|openssl s_client -host demo.neosys.com -port 443&lt;br /&gt;
CONNECTED(00000003)&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=20:unable to get local issuer certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=21:unable to verify the first certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
---&lt;br /&gt;
Certificate chain&lt;br /&gt;
 0 s:/CN=demo.neosys.com&lt;br /&gt;
   i:/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
Server certificate&lt;br /&gt;
-----BEGIN CERTIFICATE-----&lt;br /&gt;
MIIB2DCCAUWgAwIBAgIQd0J0l4kJrpJHonAv5U8VLjAJBgUrDgMCHQUAMBoxGDAW&lt;br /&gt;
BgNVBAMTD2RlbW8ubmVvc3lzLmNvbTAeFw0wODA3MjcxOTUxMDNaFw0zNTEyMTIx&lt;br /&gt;
OTUxMDNaMBoxGDAWBgNVBAMTD2RlbW8ubmVvc3lzLmNvbTCBnzANBgkqhkiG9w0B&lt;br /&gt;
AQEFAAOBjQAwgYkCgYEAxzwtoqq49vV7pyBQ6Ej+PvbB1QxkdsxNn5EZSLSOppCb&lt;br /&gt;
jNjV8fFa98unPR0pGM0UdjWMUYodj12c2pnIrfrtXv7pYf+iC1corPEY7607Icbs&lt;br /&gt;
rSOc5aFwnlUYpktoysV1G1crGYgYgXbXgVOUO9phHXJarpKf6SjVw3uXTLlmPUkC&lt;br /&gt;
AwEAAaMnMCUwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDgYDVR0PBAcDBQCwAAAAMAkG&lt;br /&gt;
BSsOAwIdBQADgYEAmgyW60pT62JuM8GH+KogHW7viaMsifXitm3BC/GfaORpJCox&lt;br /&gt;
aS20fAlzGyAlDe9nZWN4roLSxQv0laJkxyNPDuHvLJt1l0FVdk6/vGB6QH0KqM+S&lt;br /&gt;
UaUTLsDZ99UNS/inotobxD9vXuKl58Uoe2lu7r9vJ+1DWDC6AyueSZ6xnno=&lt;br /&gt;
-----END CERTIFICATE-----&lt;br /&gt;
subject=/CN=demo.neosys.com&lt;br /&gt;
issuer=/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
No client certificate CA names sent&lt;br /&gt;
---&lt;br /&gt;
SSL handshake has read 635 bytes and written 411 bytes&lt;br /&gt;
---&lt;br /&gt;
New, TLSv1/SSLv3, Cipher is AES128-SHA&lt;br /&gt;
Server public key is 1024 bit&lt;br /&gt;
Secure Renegotiation IS supported&lt;br /&gt;
Compression: NONE&lt;br /&gt;
Expansion: NONE&lt;br /&gt;
SSL-Session:&lt;br /&gt;
    Protocol  : TLSv1&lt;br /&gt;
    Cipher    : AES128-SHA&lt;br /&gt;
    Session-ID: 8A0A00002D51DE183AC2845C6B3FF4BC7485181B4DCBC1758E3A2D5399BDD71C&lt;br /&gt;
    Session-ID-ctx:&lt;br /&gt;
    Master-Key: B10B9370E4DF70E873873AB9851B3CEF19623E6ADA697955E375D931DEE8301D798B4CB14C8D33FCF1BA066C0CC23897&lt;br /&gt;
    Key-Arg   : None&lt;br /&gt;
    PSK identity: None&lt;br /&gt;
    PSK identity hint: None&lt;br /&gt;
    SRP username: None&lt;br /&gt;
    Start Time: 1413885416&lt;br /&gt;
    Timeout   : 300 (sec)&lt;br /&gt;
    Verify return code: 21 (unable to verify the first certificate)&lt;br /&gt;
---&lt;br /&gt;
DONE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== C. Check that you cannot CANNOT to https server using SSL3 ====&lt;br /&gt;
&lt;br /&gt;
 openssl s_client -ssl3 -host $HOST -port $PORT&lt;br /&gt;
&lt;br /&gt;
==== CAN CONNECT = VULNERABLE = NOT OK ====&lt;br /&gt;
&lt;br /&gt;
If you get this then you need to configure the server to prevent SSL3&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nagios@vm1m:~$ echo xxx|openssl s_client -ssl3 -host demo.neosys.com -port 4430&lt;br /&gt;
gethostbyname failure&lt;br /&gt;
connect:errno=0&lt;br /&gt;
nagios@vm1m:~$ echo xxx|openssl s_client -ssl3 -host demo.neosys.com -port 4430&lt;br /&gt;
CONNECTED(00000003)&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=20:unable to get local issuer certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
depth=0 CN = demo.neosys.com&lt;br /&gt;
verify error:num=21:unable to verify the first certificate&lt;br /&gt;
verify return:1&lt;br /&gt;
---&lt;br /&gt;
Certificate chain&lt;br /&gt;
 0 s:/CN=demo.neosys.com&lt;br /&gt;
   i:/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
Server certificate&lt;br /&gt;
-----BEGIN CERTIFICATE-----&lt;br /&gt;
MIIB3jCCAUugAwIBAgIQNj9FMjT1vIxGo2Mv2Ta9vzAJBgUrDgMCHQUAMB0xGzAZ&lt;br /&gt;
BgNVBAMTEmFkbGluZWQubmVvc3lzLmNvbTAeFw0wODAzMjUxMTIxMzFaFw0zNTA4&lt;br /&gt;
MTAxMTIxMzFaMB0xGzAZBgNVBAMTEmFkbGluZWQubmVvc3lzLmNvbTCBnzANBgkq&lt;br /&gt;
hkiG9w0BAQEFAAOBjQAwgYkCgYEArRuijA8jz3qBm2ZZEwITIJLWIMlQmZxcUvOo&lt;br /&gt;
HNZL0+3oJuX0AQqtpRZMp/7ob9agngfwJQ36vK+424zcBbmKxA2MweKZRalN2jz+&lt;br /&gt;
rdr1oeZ6/Ff3r8+rCPFj/B8CfMOQbSv6YcR0kVc+8ugybB7qT6Nq5ZWOAczG3Ikt&lt;br /&gt;
4EnOlqUCAwEAAaMnMCUwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDgYDVR0PBAcDBQCw&lt;br /&gt;
AAAAMAkGBSsOAwIdBQADgYEAHIq5Gn2LiMgXFaUYrFEfHeajD4jAwdFw+zrjcBDZ&lt;br /&gt;
qM9LnhndHhdPogow9m9cCv1n57ne9rZL1v7w7Y6C53359hTUVZFqtHFfzcWnNyKD&lt;br /&gt;
uHD9a8QDk6/dSwBr/SWIE6OdFUYAj/kDXRQNB5H459spRVa3Yws8vpwrWZhoklxq&lt;br /&gt;
CQg=&lt;br /&gt;
-----END CERTIFICATE-----&lt;br /&gt;
subject=/CN=demo.neosys.com&lt;br /&gt;
issuer=/CN=demo.neosys.com&lt;br /&gt;
---&lt;br /&gt;
No client certificate CA names sent&lt;br /&gt;
---&lt;br /&gt;
SSL handshake has read 649 bytes and written 342 bytes&lt;br /&gt;
---&lt;br /&gt;
New, TLSv1/SSLv3, Cipher is RC4-MD5&lt;br /&gt;
Server public key is 1024 bit&lt;br /&gt;
Secure Renegotiation IS supported&lt;br /&gt;
Compression: NONE&lt;br /&gt;
Expansion: NONE&lt;br /&gt;
SSL-Session:&lt;br /&gt;
    Protocol  : SSLv3&lt;br /&gt;
    Cipher    : RC4-MD5&lt;br /&gt;
    Session-ID: 441A0000EBC1D634B2CDB12924F9B980D2A4CF8C4DD6D3FB9728D3C74F62A8FE&lt;br /&gt;
    Session-ID-ctx:&lt;br /&gt;
    Master-Key: 38F040BE3E7098857B7CB9FF3B44937786F8F8C002B0042370B29F20EFB582833F9E24CFC8E6560AFD06751DC93412D3&lt;br /&gt;
    Key-Arg   : None&lt;br /&gt;
    PSK identity: None&lt;br /&gt;
    PSK identity hint: None&lt;br /&gt;
    SRP username: None&lt;br /&gt;
    Start Time: 1413885545&lt;br /&gt;
    Timeout   : 7200 (sec)&lt;br /&gt;
    Verify return code: 21 (unable to verify the first certificate)&lt;br /&gt;
---&lt;br /&gt;
DONE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== CANNOT CONNECT = NOT VULNERABLE = OK ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nagios@vm1m:~$ echo|openssl s_client -ssl3 -host demo.neosys.com -port 443&lt;br /&gt;
CONNECTED(00000003)&lt;br /&gt;
write:errno=104&lt;br /&gt;
---&lt;br /&gt;
no peer certificate available&lt;br /&gt;
---&lt;br /&gt;
No client certificate CA names sent&lt;br /&gt;
---&lt;br /&gt;
SSL handshake has read 0 bytes and written 0 bytes&lt;br /&gt;
---&lt;br /&gt;
New, (NONE), Cipher is (NONE)&lt;br /&gt;
Secure Renegotiation IS NOT supported&lt;br /&gt;
Compression: NONE&lt;br /&gt;
Expansion: NONE&lt;br /&gt;
SSL-Session:&lt;br /&gt;
    Protocol  : SSLv3&lt;br /&gt;
    Cipher    : 0000&lt;br /&gt;
    Session-ID:&lt;br /&gt;
    Session-ID-ctx:&lt;br /&gt;
    Master-Key:&lt;br /&gt;
    Key-Arg   : None&lt;br /&gt;
    PSK identity: None&lt;br /&gt;
    PSK identity hint: None&lt;br /&gt;
    SRP username: None&lt;br /&gt;
    Start Time: 1413885702&lt;br /&gt;
    Timeout   : 7200 (sec)&lt;br /&gt;
    Verify return code: 0 (ok)&lt;br /&gt;
---&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enabling Internet Explorer 6 to access secured https web servers ===&lt;br /&gt;
&lt;br /&gt;
To use Internet explorer 6 (on win2003 and XP-before-SP3) to access secured http web sites you need to enable IE6 to use TLS 1.0. Internet Explorer 6 is present in Windows Server 2003 and Windows XP-pre-SP3.&lt;br /&gt;
&lt;br /&gt;
You can also disable SSL 2.0 and SSL 3.0 for additional safety. This good for later versions of Internet Explorer too.&lt;br /&gt;
&lt;br /&gt;
[[File:IE_options.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Generating IIS certificates for https using openssl ==&lt;br /&gt;
&lt;br /&gt;
This covers the two main type of certificates:&lt;br /&gt;
&lt;br /&gt;
#&amp;quot;proper&amp;quot; certificates (accepted by all browsers without complaint) - issued by bona fide certification authority only on proof of control of a domain name - usually for a small fee&lt;br /&gt;
#&amp;quot;self signed&amp;quot; certificates (not accepted by all browsers without error messages without special configuration) - easily&lt;br /&gt;
issued by anybody without the slightest restriction&lt;br /&gt;
&lt;br /&gt;
NEOSYS&#039; proper https certificate for *.hosts.neosys.com, valid approx Jan-Dec 2016, issued by Comodo, was purchased from namecheap.com for a small fraction of the price of purchasing from Comodo or one of the other main certification authorities.&lt;br /&gt;
&lt;br /&gt;
There is no technical requirement to renew certificates with the same issuing authority, nor is their any restriction whatsoever from having multiple concurrent overlapping certificates, in any combination, for the the same domain name or subsets of a domain name. For a certificate to be &amp;quot;proper&amp;quot; it merely has to be issued by (not necessarily purchased from) one of the certificate authorities registered in all the main browsers using by NEOSYS clients. Unlike DNS domain name registrars, of which you can only have one at any one time, and which take to change, certificates are simply installed in particular servers without reference to each other, nor to any imaginary central internet registry, as IS the case for the DNS domain name registry.&lt;br /&gt;
&lt;br /&gt;
The sales of certificates is a bit of scam really because anybody can get a certificate from the main commercial certificate authorities merely by proving control over a domain name - for example, by receiving an email to ADMIN@xxxxx.com. Except for EV certificates such as those issued to banks etc, most https certificates are issued without any check on physical identity or reputation, therefore the cost of issuing https certificates rests merely on the fact that the certification authority has managed to inveigle itself into all the main browsers and have their public key installed along with the browser software. Hoowever, the market seems to be collapsing, with even free certificate authorities appearing although with some minor limitations like short duration of validity of certificates.&lt;br /&gt;
&lt;br /&gt;
Excellent summary of using openssl to manage certificates .. no Alternate Names though&lt;br /&gt;
https://www.digitalocean.com/community/tutorials/openssl-essentials-working-with-ssl-certificates-private-keys-and-csrs&lt;br /&gt;
&lt;br /&gt;
Excellent summary of selfsigned and properly signed certificate&lt;br /&gt;
https://httpd.apache.org/docs/2.4/ssl/ssl_faq.html&lt;br /&gt;
&lt;br /&gt;
==== Commentary on https security ====&lt;br /&gt;
&lt;br /&gt;
With the general move to using https instead of http after the Snowdon revelations, people have begun to better understand how https certificates really work. People are more aware now that most https certificates mean little more than that their communication with the server is a) confidential b) not tampered with c) is truly with the server/domain name apparent and not some other. ALL WITH THE EXCEPTION OF *ANYBODY* WHO IS A CERTIFICATE AUTHORITY REGISTERED IN THE MAIN BROWSERS - WHICH IS MANY - INCLUDING NON-FRIENDLY NATIONAL STATE ACTORS!&lt;br /&gt;
&lt;br /&gt;
It is possible however to be virtually certain of confidentiality and accuracy of your communication using standard browsers, EVEN VERSUS CERTIFICATION AUTHORITIES. If, by inspecting the certificate when you are browsing a particular web site, you can satisfy  yourself that it is in fact truly the one in use by the web server, the chances of your communication being secure is virtually 100% The only chance is some failure in fundamental encryption protocols. Such failures would either be public knowledge very quickly, or not used versus you, for fear of it becoming public knowledge, unless you really have something incredibly valuable to hide. In this sense, self-certified certificates are the most secure, since you can obtain them by some other secure channel directly from the web server operator and do not change without your action. Note that in order to ensure that a certificate does not change during your session, to say an unknown valid certificate that breaks your security, your browser must support certificate pinning, in which case the browser will either prevent, or inform you if the certificate for the web site changes, either between or within sessions.&lt;br /&gt;
&lt;br /&gt;
To gain a practical understanding of the issues raised if you trust the certification authorities built in to your browser, consider the fact that many companies require an additional certificate authority to be installed in all corporate browsers (and in some famous cases have installed it covertly), and thereafter all https communications are decrypted in the company firewall/proxy using the corporate certificate, checked for content and reencrypted with the true certificate before being passed on - or vice versa, depending on the direction of flow of information. This, for example means that an employee accessing their bank account would be completely exposed to the corporate gaze. Two factor security would prevent corporate interference in say, instructions to make payments, but all information would be exposed and probably logged in possibly long term records. The same would apply to all https web sites accessed by the employee. Courts seem to agree that corporations have every right to do this but the average person is commonly not aware of it. If a person understood how https security works, they could inspect the https certificate to make sure it is the correct (same one issued by their bank apparent at home for example), since it is unlikely that an adversary (or in this case their employer) would control their actual browser software, but security is an arms race and once everybody knows how to defend themselves, adversaries and security operators will simply move to the next level. The next level may be preventing users from using their own browsers. This is already the case in most secure environment, but not all, and BYOD attitudes may prevail in the long run. Whatever the issues are in this case, the same general principle apply in other situations involving security.&lt;br /&gt;
&lt;br /&gt;
=== Generating a self signed certificate in pfx form for IIS ===&lt;br /&gt;
&lt;br /&gt;
Generating certificates and keys https://httpd.apache.org/docs/2.4/ssl/ssl_faq.html&lt;br /&gt;
&lt;br /&gt;
Generating a pfx using openssl https://langui.sh/2009/01/24/generating-a-pkcs12-pfx-via-openssl/&lt;br /&gt;
&lt;br /&gt;
==== Generate standard cert and key pair ====&lt;br /&gt;
&lt;br /&gt;
First generate a matching pair of certificate and key files (x509 and rsa format respectively)&lt;br /&gt;
&lt;br /&gt;
Example for *.mydomain and validity 9999 days from now&lt;br /&gt;
&lt;br /&gt;
 signer=self&lt;br /&gt;
 mydomain=neosys.com&lt;br /&gt;
 mydomains=*.neosys.com&lt;br /&gt;
 expirydays=9999&lt;br /&gt;
 keyno=`date`&lt;br /&gt;
 certno=$keyno&lt;br /&gt;
 #&lt;br /&gt;
 certfilename=$mydomain-$signer-$certno.cer&lt;br /&gt;
 keyfilename=$mydomain-$keyno.key&lt;br /&gt;
 #&amp;quot;-nodes&amp;quot; means -no-DES ie no encryption ie generate a key file without encrypting it and therefore without requiring a password on it&lt;br /&gt;
 openssl req -new -x509 -nodes -days $expirydays -out &amp;quot;$certfilename&amp;quot; -keyout &amp;quot;$keyfilename&amp;quot; \&lt;br /&gt;
     -subj &amp;quot;/C=AE/ST=DUBAI/O=NEOSYS/CN=*.neosys.com&amp;quot; \&lt;br /&gt;
     -reqexts SAN     -config &amp;lt;(cat /etc/ssl/openssl.cnf \&lt;br /&gt;
      &amp;lt;(printf &amp;quot;[SAN]\nsubjectAltName=DNS:*.hosts.neosys.com,DNS:*.support.neosys.com&amp;quot;)) \&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Consider adding subject and subject alternative names&lt;br /&gt;
&lt;br /&gt;
 openssl x509 -req -new -sha256 \&lt;br /&gt;
     -newkey rsa:2048 \&lt;br /&gt;
     -keyout neosys.com-102.key \&lt;br /&gt;
     -subj &amp;quot;/C=AE/ST=DUBAI/O=NEOSYS/CN=*.neosys.com&amp;quot; \&lt;br /&gt;
     -reqexts SAN     -config &amp;lt;(cat /etc/ssl/openssl.cnf \&lt;br /&gt;
      &amp;lt;(printf &amp;quot;[SAN]\nsubjectAltName=DNS:*.hosts.neosys.com,DNS:*.support.neosys.com&amp;quot;)) \&lt;br /&gt;
     -out neosys.com-102.crt \&lt;br /&gt;
     -nodes \&lt;br /&gt;
     -days 9999&lt;br /&gt;
&lt;br /&gt;
Example session:&lt;br /&gt;
&lt;br /&gt;
 Country Name (2 letter code) [AU]:AE&lt;br /&gt;
 State or Province Name (full name) [Some-State]:DUBAI&lt;br /&gt;
 Locality Name (eg, city) []:DUBAI&lt;br /&gt;
 Organization Name (eg, company) [Internet Widgits Pty Ltd]:NEOSYS&lt;br /&gt;
 Organizational Unit Name (eg, section) []:IT&lt;br /&gt;
 Common Name (e.g. server FQDN or YOUR name) []:*.neosys.com&lt;br /&gt;
 Email Address []:it@neosys.com&lt;br /&gt;
&lt;br /&gt;
=== Generating a properly signed certificate ===&lt;br /&gt;
&lt;br /&gt;
http://wiki.gandi.net/en/ssl/csr#sha-2_certificate_request&lt;br /&gt;
&lt;br /&gt;
==== Generate key and CSR file ====&lt;br /&gt;
&lt;br /&gt;
A certificate signing request file (.csr) for *.hosts.neosys.com (wildcard certificate)&lt;br /&gt;
&lt;br /&gt;
if you are renewing (and want to reuse an existing secret server key file mydomain.key, although not clear on the benefit ATM)&lt;br /&gt;
&lt;br /&gt;
 openssl req -new -nodes -sha256 -key mydomain.key -subj &amp;quot;/C=AE/ST=DUBAI/O=NEOSYS/CN=*.hosts.neosys.com&amp;quot; -out mydomain.csr&lt;br /&gt;
&lt;br /&gt;
or if you want to generate a new secret server key file&lt;br /&gt;
&lt;br /&gt;
 openssl req -new -nodes -sha256 -newkey rsa:2048 -keyout mydomain.key -subj &amp;quot;/C=AE/ST=DUBAI/O=NEOSYS/CN=*.hosts.neosys.com&amp;quot; -out mydomain.csr&lt;br /&gt;
&lt;br /&gt;
or if you want to request SAN subdomain wildcards (unlikely to be granted by main cert authorities but perfectly legal and can be self certified)&lt;br /&gt;
&lt;br /&gt;
 openssl req -new -nodes -sha256 -newkey rsa:2048 -keyout mydomain.key -subj &amp;quot;/C=AE/ST=DUBAI/O=NEOSYS/CN=*.neosys.com&amp;quot; -out mydomain.csr \&lt;br /&gt;
     -reqexts SAN     -config &amp;lt;(cat /etc/ssl/openssl.cnf \&lt;br /&gt;
        &amp;lt;(printf &amp;quot;[SAN]\nsubjectAltName=DNS:neosys.com,DNS:*.neosys.com,DNS:*.support.neosys.com,DNS:*.hosts.neosys.com&amp;quot;))&lt;br /&gt;
&lt;br /&gt;
View the csr and verify correct (check that SAN additional domains are listed if you requested them above)&lt;br /&gt;
&lt;br /&gt;
 openssl req -in mydomain.csr -noout -text&lt;br /&gt;
&lt;br /&gt;
==== Either send to CA and get crt/cer file back ====&lt;br /&gt;
&lt;br /&gt;
Send the csr file to the certifying authority and put their response in a mydomain.crt file&lt;br /&gt;
&lt;br /&gt;
Make sure you inform them that the type of software you used to generate the csr is &amp;quot;mod Apache/ModSSL&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 mydomain.csr -&amp;gt; mydomain.cer&lt;br /&gt;
&lt;br /&gt;
==== Or self sign to test all ok ====&lt;br /&gt;
&lt;br /&gt;
 nano ssl.conf&lt;br /&gt;
&lt;br /&gt;
 [req_distinguished_name]&lt;br /&gt;
 countryName = Country Name (2 letter code)&lt;br /&gt;
 countryName_default = AE&lt;br /&gt;
 stateOrProvinceName = State or Province Name (full name)&lt;br /&gt;
 stateOrProvinceName_default = Dubai&lt;br /&gt;
 localityName = Locality Name (eg, city)&lt;br /&gt;
 localityName_default = Dubai&lt;br /&gt;
 organizationalUnitName  = Organizational Unit Name (eg, section)&lt;br /&gt;
 organizationalUnitName_default  = IT&lt;br /&gt;
 commonName = *.neosys.com&lt;br /&gt;
 commonName_max  = 64&lt;br /&gt;
 #&lt;br /&gt;
 [ v3_req ]&lt;br /&gt;
 # Extensions to add to a certificate request&lt;br /&gt;
 basicConstraints = CA:FALSE&lt;br /&gt;
 #keyUsage = nonRepudiation, digitalSignature, keyEncipherment&lt;br /&gt;
 subjectAltName = @alt_names&lt;br /&gt;
 #&lt;br /&gt;
 [alt_names]&lt;br /&gt;
 DNS.1 = neosys.com&lt;br /&gt;
 DNS.2 = *.neosys.com&lt;br /&gt;
 DNS.3 = *.hosts.neosys.com&lt;br /&gt;
 DNS.4 = *.support.neosys.com&lt;br /&gt;
&lt;br /&gt;
 openssl x509 -signkey mydomain.key -in mydomain.csr -req -days 9999 -extensions v3_req   -extfile ssl.conf -out mydomain.crt&lt;br /&gt;
&lt;br /&gt;
view the cert and check extensions (additional domain names) are present if required&lt;br /&gt;
&lt;br /&gt;
 openssl x509 -in mydomain.crt -text -noout&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Merge private key and signed public cert into password protected pfx file ====&lt;br /&gt;
&lt;br /&gt;
Convert the pair of standard files into a single pfx file that IIS can import&lt;br /&gt;
&lt;br /&gt;
 friendlyname=&amp;quot;COMODO SIGNED hosts.neosys.com *.hosts.neosys.com&amp;quot;&lt;br /&gt;
 openssl pkcs12 -export -in mydomain.crt -inkey mydomain.key -name &amp;quot;$friendlyname&amp;quot; -out mydomain.pfx&lt;br /&gt;
&lt;br /&gt;
It will ask for a password .. the usual NEOSYS one is 1f... which will be required when you import the pfx file into IIS before binding to web sites&lt;br /&gt;
&lt;br /&gt;
Example session:&lt;br /&gt;
&lt;br /&gt;
 Enter Export Password:&lt;br /&gt;
 Verifying - Enter Export Password:&lt;br /&gt;
&lt;br /&gt;
Check the pfx file&lt;br /&gt;
&lt;br /&gt;
 openssl pkcs12 -in mydomain.pfx&lt;br /&gt;
&lt;br /&gt;
 openssl pkcs12 -in mydomain.pfx | openssl x509 -noout -text&lt;br /&gt;
&lt;br /&gt;
==== Copy the pfx file to the IIS server and import/bind in the usual way ====&lt;br /&gt;
&lt;br /&gt;
Copy it to the https server&lt;br /&gt;
&lt;br /&gt;
 mysshport=&amp;quot;-P 19510&amp;quot;&lt;br /&gt;
 mysshtarget=&amp;quot;administrator@win3.neosys.com:/cygdrive/d/hosts/CERTIFICATES&amp;quot;&lt;br /&gt;
 scp $mysshport mydomain.pfx $mysshtarget&lt;br /&gt;
&lt;br /&gt;
==== Friendly name in pfx file ====&lt;br /&gt;
&lt;br /&gt;
On the IIS server after importing, if you have multiple certificates for the same domain name you might like to add a &amp;quot;friendly name&amp;quot; to distinguish them in the dropdown when binding certificates to web sites.&lt;br /&gt;
&lt;br /&gt;
You might also want to add the friendly name to the pfx file if you intend to import it again or elsewhere using certificate export to pfx with options Include All and Export All&lt;br /&gt;
&lt;br /&gt;
https://rickardrobin.wordpress.com/2012/12/05/specifying-a-friendly-name-to-a-certificate/&lt;br /&gt;
&lt;br /&gt;
=== Understanding SSL certificates ===&lt;br /&gt;
&lt;br /&gt;
==== What are RSA Private Keys, CSRs and Certificates? ====&lt;br /&gt;
&lt;br /&gt;
YOUR RSA PRIVATE KEY FILE&lt;br /&gt;
&lt;br /&gt;
is a digital file created by you and never ever shared with others. It is USED ONLY BY YOU (never by others) to either:&lt;br /&gt;
&lt;br /&gt;
*to DECRYPT secret, encrypted, messages received by you from others&lt;br /&gt;
*to SIGN messages before sending them to others providing them certainty that the message came from you without being tampered with and that you cannot deny signing them.&lt;br /&gt;
&lt;br /&gt;
YOUR RSA PUBLIC KEY FILE&lt;br /&gt;
&lt;br /&gt;
is a digital file created by you and freely shared with others. It is USED BY OTHERS (never by you) to either:&lt;br /&gt;
&lt;br /&gt;
*ENCRYPT messages before sending them to you&lt;br /&gt;
*VERIFY that signed messages were in fact signed by you and not tampered with and you cannot deny signing them.&lt;br /&gt;
&lt;br /&gt;
OTHER PERSON&#039;S RSA PUBLIC KEY FILE&lt;br /&gt;
&lt;br /&gt;
is a digital file created by the other person and freely shared with you and others. It is USED BY YOU OR ANYBODY (never by the other person) to either:&lt;br /&gt;
&lt;br /&gt;
*ENCRYPT messages to achieve secrecy before sending them to the other person.&lt;br /&gt;
*VERIFY that signed messages received were in fact signed by the other person and that they cannot deny signing them nor claim they have been tampered with.&lt;br /&gt;
&lt;br /&gt;
To obtain someone&#039;s public key, you need a trusted channel, ie a signed channel, but not a secret or encrypted channel since the information is public and not confidential.&lt;br /&gt;
&lt;br /&gt;
Using your private key and someones public key together:&lt;br /&gt;
&lt;br /&gt;
*If you want to send a signed secret message to someone and allow them to be sure it came unmodified from you, you first sign the message using YOUR PRIVATE KEY, then encrypt the message using THEIR PUBLIC KEY&lt;br /&gt;
*If you want to receive a secret message and verify that it came unmodified from someone in particular, you first you decrypt the message using YOUR PRIVATE KEY, then verify the message using THEIR PUBLIC KEY&lt;br /&gt;
&lt;br /&gt;
Signing and Verification = Encryption and Decryption Mathematical Process with keys reversed&lt;br /&gt;
&lt;br /&gt;
Actually, the process of &amp;quot;signing&amp;quot; is doing the same mathematical process as encryption, but since you use the recipients public key, the resultant &amp;quot;encrypted&amp;quot; messege is not secret because it can be &amp;quot;decrypted&amp;quot; using a public key which are freely available.&lt;br /&gt;
&lt;br /&gt;
Likewise, the process of &amp;quot;verification&amp;quot; on a received message is doing the same mathematical process as decryption, but since you are using the senders public key, and anybody could &amp;quot;decrypt&amp;quot; the message, it was not really encrypted in the sense of being secret.&lt;br /&gt;
&lt;br /&gt;
So we have two processes, one called Encryption/Signing but is exactly the same mathematical process with two names depending on whether we use a public or private key, and another process called Decryption/Verification which uses the opposite key.&lt;br /&gt;
&lt;br /&gt;
What YOU use for what:&lt;br /&gt;
&lt;br /&gt;
*YOUR (PRIVATE) KEY = USED BY YOU for decryption and signing&lt;br /&gt;
*THEIR (PUBLIC) KEY = USED BY YOU for encryption and verification&lt;br /&gt;
&lt;br /&gt;
*YOUR (PUBLIC) KEY = NEVER USED BY YOU - since anybody else could do the same thing so no trust or secrecy could be obtained&lt;br /&gt;
*THEIR (PRIVATE) KEY = NEVER USED BY YOU - since you dont have it!&lt;br /&gt;
&lt;br /&gt;
What to use:&lt;br /&gt;
&lt;br /&gt;
*ENCRYPT OUTGOING = Use THEIR (public) key&lt;br /&gt;
*VERIFY INCOMING = Use THEIR (public) key&lt;br /&gt;
&lt;br /&gt;
*DECRYPT INCOMING = Use YOUR (private) key&lt;br /&gt;
*SIGN OUTGOING = Use YOUR (private) key&lt;br /&gt;
&lt;br /&gt;
So the slightly strange thing is that you dont encrypt messages with your private key as might be assumed naturally. You encrypt using the target recipient&#039;s public key. This is perfectly logical if you understand the concept asymmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
One thing to note is that, while it is obvious that other people never use your private key, since they dont have it, it is not obvious, but perfectly true, that you never use your public key. NOBODY EVER USES THEIR OWN PUBLIC KEY ... THEY ONLY GIVE IT TO OTHERS TO USE.&lt;br /&gt;
&lt;br /&gt;
CERTIFICATE&lt;br /&gt;
&lt;br /&gt;
It has a public component which you distribute (via your Certificate file) which allows people to encrypt those messages to you. It can also be used by you to sign messages that can be verified as having come from you by anyone who receives the signed message, using your public key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CSR FILE&lt;br /&gt;
&lt;br /&gt;
A Certificate Signing Request (CSR) is a digital file which contains your public key and your details eg name/domain name etc. You send the CSR to a Certifying Authority (CA), who will create a real Certificate containing your detail eg your domain name and your public key, signed by them using their private RSA private key.&lt;br /&gt;
&lt;br /&gt;
CERTIFICATE&lt;br /&gt;
&lt;br /&gt;
A Certificate contains your RSA public key, your name, the name of the CA, and is digitally signed by the CA. Browsers that know the CA can verify the signature on that Certificate, thereby obtaining your RSA public key. That enables them to send messages which only you can decrypt.&lt;br /&gt;
&lt;br /&gt;
==== What is Asymmetric cryptography? ====&lt;br /&gt;
&lt;br /&gt;
Asymmetric cryptography allows you to freely publish an encryption key that can be used by anyone to send you encrypted messages. Such messages can only be decrypted by you using a decryption key which you always keep secret.&lt;br /&gt;
&lt;br /&gt;
It also allows you to publish messages that can be verified by anyone as coming from you without any modification by others.&lt;br /&gt;
&lt;br /&gt;
So we have a pair of keys that if either one is used for encryption, then the other one is required for decryption. In that sense, we should not refer to the private key as the encryption key and the public key a&lt;br /&gt;
&lt;br /&gt;
To start encrypting or signing, you need a matched pair of keys and you need to forever keep one of them secret.&lt;br /&gt;
&lt;br /&gt;
.key a file that contains a random collection of characters that can be used to encrypt&lt;br /&gt;
&lt;br /&gt;
.cer a file that contains a random collection of characters that can be given out publically and used by anybody to encrypt something to be sent to you&lt;br /&gt;
&lt;br /&gt;
A certificate is some information that has been processed by a private and secret key.&lt;br /&gt;
&lt;br /&gt;
pfx contains a private key and public certificate which contains your public key embedded. Usually pfx files are encrypted and you have to enter a password before using them, ie importing them.&lt;br /&gt;
&lt;br /&gt;
==[[Backing up and Restoring IIS configuration]]==&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Backing_up_and_Restoring_IIS_configuration&amp;diff=2657</id>
		<title>Backing up and Restoring IIS configuration</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Backing_up_and_Restoring_IIS_configuration&amp;diff=2657"/>
		<updated>2016-04-22T15:13:41Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* other IIS APPCMD config commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Backing up and Restoring IIS configuration ==&lt;br /&gt;
&lt;br /&gt;
An automated backup process already exists in Windows IIS in every &lt;br /&gt;
installation but only to C: drive. This article discusses how to get it &lt;br /&gt;
backed up properly off-server by NEOSYS backup processes for servers &lt;br /&gt;
with lots of installations. Small installations hardly need backup of &lt;br /&gt;
IIS since it takes little time to reconfigure a single website.&lt;br /&gt;
&lt;br /&gt;
The main point of this article is to give an understanding of the backup &lt;br /&gt;
process and perhaps most importantly how it can be used to restore on &lt;br /&gt;
servers with large numbers of web sites like win3/win4.&lt;br /&gt;
&lt;br /&gt;
All IIS configuration performed in IIS manager seems to be backed &lt;br /&gt;
up/restored by the following procedures ... EXCEPT imported certificates &lt;br /&gt;
and the binding/mapping of port numbers to certificates which is &lt;br /&gt;
discussed later on in [[Backing up and Restoring IIS &lt;br /&gt;
configuration#Backing up certificate bindings]].&lt;br /&gt;
&lt;br /&gt;
This article does not include backup or restore of actual web site &lt;br /&gt;
directories, files and permissions.&lt;br /&gt;
&lt;br /&gt;
A simple backup of IIS configuration can be done any time and quickly at &lt;br /&gt;
before doing some change you are uncertain of in IIS.&lt;br /&gt;
&lt;br /&gt;
 c:\windows\system32\inetsrv\appcmd add backup SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
A simple restore will put everything back as it was. It appears that &lt;br /&gt;
sites unaffected by the restore are not restarted so this can be done &lt;br /&gt;
while users are online to unaffected websites. In the worst case, users &lt;br /&gt;
will have to login again but as this is a popup in the middle of &lt;br /&gt;
existing NEOSYS screens, they should not lose any work they are doing or &lt;br /&gt;
documents they are entering.&lt;br /&gt;
&lt;br /&gt;
c:\windows\system32\inetsrv\appcmd restore backup SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
Essentially the whole of IIS configuration for all sites is stored in a &lt;br /&gt;
single text file which can be edited, backed up and restored manually by &lt;br /&gt;
simple file copy, or by using the APPCMD.EXE programs which has the &lt;br /&gt;
advantage of automatically reloading IIS at the appropriate time.&lt;br /&gt;
&lt;br /&gt;
 applicationHost.config&lt;br /&gt;
&lt;br /&gt;
Windows provides a command &amp;quot;appcmd.exe&amp;quot; to manage IIS configuration from &lt;br /&gt;
the command line. All APPCMD commmands either need to be run in the &lt;br /&gt;
following directory or to be prefixed with &amp;quot;%windir%\system32\inetsrv\&amp;quot; &lt;br /&gt;
as follows:&lt;br /&gt;
&lt;br /&gt;
 c:&lt;br /&gt;
 cd %windir%\system32\inetsrv&lt;br /&gt;
 appcmd list backup&lt;br /&gt;
&lt;br /&gt;
or all in one line&lt;br /&gt;
&lt;br /&gt;
 %windir%\system32\inetsrv\appcmd list backup&lt;br /&gt;
&lt;br /&gt;
=== Set IIS automatic backup location to d: ===&lt;br /&gt;
&lt;br /&gt;
By default, Windows automatically backups the last 10 IIS configurations &lt;br /&gt;
to c:\inetpub\history, looking for changes every 2 minutes.&lt;br /&gt;
&lt;br /&gt;
Below steps are already done on win3/win4&lt;br /&gt;
&lt;br /&gt;
We need to:&lt;br /&gt;
&lt;br /&gt;
1. Change the location of the automatic backups since NEOSYS backup procedures dont backup C: drive. ESSENTIAL&lt;br /&gt;
2. Increase the number of backups. OPTIONAL&lt;br /&gt;
&lt;br /&gt;
Configure the new backup location on d: and increase the number of historical backups kept from 10 to 100&lt;br /&gt;
&lt;br /&gt;
 mkdir d:\inetpub\history&lt;br /&gt;
 c:&lt;br /&gt;
 cd %windir%\system32\inetsrv&lt;br /&gt;
 appcmd.exe set config -section:system.applicationHost/configHistory /path:&amp;quot;d:\inetpub\history&amp;quot; /commit:apphost&lt;br /&gt;
 appcmd.exe set config -section:system.applicationHost/configHistory /maxHistories:&amp;quot;100&amp;quot; /commit:apphost&lt;br /&gt;
&lt;br /&gt;
Check that automatic backups are in fact now going to D: by making some &lt;br /&gt;
trivial change in IIS and waiting 2 minutes to see the backup appear in D:&lt;br /&gt;
&lt;br /&gt;
=== Using other IIS configuration commands ===&lt;br /&gt;
&lt;br /&gt;
Other APPCMD configuration commands are as follows. Here showing setting &lt;br /&gt;
the default configuration.&lt;br /&gt;
&lt;br /&gt;
 appcmd set config -section:system.applicationHost/configHistory /enabled:&amp;quot;True&amp;quot; /commit:apphost&lt;br /&gt;
 appcmd set config -section:system.applicationHost/configHistory /period:&amp;quot;00:02:00&amp;quot; /commit:apphost&lt;br /&gt;
&lt;br /&gt;
=== Manually triggering backup of IIS ===&lt;br /&gt;
&lt;br /&gt;
 appcmd add backup SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
Manual backups are just copies of the IIS configuration file, the same &lt;br /&gt;
as the automatic backups ... but they are stored in a different place&lt;br /&gt;
&lt;br /&gt;
 C:\Windows\System32\inetsrv\backups\SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
=== Restoring IIS backups ===&lt;br /&gt;
&lt;br /&gt;
IIS backups can be listed, restored and deleted.&lt;br /&gt;
&lt;br /&gt;
 c:&lt;br /&gt;
 cd %windir%\system32\inetsrv&lt;br /&gt;
 appcmd list backup&lt;br /&gt;
 appcmd restore backup SOMEBACKUPNAME&lt;br /&gt;
 appcmd delete backup SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
Each backup is stored in a separate directory and you can rename them by &lt;br /&gt;
simply changing the directory name.&lt;br /&gt;
&lt;br /&gt;
The list of available backups is a merged set from the default automatic &lt;br /&gt;
location, the configured automatic location (changed from the default C: &lt;br /&gt;
to D:), and default manual backup location&lt;br /&gt;
&lt;br /&gt;
 c:\inetpub\history (AUTOMATICALLY TRIGGERED ORIGINALY)&lt;br /&gt;
 D:\inetpub\history\ (AUTOMATICALLY TRIGGERED AFTER RECONFIGURATION)&lt;br /&gt;
 c:\windows\system32\inetsrv\backups (MANUALLY TRIGGERED)&lt;br /&gt;
&lt;br /&gt;
There is no need to restart IIS after restoring using APPCMD RESTORE but &lt;br /&gt;
you may need to press F5 to refresh in IIS manager to see results of &lt;br /&gt;
restore if restore changes anything.&lt;br /&gt;
&lt;br /&gt;
=== Manually editing IIS configuration ===&lt;br /&gt;
&lt;br /&gt;
You can edit the configuration files in any backup and then restore that &lt;br /&gt;
backup.&lt;br /&gt;
&lt;br /&gt;
This is useful in order either to make custom changes that cannot be &lt;br /&gt;
done in the UI, eg removing an https binding without affecting other &lt;br /&gt;
sites that use the same certificate, or to make mass changes that can be &lt;br /&gt;
done quicker by editing a text file than navigating a complex GUI, such &lt;br /&gt;
as removing all http site bindings.&lt;br /&gt;
&lt;br /&gt;
 applicationHost.config&lt;br /&gt;
&lt;br /&gt;
=== other IIS APPCMD config commands ===&lt;br /&gt;
&lt;br /&gt;
 c:&lt;br /&gt;
 cd %windir%\system32\inetsrv&lt;br /&gt;
 appcmd list site&lt;br /&gt;
 appcmd list site demo&lt;br /&gt;
 appcmd list config&lt;br /&gt;
&lt;br /&gt;
=== Backing up certificate bindings ===&lt;br /&gt;
&lt;br /&gt;
There is not a lot too this really but it is better that it is automated.&lt;br /&gt;
&lt;br /&gt;
To make a backup file called bindcerts.sh&lt;br /&gt;
&lt;br /&gt;
Find the hash of the current standard *.hosts.neosys.com certificate. &lt;br /&gt;
This will change only once a year or however often the https certificate &lt;br /&gt;
is renewed, probably once a year. Check the expiry date on the &lt;br /&gt;
certificate. Run the following command and pick the hash next to a port &lt;br /&gt;
you know is currently bound to the certificate. probably most or all &lt;br /&gt;
ports will be bound to the same certificate hash.&lt;br /&gt;
&lt;br /&gt;
 netsh http show sslcert|grep -B1 Hash&lt;br /&gt;
&lt;br /&gt;
Make the backup file called bindcerts.sh. put CERTHASH=.. what you found &lt;br /&gt;
in the previous step. NO SPACES OR QUOTES&lt;br /&gt;
&lt;br /&gt;
 CERTHASH=06249326271595871fd935a37bd1334bb761e519&lt;br /&gt;
&lt;br /&gt;
 netsh http show sslcert| \&lt;br /&gt;
 grep -B1 &amp;quot;$CERTHASH&amp;quot;| \&lt;br /&gt;
 grep port| \&lt;br /&gt;
 awk -v CERTHASH=&amp;quot;$CERTHASH&amp;quot; &#039;{print &amp;quot;netsh http add sslcert ipport=&amp;quot; $3 &amp;quot; certhash= &amp;quot; CERTHASH &amp;quot; appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&amp;quot;}&#039; \&lt;br /&gt;
 | tee bindcerts.sh&lt;br /&gt;
&lt;br /&gt;
=== Restoring certificate bindings ===&lt;br /&gt;
&lt;br /&gt;
If you dont have the backup file then you can just import the &lt;br /&gt;
certificate and redo the bindings without much effort anyway. This &lt;br /&gt;
process is more to enable automated restores on warm backup servers.&lt;br /&gt;
&lt;br /&gt;
This will only ADD bindings, it will not delete, nor overwrite any &lt;br /&gt;
existing bindings so you might have to delete bindings first to allow &lt;br /&gt;
changes.&lt;br /&gt;
&lt;br /&gt;
Get the bindcerts.sh file from the restore stage&lt;br /&gt;
&lt;br /&gt;
Make the file executable and execute it&lt;br /&gt;
&lt;br /&gt;
 chmod +x bindcerts.sh&lt;br /&gt;
 ./bindcerts.sh&lt;br /&gt;
&lt;br /&gt;
If you get a message &amp;quot;parameter incorrect&amp;quot; then check that your hash is &lt;br /&gt;
correct and everything else is exactly correct. Check characters one by &lt;br /&gt;
one from the BACK of the sentence SLOWLY to ensure you are not suffering &lt;br /&gt;
from inattention to detail!&lt;br /&gt;
&lt;br /&gt;
 The parameter is incorrect.&lt;br /&gt;
&lt;br /&gt;
If you get a message &amp;quot;already exists&amp;quot; then perhaps you have already &lt;br /&gt;
bound the port to the right certificate .. or a wrong/old certificate&lt;br /&gt;
&lt;br /&gt;
 SSL Certificate add failed, Error: 183&lt;br /&gt;
 Cannot create a file when that file already exists.&lt;br /&gt;
&lt;br /&gt;
... delete the binding and try again. Here is an example of deleting &lt;br /&gt;
binding on port 43999&lt;br /&gt;
&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:43999&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Backing_up_and_Restoring_IIS_configuration&amp;diff=2656</id>
		<title>Backing up and Restoring IIS configuration</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Backing_up_and_Restoring_IIS_configuration&amp;diff=2656"/>
		<updated>2016-04-22T15:13:24Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Restoring IIS backups */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Backing up and Restoring IIS configuration ==&lt;br /&gt;
&lt;br /&gt;
An automated backup process already exists in Windows IIS in every &lt;br /&gt;
installation but only to C: drive. This article discusses how to get it &lt;br /&gt;
backed up properly off-server by NEOSYS backup processes for servers &lt;br /&gt;
with lots of installations. Small installations hardly need backup of &lt;br /&gt;
IIS since it takes little time to reconfigure a single website.&lt;br /&gt;
&lt;br /&gt;
The main point of this article is to give an understanding of the backup &lt;br /&gt;
process and perhaps most importantly how it can be used to restore on &lt;br /&gt;
servers with large numbers of web sites like win3/win4.&lt;br /&gt;
&lt;br /&gt;
All IIS configuration performed in IIS manager seems to be backed &lt;br /&gt;
up/restored by the following procedures ... EXCEPT imported certificates &lt;br /&gt;
and the binding/mapping of port numbers to certificates which is &lt;br /&gt;
discussed later on in [[Backing up and Restoring IIS &lt;br /&gt;
configuration#Backing up certificate bindings]].&lt;br /&gt;
&lt;br /&gt;
This article does not include backup or restore of actual web site &lt;br /&gt;
directories, files and permissions.&lt;br /&gt;
&lt;br /&gt;
A simple backup of IIS configuration can be done any time and quickly at &lt;br /&gt;
before doing some change you are uncertain of in IIS.&lt;br /&gt;
&lt;br /&gt;
 c:\windows\system32\inetsrv\appcmd add backup SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
A simple restore will put everything back as it was. It appears that &lt;br /&gt;
sites unaffected by the restore are not restarted so this can be done &lt;br /&gt;
while users are online to unaffected websites. In the worst case, users &lt;br /&gt;
will have to login again but as this is a popup in the middle of &lt;br /&gt;
existing NEOSYS screens, they should not lose any work they are doing or &lt;br /&gt;
documents they are entering.&lt;br /&gt;
&lt;br /&gt;
c:\windows\system32\inetsrv\appcmd restore backup SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
Essentially the whole of IIS configuration for all sites is stored in a &lt;br /&gt;
single text file which can be edited, backed up and restored manually by &lt;br /&gt;
simple file copy, or by using the APPCMD.EXE programs which has the &lt;br /&gt;
advantage of automatically reloading IIS at the appropriate time.&lt;br /&gt;
&lt;br /&gt;
 applicationHost.config&lt;br /&gt;
&lt;br /&gt;
Windows provides a command &amp;quot;appcmd.exe&amp;quot; to manage IIS configuration from &lt;br /&gt;
the command line. All APPCMD commmands either need to be run in the &lt;br /&gt;
following directory or to be prefixed with &amp;quot;%windir%\system32\inetsrv\&amp;quot; &lt;br /&gt;
as follows:&lt;br /&gt;
&lt;br /&gt;
 c:&lt;br /&gt;
 cd %windir%\system32\inetsrv&lt;br /&gt;
 appcmd list backup&lt;br /&gt;
&lt;br /&gt;
or all in one line&lt;br /&gt;
&lt;br /&gt;
 %windir%\system32\inetsrv\appcmd list backup&lt;br /&gt;
&lt;br /&gt;
=== Set IIS automatic backup location to d: ===&lt;br /&gt;
&lt;br /&gt;
By default, Windows automatically backups the last 10 IIS configurations &lt;br /&gt;
to c:\inetpub\history, looking for changes every 2 minutes.&lt;br /&gt;
&lt;br /&gt;
Below steps are already done on win3/win4&lt;br /&gt;
&lt;br /&gt;
We need to:&lt;br /&gt;
&lt;br /&gt;
1. Change the location of the automatic backups since NEOSYS backup procedures dont backup C: drive. ESSENTIAL&lt;br /&gt;
2. Increase the number of backups. OPTIONAL&lt;br /&gt;
&lt;br /&gt;
Configure the new backup location on d: and increase the number of historical backups kept from 10 to 100&lt;br /&gt;
&lt;br /&gt;
 mkdir d:\inetpub\history&lt;br /&gt;
 c:&lt;br /&gt;
 cd %windir%\system32\inetsrv&lt;br /&gt;
 appcmd.exe set config -section:system.applicationHost/configHistory /path:&amp;quot;d:\inetpub\history&amp;quot; /commit:apphost&lt;br /&gt;
 appcmd.exe set config -section:system.applicationHost/configHistory /maxHistories:&amp;quot;100&amp;quot; /commit:apphost&lt;br /&gt;
&lt;br /&gt;
Check that automatic backups are in fact now going to D: by making some &lt;br /&gt;
trivial change in IIS and waiting 2 minutes to see the backup appear in D:&lt;br /&gt;
&lt;br /&gt;
=== Using other IIS configuration commands ===&lt;br /&gt;
&lt;br /&gt;
Other APPCMD configuration commands are as follows. Here showing setting &lt;br /&gt;
the default configuration.&lt;br /&gt;
&lt;br /&gt;
 appcmd set config -section:system.applicationHost/configHistory /enabled:&amp;quot;True&amp;quot; /commit:apphost&lt;br /&gt;
 appcmd set config -section:system.applicationHost/configHistory /period:&amp;quot;00:02:00&amp;quot; /commit:apphost&lt;br /&gt;
&lt;br /&gt;
=== Manually triggering backup of IIS ===&lt;br /&gt;
&lt;br /&gt;
 appcmd add backup SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
Manual backups are just copies of the IIS configuration file, the same &lt;br /&gt;
as the automatic backups ... but they are stored in a different place&lt;br /&gt;
&lt;br /&gt;
 C:\Windows\System32\inetsrv\backups\SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
=== Restoring IIS backups ===&lt;br /&gt;
&lt;br /&gt;
IIS backups can be listed, restored and deleted.&lt;br /&gt;
&lt;br /&gt;
 c:&lt;br /&gt;
 cd %windir%\system32\inetsrv&lt;br /&gt;
 appcmd list backup&lt;br /&gt;
 appcmd restore backup SOMEBACKUPNAME&lt;br /&gt;
 appcmd delete backup SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
Each backup is stored in a separate directory and you can rename them by &lt;br /&gt;
simply changing the directory name.&lt;br /&gt;
&lt;br /&gt;
The list of available backups is a merged set from the default automatic &lt;br /&gt;
location, the configured automatic location (changed from the default C: &lt;br /&gt;
to D:), and default manual backup location&lt;br /&gt;
&lt;br /&gt;
 c:\inetpub\history (AUTOMATICALLY TRIGGERED ORIGINALY)&lt;br /&gt;
 D:\inetpub\history\ (AUTOMATICALLY TRIGGERED AFTER RECONFIGURATION)&lt;br /&gt;
 c:\windows\system32\inetsrv\backups (MANUALLY TRIGGERED)&lt;br /&gt;
&lt;br /&gt;
There is no need to restart IIS after restoring using APPCMD RESTORE but &lt;br /&gt;
you may need to press F5 to refresh in IIS manager to see results of &lt;br /&gt;
restore if restore changes anything.&lt;br /&gt;
&lt;br /&gt;
=== Manually editing IIS configuration ===&lt;br /&gt;
&lt;br /&gt;
You can edit the configuration files in any backup and then restore that &lt;br /&gt;
backup.&lt;br /&gt;
&lt;br /&gt;
This is useful in order either to make custom changes that cannot be &lt;br /&gt;
done in the UI, eg removing an https binding without affecting other &lt;br /&gt;
sites that use the same certificate, or to make mass changes that can be &lt;br /&gt;
done quicker by editing a text file than navigating a complex GUI, such &lt;br /&gt;
as removing all http site bindings.&lt;br /&gt;
&lt;br /&gt;
 applicationHost.config&lt;br /&gt;
&lt;br /&gt;
=== other IIS APPCMD config commands ===&lt;br /&gt;
&lt;br /&gt;
 appcmd list site&lt;br /&gt;
 appcmd list site demo&lt;br /&gt;
 appcmd list config&lt;br /&gt;
&lt;br /&gt;
=== Backing up certificate bindings ===&lt;br /&gt;
&lt;br /&gt;
There is not a lot too this really but it is better that it is automated.&lt;br /&gt;
&lt;br /&gt;
To make a backup file called bindcerts.sh&lt;br /&gt;
&lt;br /&gt;
Find the hash of the current standard *.hosts.neosys.com certificate. &lt;br /&gt;
This will change only once a year or however often the https certificate &lt;br /&gt;
is renewed, probably once a year. Check the expiry date on the &lt;br /&gt;
certificate. Run the following command and pick the hash next to a port &lt;br /&gt;
you know is currently bound to the certificate. probably most or all &lt;br /&gt;
ports will be bound to the same certificate hash.&lt;br /&gt;
&lt;br /&gt;
 netsh http show sslcert|grep -B1 Hash&lt;br /&gt;
&lt;br /&gt;
Make the backup file called bindcerts.sh. put CERTHASH=.. what you found &lt;br /&gt;
in the previous step. NO SPACES OR QUOTES&lt;br /&gt;
&lt;br /&gt;
 CERTHASH=06249326271595871fd935a37bd1334bb761e519&lt;br /&gt;
&lt;br /&gt;
 netsh http show sslcert| \&lt;br /&gt;
 grep -B1 &amp;quot;$CERTHASH&amp;quot;| \&lt;br /&gt;
 grep port| \&lt;br /&gt;
 awk -v CERTHASH=&amp;quot;$CERTHASH&amp;quot; &#039;{print &amp;quot;netsh http add sslcert ipport=&amp;quot; $3 &amp;quot; certhash= &amp;quot; CERTHASH &amp;quot; appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&amp;quot;}&#039; \&lt;br /&gt;
 | tee bindcerts.sh&lt;br /&gt;
&lt;br /&gt;
=== Restoring certificate bindings ===&lt;br /&gt;
&lt;br /&gt;
If you dont have the backup file then you can just import the &lt;br /&gt;
certificate and redo the bindings without much effort anyway. This &lt;br /&gt;
process is more to enable automated restores on warm backup servers.&lt;br /&gt;
&lt;br /&gt;
This will only ADD bindings, it will not delete, nor overwrite any &lt;br /&gt;
existing bindings so you might have to delete bindings first to allow &lt;br /&gt;
changes.&lt;br /&gt;
&lt;br /&gt;
Get the bindcerts.sh file from the restore stage&lt;br /&gt;
&lt;br /&gt;
Make the file executable and execute it&lt;br /&gt;
&lt;br /&gt;
 chmod +x bindcerts.sh&lt;br /&gt;
 ./bindcerts.sh&lt;br /&gt;
&lt;br /&gt;
If you get a message &amp;quot;parameter incorrect&amp;quot; then check that your hash is &lt;br /&gt;
correct and everything else is exactly correct. Check characters one by &lt;br /&gt;
one from the BACK of the sentence SLOWLY to ensure you are not suffering &lt;br /&gt;
from inattention to detail!&lt;br /&gt;
&lt;br /&gt;
 The parameter is incorrect.&lt;br /&gt;
&lt;br /&gt;
If you get a message &amp;quot;already exists&amp;quot; then perhaps you have already &lt;br /&gt;
bound the port to the right certificate .. or a wrong/old certificate&lt;br /&gt;
&lt;br /&gt;
 SSL Certificate add failed, Error: 183&lt;br /&gt;
 Cannot create a file when that file already exists.&lt;br /&gt;
&lt;br /&gt;
... delete the binding and try again. Here is an example of deleting &lt;br /&gt;
binding on port 43999&lt;br /&gt;
&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:43999&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Backing_up_and_Restoring_IIS_configuration&amp;diff=2655</id>
		<title>Backing up and Restoring IIS configuration</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Backing_up_and_Restoring_IIS_configuration&amp;diff=2655"/>
		<updated>2016-04-22T15:12:49Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Backing up and Restoring IIS configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Backing up and Restoring IIS configuration ==&lt;br /&gt;
&lt;br /&gt;
An automated backup process already exists in Windows IIS in every &lt;br /&gt;
installation but only to C: drive. This article discusses how to get it &lt;br /&gt;
backed up properly off-server by NEOSYS backup processes for servers &lt;br /&gt;
with lots of installations. Small installations hardly need backup of &lt;br /&gt;
IIS since it takes little time to reconfigure a single website.&lt;br /&gt;
&lt;br /&gt;
The main point of this article is to give an understanding of the backup &lt;br /&gt;
process and perhaps most importantly how it can be used to restore on &lt;br /&gt;
servers with large numbers of web sites like win3/win4.&lt;br /&gt;
&lt;br /&gt;
All IIS configuration performed in IIS manager seems to be backed &lt;br /&gt;
up/restored by the following procedures ... EXCEPT imported certificates &lt;br /&gt;
and the binding/mapping of port numbers to certificates which is &lt;br /&gt;
discussed later on in [[Backing up and Restoring IIS &lt;br /&gt;
configuration#Backing up certificate bindings]].&lt;br /&gt;
&lt;br /&gt;
This article does not include backup or restore of actual web site &lt;br /&gt;
directories, files and permissions.&lt;br /&gt;
&lt;br /&gt;
A simple backup of IIS configuration can be done any time and quickly at &lt;br /&gt;
before doing some change you are uncertain of in IIS.&lt;br /&gt;
&lt;br /&gt;
 c:\windows\system32\inetsrv\appcmd add backup SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
A simple restore will put everything back as it was. It appears that &lt;br /&gt;
sites unaffected by the restore are not restarted so this can be done &lt;br /&gt;
while users are online to unaffected websites. In the worst case, users &lt;br /&gt;
will have to login again but as this is a popup in the middle of &lt;br /&gt;
existing NEOSYS screens, they should not lose any work they are doing or &lt;br /&gt;
documents they are entering.&lt;br /&gt;
&lt;br /&gt;
c:\windows\system32\inetsrv\appcmd restore backup SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
Essentially the whole of IIS configuration for all sites is stored in a &lt;br /&gt;
single text file which can be edited, backed up and restored manually by &lt;br /&gt;
simple file copy, or by using the APPCMD.EXE programs which has the &lt;br /&gt;
advantage of automatically reloading IIS at the appropriate time.&lt;br /&gt;
&lt;br /&gt;
 applicationHost.config&lt;br /&gt;
&lt;br /&gt;
Windows provides a command &amp;quot;appcmd.exe&amp;quot; to manage IIS configuration from &lt;br /&gt;
the command line. All APPCMD commmands either need to be run in the &lt;br /&gt;
following directory or to be prefixed with &amp;quot;%windir%\system32\inetsrv\&amp;quot; &lt;br /&gt;
as follows:&lt;br /&gt;
&lt;br /&gt;
 c:&lt;br /&gt;
 cd %windir%\system32\inetsrv&lt;br /&gt;
 appcmd list backup&lt;br /&gt;
&lt;br /&gt;
or all in one line&lt;br /&gt;
&lt;br /&gt;
 %windir%\system32\inetsrv\appcmd list backup&lt;br /&gt;
&lt;br /&gt;
=== Set IIS automatic backup location to d: ===&lt;br /&gt;
&lt;br /&gt;
By default, Windows automatically backups the last 10 IIS configurations &lt;br /&gt;
to c:\inetpub\history, looking for changes every 2 minutes.&lt;br /&gt;
&lt;br /&gt;
Below steps are already done on win3/win4&lt;br /&gt;
&lt;br /&gt;
We need to:&lt;br /&gt;
&lt;br /&gt;
1. Change the location of the automatic backups since NEOSYS backup procedures dont backup C: drive. ESSENTIAL&lt;br /&gt;
2. Increase the number of backups. OPTIONAL&lt;br /&gt;
&lt;br /&gt;
Configure the new backup location on d: and increase the number of historical backups kept from 10 to 100&lt;br /&gt;
&lt;br /&gt;
 mkdir d:\inetpub\history&lt;br /&gt;
 c:&lt;br /&gt;
 cd %windir%\system32\inetsrv&lt;br /&gt;
 appcmd.exe set config -section:system.applicationHost/configHistory /path:&amp;quot;d:\inetpub\history&amp;quot; /commit:apphost&lt;br /&gt;
 appcmd.exe set config -section:system.applicationHost/configHistory /maxHistories:&amp;quot;100&amp;quot; /commit:apphost&lt;br /&gt;
&lt;br /&gt;
Check that automatic backups are in fact now going to D: by making some &lt;br /&gt;
trivial change in IIS and waiting 2 minutes to see the backup appear in D:&lt;br /&gt;
&lt;br /&gt;
=== Using other IIS configuration commands ===&lt;br /&gt;
&lt;br /&gt;
Other APPCMD configuration commands are as follows. Here showing setting &lt;br /&gt;
the default configuration.&lt;br /&gt;
&lt;br /&gt;
 appcmd set config -section:system.applicationHost/configHistory /enabled:&amp;quot;True&amp;quot; /commit:apphost&lt;br /&gt;
 appcmd set config -section:system.applicationHost/configHistory /period:&amp;quot;00:02:00&amp;quot; /commit:apphost&lt;br /&gt;
&lt;br /&gt;
=== Manually triggering backup of IIS ===&lt;br /&gt;
&lt;br /&gt;
 appcmd add backup SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
Manual backups are just copies of the IIS configuration file, the same &lt;br /&gt;
as the automatic backups ... but they are stored in a different place&lt;br /&gt;
&lt;br /&gt;
 C:\Windows\System32\inetsrv\backups\SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
=== Restoring IIS backups ===&lt;br /&gt;
&lt;br /&gt;
IIS backups can be listed, restored and deleted.&lt;br /&gt;
&lt;br /&gt;
 appcmd list backup&lt;br /&gt;
 appcmd restore backup SOMEBACKUPNAME&lt;br /&gt;
 appcmd delete backup SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
Each backup is stored in a separate directory and you can rename them by &lt;br /&gt;
simply changing the directory name.&lt;br /&gt;
&lt;br /&gt;
The list of available backups is a merged set from the default automatic &lt;br /&gt;
location, the configured automatic location (changed from the default C: &lt;br /&gt;
to D:), and default manual backup location&lt;br /&gt;
&lt;br /&gt;
 c:\inetpub\history (AUTOMATICALLY TRIGGERED ORIGINALY)&lt;br /&gt;
 D:\inetpub\history\ (AUTOMATICALLY TRIGGERED AFTER RECONFIGURATION)&lt;br /&gt;
 c:\windows\system32\inetsrv\backups (MANUALLY TRIGGERED)&lt;br /&gt;
&lt;br /&gt;
There is no need to restart IIS after restoring using APPCMD RESTORE but &lt;br /&gt;
you may need to press F5 to refresh in IIS manager to see results of &lt;br /&gt;
restore if restore changes anything.&lt;br /&gt;
&lt;br /&gt;
=== Manually editing IIS configuration ===&lt;br /&gt;
&lt;br /&gt;
You can edit the configuration files in any backup and then restore that &lt;br /&gt;
backup.&lt;br /&gt;
&lt;br /&gt;
This is useful in order either to make custom changes that cannot be &lt;br /&gt;
done in the UI, eg removing an https binding without affecting other &lt;br /&gt;
sites that use the same certificate, or to make mass changes that can be &lt;br /&gt;
done quicker by editing a text file than navigating a complex GUI, such &lt;br /&gt;
as removing all http site bindings.&lt;br /&gt;
&lt;br /&gt;
 applicationHost.config&lt;br /&gt;
&lt;br /&gt;
=== other IIS APPCMD config commands ===&lt;br /&gt;
&lt;br /&gt;
 appcmd list site&lt;br /&gt;
 appcmd list site demo&lt;br /&gt;
 appcmd list config&lt;br /&gt;
&lt;br /&gt;
=== Backing up certificate bindings ===&lt;br /&gt;
&lt;br /&gt;
There is not a lot too this really but it is better that it is automated.&lt;br /&gt;
&lt;br /&gt;
To make a backup file called bindcerts.sh&lt;br /&gt;
&lt;br /&gt;
Find the hash of the current standard *.hosts.neosys.com certificate. &lt;br /&gt;
This will change only once a year or however often the https certificate &lt;br /&gt;
is renewed, probably once a year. Check the expiry date on the &lt;br /&gt;
certificate. Run the following command and pick the hash next to a port &lt;br /&gt;
you know is currently bound to the certificate. probably most or all &lt;br /&gt;
ports will be bound to the same certificate hash.&lt;br /&gt;
&lt;br /&gt;
 netsh http show sslcert|grep -B1 Hash&lt;br /&gt;
&lt;br /&gt;
Make the backup file called bindcerts.sh. put CERTHASH=.. what you found &lt;br /&gt;
in the previous step. NO SPACES OR QUOTES&lt;br /&gt;
&lt;br /&gt;
 CERTHASH=06249326271595871fd935a37bd1334bb761e519&lt;br /&gt;
&lt;br /&gt;
 netsh http show sslcert| \&lt;br /&gt;
 grep -B1 &amp;quot;$CERTHASH&amp;quot;| \&lt;br /&gt;
 grep port| \&lt;br /&gt;
 awk -v CERTHASH=&amp;quot;$CERTHASH&amp;quot; &#039;{print &amp;quot;netsh http add sslcert ipport=&amp;quot; $3 &amp;quot; certhash= &amp;quot; CERTHASH &amp;quot; appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&amp;quot;}&#039; \&lt;br /&gt;
 | tee bindcerts.sh&lt;br /&gt;
&lt;br /&gt;
=== Restoring certificate bindings ===&lt;br /&gt;
&lt;br /&gt;
If you dont have the backup file then you can just import the &lt;br /&gt;
certificate and redo the bindings without much effort anyway. This &lt;br /&gt;
process is more to enable automated restores on warm backup servers.&lt;br /&gt;
&lt;br /&gt;
This will only ADD bindings, it will not delete, nor overwrite any &lt;br /&gt;
existing bindings so you might have to delete bindings first to allow &lt;br /&gt;
changes.&lt;br /&gt;
&lt;br /&gt;
Get the bindcerts.sh file from the restore stage&lt;br /&gt;
&lt;br /&gt;
Make the file executable and execute it&lt;br /&gt;
&lt;br /&gt;
 chmod +x bindcerts.sh&lt;br /&gt;
 ./bindcerts.sh&lt;br /&gt;
&lt;br /&gt;
If you get a message &amp;quot;parameter incorrect&amp;quot; then check that your hash is &lt;br /&gt;
correct and everything else is exactly correct. Check characters one by &lt;br /&gt;
one from the BACK of the sentence SLOWLY to ensure you are not suffering &lt;br /&gt;
from inattention to detail!&lt;br /&gt;
&lt;br /&gt;
 The parameter is incorrect.&lt;br /&gt;
&lt;br /&gt;
If you get a message &amp;quot;already exists&amp;quot; then perhaps you have already &lt;br /&gt;
bound the port to the right certificate .. or a wrong/old certificate&lt;br /&gt;
&lt;br /&gt;
 SSL Certificate add failed, Error: 183&lt;br /&gt;
 Cannot create a file when that file already exists.&lt;br /&gt;
&lt;br /&gt;
... delete the binding and try again. Here is an example of deleting &lt;br /&gt;
binding on port 43999&lt;br /&gt;
&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:43999&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=Backing_up_and_Restoring_IIS_configuration&amp;diff=2654</id>
		<title>Backing up and Restoring IIS configuration</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=Backing_up_and_Restoring_IIS_configuration&amp;diff=2654"/>
		<updated>2016-04-22T15:11:49Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Set IIS automatic backup location to d: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Backing up and Restoring IIS configuration ==&lt;br /&gt;
&lt;br /&gt;
An automated backup process already exists in Windows IIS in every &lt;br /&gt;
installation but only to C: drive. This article discusses how to get it &lt;br /&gt;
backed up properly off-server by NEOSYS backup processes for servers &lt;br /&gt;
with lots of installations. Small installations hardly need backup of &lt;br /&gt;
IIS since it takes little time to reconfigure a single website.&lt;br /&gt;
&lt;br /&gt;
The main point of this article is to give an understanding of the backup &lt;br /&gt;
process and perhaps most importantly how it can be used to restore on &lt;br /&gt;
servers with large numbers of web sites like win3/win4.&lt;br /&gt;
&lt;br /&gt;
All IIS configuration performed in IIS manager seems to be backed &lt;br /&gt;
up/restored by the following procedures ... EXCEPT imported certificates &lt;br /&gt;
and the binding/mapping of port numbers to certificates which is &lt;br /&gt;
discussed later on in [[Backing up and Restoring IIS &lt;br /&gt;
configuration#Backing up certificate bindings]].&lt;br /&gt;
&lt;br /&gt;
This article does not include backup or restore of actual web site &lt;br /&gt;
directories, files and permissions.&lt;br /&gt;
&lt;br /&gt;
A simple backup of IIS configuration can be done any time and quickly at &lt;br /&gt;
before doing some change you are uncertain of in IIS.&lt;br /&gt;
&lt;br /&gt;
 c:\windows\system32\inetsrv\appcmd add backup SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
A simple restore will put everything back as it was. It appears that &lt;br /&gt;
sites unaffected by the restore are not restarted so this can be done &lt;br /&gt;
while users are online to unaffected websites. In the worst case, users &lt;br /&gt;
will have to login again but as this is a popup in the middle of &lt;br /&gt;
existing NEOSYS screens, they should not lose any work they are doing or &lt;br /&gt;
documents they are entering.&lt;br /&gt;
&lt;br /&gt;
c:\windows\system32\inetsrv\appcmd restore backup SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
Essentially the whole of IIS configuration for all sites is stored in a &lt;br /&gt;
single text file which can be edited, backed up and restored manually by &lt;br /&gt;
simple file copy, or by using the APPCMD.EXE programs which has the &lt;br /&gt;
advantage of automatically reloading IIS at the appropriate time.&lt;br /&gt;
&lt;br /&gt;
 applicationHost.config&lt;br /&gt;
&lt;br /&gt;
Windows provides a command &amp;quot;appcmd.exe&amp;quot; to manage IIS configuration from &lt;br /&gt;
the command line. All APPCMD commmands either need to be run in the &lt;br /&gt;
following directory or to be prefixed with &amp;quot;%windir%\system32\inetsrv\&amp;quot; &lt;br /&gt;
as follows:&lt;br /&gt;
&lt;br /&gt;
 c:&lt;br /&gt;
 cd %windir%\system32\inetsrv&lt;br /&gt;
 appcmd list backup&lt;br /&gt;
&lt;br /&gt;
or all in one line&lt;br /&gt;
&lt;br /&gt;
 %windir%\system32\inetsrvz\appcmd list backup&lt;br /&gt;
&lt;br /&gt;
=== Set IIS automatic backup location to d: ===&lt;br /&gt;
&lt;br /&gt;
By default, Windows automatically backups the last 10 IIS configurations &lt;br /&gt;
to c:\inetpub\history, looking for changes every 2 minutes.&lt;br /&gt;
&lt;br /&gt;
Below steps are already done on win3/win4&lt;br /&gt;
&lt;br /&gt;
We need to:&lt;br /&gt;
&lt;br /&gt;
1. Change the location of the automatic backups since NEOSYS backup procedures dont backup C: drive. ESSENTIAL&lt;br /&gt;
2. Increase the number of backups. OPTIONAL&lt;br /&gt;
&lt;br /&gt;
Configure the new backup location on d: and increase the number of historical backups kept from 10 to 100&lt;br /&gt;
&lt;br /&gt;
 mkdir d:\inetpub\history&lt;br /&gt;
 c:&lt;br /&gt;
 cd %windir%\system32\inetsrv&lt;br /&gt;
 appcmd.exe set config -section:system.applicationHost/configHistory /path:&amp;quot;d:\inetpub\history&amp;quot; /commit:apphost&lt;br /&gt;
 appcmd.exe set config -section:system.applicationHost/configHistory /maxHistories:&amp;quot;100&amp;quot; /commit:apphost&lt;br /&gt;
&lt;br /&gt;
Check that automatic backups are in fact now going to D: by making some &lt;br /&gt;
trivial change in IIS and waiting 2 minutes to see the backup appear in D:&lt;br /&gt;
&lt;br /&gt;
=== Using other IIS configuration commands ===&lt;br /&gt;
&lt;br /&gt;
Other APPCMD configuration commands are as follows. Here showing setting &lt;br /&gt;
the default configuration.&lt;br /&gt;
&lt;br /&gt;
 appcmd set config -section:system.applicationHost/configHistory /enabled:&amp;quot;True&amp;quot; /commit:apphost&lt;br /&gt;
 appcmd set config -section:system.applicationHost/configHistory /period:&amp;quot;00:02:00&amp;quot; /commit:apphost&lt;br /&gt;
&lt;br /&gt;
=== Manually triggering backup of IIS ===&lt;br /&gt;
&lt;br /&gt;
 appcmd add backup SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
Manual backups are just copies of the IIS configuration file, the same &lt;br /&gt;
as the automatic backups ... but they are stored in a different place&lt;br /&gt;
&lt;br /&gt;
 C:\Windows\System32\inetsrv\backups\SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
=== Restoring IIS backups ===&lt;br /&gt;
&lt;br /&gt;
IIS backups can be listed, restored and deleted.&lt;br /&gt;
&lt;br /&gt;
 appcmd list backup&lt;br /&gt;
 appcmd restore backup SOMEBACKUPNAME&lt;br /&gt;
 appcmd delete backup SOMEBACKUPNAME&lt;br /&gt;
&lt;br /&gt;
Each backup is stored in a separate directory and you can rename them by &lt;br /&gt;
simply changing the directory name.&lt;br /&gt;
&lt;br /&gt;
The list of available backups is a merged set from the default automatic &lt;br /&gt;
location, the configured automatic location (changed from the default C: &lt;br /&gt;
to D:), and default manual backup location&lt;br /&gt;
&lt;br /&gt;
 c:\inetpub\history (AUTOMATICALLY TRIGGERED ORIGINALY)&lt;br /&gt;
 D:\inetpub\history\ (AUTOMATICALLY TRIGGERED AFTER RECONFIGURATION)&lt;br /&gt;
 c:\windows\system32\inetsrv\backups (MANUALLY TRIGGERED)&lt;br /&gt;
&lt;br /&gt;
There is no need to restart IIS after restoring using APPCMD RESTORE but &lt;br /&gt;
you may need to press F5 to refresh in IIS manager to see results of &lt;br /&gt;
restore if restore changes anything.&lt;br /&gt;
&lt;br /&gt;
=== Manually editing IIS configuration ===&lt;br /&gt;
&lt;br /&gt;
You can edit the configuration files in any backup and then restore that &lt;br /&gt;
backup.&lt;br /&gt;
&lt;br /&gt;
This is useful in order either to make custom changes that cannot be &lt;br /&gt;
done in the UI, eg removing an https binding without affecting other &lt;br /&gt;
sites that use the same certificate, or to make mass changes that can be &lt;br /&gt;
done quicker by editing a text file than navigating a complex GUI, such &lt;br /&gt;
as removing all http site bindings.&lt;br /&gt;
&lt;br /&gt;
 applicationHost.config&lt;br /&gt;
&lt;br /&gt;
=== other IIS APPCMD config commands ===&lt;br /&gt;
&lt;br /&gt;
 appcmd list site&lt;br /&gt;
 appcmd list site demo&lt;br /&gt;
 appcmd list config&lt;br /&gt;
&lt;br /&gt;
=== Backing up certificate bindings ===&lt;br /&gt;
&lt;br /&gt;
There is not a lot too this really but it is better that it is automated.&lt;br /&gt;
&lt;br /&gt;
To make a backup file called bindcerts.sh&lt;br /&gt;
&lt;br /&gt;
Find the hash of the current standard *.hosts.neosys.com certificate. &lt;br /&gt;
This will change only once a year or however often the https certificate &lt;br /&gt;
is renewed, probably once a year. Check the expiry date on the &lt;br /&gt;
certificate. Run the following command and pick the hash next to a port &lt;br /&gt;
you know is currently bound to the certificate. probably most or all &lt;br /&gt;
ports will be bound to the same certificate hash.&lt;br /&gt;
&lt;br /&gt;
 netsh http show sslcert|grep -B1 Hash&lt;br /&gt;
&lt;br /&gt;
Make the backup file called bindcerts.sh. put CERTHASH=.. what you found &lt;br /&gt;
in the previous step. NO SPACES OR QUOTES&lt;br /&gt;
&lt;br /&gt;
 CERTHASH=06249326271595871fd935a37bd1334bb761e519&lt;br /&gt;
&lt;br /&gt;
 netsh http show sslcert| \&lt;br /&gt;
 grep -B1 &amp;quot;$CERTHASH&amp;quot;| \&lt;br /&gt;
 grep port| \&lt;br /&gt;
 awk -v CERTHASH=&amp;quot;$CERTHASH&amp;quot; &#039;{print &amp;quot;netsh http add sslcert ipport=&amp;quot; $3 &amp;quot; certhash= &amp;quot; CERTHASH &amp;quot; appid={4dc3e181-e14b-4a21-b022-59fc669b0914}&amp;quot;}&#039; \&lt;br /&gt;
 | tee bindcerts.sh&lt;br /&gt;
&lt;br /&gt;
=== Restoring certificate bindings ===&lt;br /&gt;
&lt;br /&gt;
If you dont have the backup file then you can just import the &lt;br /&gt;
certificate and redo the bindings without much effort anyway. This &lt;br /&gt;
process is more to enable automated restores on warm backup servers.&lt;br /&gt;
&lt;br /&gt;
This will only ADD bindings, it will not delete, nor overwrite any &lt;br /&gt;
existing bindings so you might have to delete bindings first to allow &lt;br /&gt;
changes.&lt;br /&gt;
&lt;br /&gt;
Get the bindcerts.sh file from the restore stage&lt;br /&gt;
&lt;br /&gt;
Make the file executable and execute it&lt;br /&gt;
&lt;br /&gt;
 chmod +x bindcerts.sh&lt;br /&gt;
 ./bindcerts.sh&lt;br /&gt;
&lt;br /&gt;
If you get a message &amp;quot;parameter incorrect&amp;quot; then check that your hash is &lt;br /&gt;
correct and everything else is exactly correct. Check characters one by &lt;br /&gt;
one from the BACK of the sentence SLOWLY to ensure you are not suffering &lt;br /&gt;
from inattention to detail!&lt;br /&gt;
&lt;br /&gt;
 The parameter is incorrect.&lt;br /&gt;
&lt;br /&gt;
If you get a message &amp;quot;already exists&amp;quot; then perhaps you have already &lt;br /&gt;
bound the port to the right certificate .. or a wrong/old certificate&lt;br /&gt;
&lt;br /&gt;
 SSL Certificate add failed, Error: 183&lt;br /&gt;
 Cannot create a file when that file already exists.&lt;br /&gt;
&lt;br /&gt;
... delete the binding and try again. Here is an example of deleting &lt;br /&gt;
binding on port 43999&lt;br /&gt;
&lt;br /&gt;
 netsh http delete sslcert ipport=0.0.0.0:43999&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=NEOSYS_DDNS_Service&amp;diff=2447</id>
		<title>NEOSYS DDNS Service</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=NEOSYS_DDNS_Service&amp;diff=2447"/>
		<updated>2016-02-05T09:59:04Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Troubleshooting NEOSYS DDNS Service */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Using NEOSYS DDNS service ==&lt;br /&gt;
&lt;br /&gt;
The NEOSYS monitoring server at monitor.neosys.com will update NEOSYS &lt;br /&gt;
DNS server currently zonedit.com if it is requested to do so by NEOSYS &lt;br /&gt;
installations. NEOSYS installations do that automatically when updating &lt;br /&gt;
Nagios and can also have a Windows service configured to do it at all times.&lt;br /&gt;
&lt;br /&gt;
Normally this would only be used at NEOSYS installations that have a &lt;br /&gt;
dynamic ip number ie do not have a static ip number.&lt;br /&gt;
&lt;br /&gt;
This is not required generally at client installations with static ip &lt;br /&gt;
numbers or NEOSYS win3/win4 installations but it MAY be used in that &lt;br /&gt;
situation too to provide for automatic change of static DNS for example &lt;br /&gt;
to cater for:&lt;br /&gt;
&lt;br /&gt;
*migration from old server to new server&lt;br /&gt;
*moving to backup servers&lt;br /&gt;
*moving back to live servers&lt;br /&gt;
*moving between client&#039;s own server and NEOSYS hosts on win3/win4.&lt;br /&gt;
&lt;br /&gt;
Care will be needed to ensure that the DDNS service is not running &lt;br /&gt;
simultaneously on the both old and new servers.&lt;br /&gt;
&lt;br /&gt;
=== Using Windows service neosysddns ===&lt;br /&gt;
&lt;br /&gt;
This will work even when NEOSYS processes are not running. This is &lt;br /&gt;
useful when NEOSYS processes are stopped overnight and when the server &lt;br /&gt;
is rebooted, for example for Windows Updates, and NEOSYS processes are &lt;br /&gt;
not configured to run automatically after rebooting&lt;br /&gt;
&lt;br /&gt;
==== Starting Windows service on the client server ====&lt;br /&gt;
&lt;br /&gt;
In NEOSYS maintenance mode&lt;br /&gt;
&lt;br /&gt;
 STARTDDNS&lt;br /&gt;
&lt;br /&gt;
==== Stopping the Windows service on the client server ====&lt;br /&gt;
&lt;br /&gt;
In NEOSYS maintenance mode&lt;br /&gt;
&lt;br /&gt;
 STOPDDNS&lt;br /&gt;
&lt;br /&gt;
or you can stop and/or disable the windows service manually&lt;br /&gt;
&lt;br /&gt;
This will NOT stop Nagios based DDNS which has to be done separately. See section below.&lt;br /&gt;
&lt;br /&gt;
=== Nagios based DDNS ===&lt;br /&gt;
&lt;br /&gt;
NAGIOS can update NEOSYS ddns entries (currently on zoneedit) automatically as by product of the processing of NAGIOS server updates from NEOSYS processes running on the client server. This is done independently and in parallel to the NEOSYSDDNS service which runs on NEOSYS servers.&lt;br /&gt;
&lt;br /&gt;
=== Automatic Nagios based DDNS ===&lt;br /&gt;
&lt;br /&gt;
This will occur if a special file exists on the NAGIOS server. This file is automatically created when STARTDDNS has been run on the NEOSYS server, or can be created manually.&lt;br /&gt;
&lt;br /&gt;
Therefore, if you are running NEOSYSDDNS service on the NEOSYS server, DDNS will be ALSO be done in parallel by Nagios. This is useful as a backup for example in the case where the NEOSYSDDNS service has to be stopped on the NEOSYS server eg while Cygwin updates are being processed.&lt;br /&gt;
&lt;br /&gt;
To see what hosts are subject to automatic Nagios based DDNS.&lt;br /&gt;
&lt;br /&gt;
 ll /var/lib/neosysddns&lt;br /&gt;
&lt;br /&gt;
=== Manually starting Nagios based DDNS ===&lt;br /&gt;
&lt;br /&gt;
If you need to switch on DDNS service for some reason but cannot get to the NEOSYS server to do so, then you can request Nagios to perform DDNS by creating a special file in the NAGIOS server as follows:&lt;br /&gt;
&lt;br /&gt;
 touch /var/lib/neosysddns/xxxxxxxx.client&lt;br /&gt;
 chmod a+rw /var/lib/neosysddns/xxxxxxxx.client&lt;br /&gt;
&lt;br /&gt;
=== Stopping Nagios based DDNS ===&lt;br /&gt;
&lt;br /&gt;
If you need to stop DDNS being done by NAGIOS after either automatically or manually starting it as above, you must remove a special file in the NAGIOS server as follows. Note that running STOPDDNS in the NEOSYS server does NOT remove the special file on NAGIOS server, so just running STOPDDNS in the NEOSYS server will NOT stop the parallel NAGIOS server updating DDNS. Therefore if you wish complete cessation of DDNS service for a hostname you will have to do this step AS WELL.&lt;br /&gt;
&lt;br /&gt;
 rm /var/lib/neosysddns/xxxxxxxx.client&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting NEOSYS DDNS Service ==&lt;br /&gt;
&lt;br /&gt;
On nagios/monitor server to see recent ddns updates for a hostname &amp;quot;XXXX&amp;quot; whatever is entered as System ID in System configuration file.&lt;br /&gt;
&lt;br /&gt;
 grep DDNS /var/log/syslog|grep XXXX&lt;br /&gt;
&lt;br /&gt;
or older updates&lt;br /&gt;
&lt;br /&gt;
 grep DDNS /var/log/syslog-*|grep XXXX&lt;br /&gt;
&lt;br /&gt;
or to watch new ddns updates as they come in&lt;br /&gt;
&lt;br /&gt;
 tail -f /var/log/syslog | grep DDNS&lt;br /&gt;
&lt;br /&gt;
or to watch new ddns updates as they come in for xxxxxxxx&lt;br /&gt;
&lt;br /&gt;
 tail -f /var/log/syslog | grep DDNS | grep xxxxxxxx&lt;br /&gt;
&lt;br /&gt;
Lines containing ddns.py are the result of NEOSYS Windows service.&lt;br /&gt;
&lt;br /&gt;
Lines containing apache2 are the result of nagios updates. e.g as shown below:&lt;br /&gt;
&lt;br /&gt;
 Jan 28 00:03:04 monitor apache2: DDNS IP_NO ums &amp;lt;SUCCESS CODE=&amp;quot;200&amp;quot; TEXT=&amp;quot;XXXX.hosts.neosys.com updated to 82.178.63.35&amp;quot; ZONE=&amp;quot;XXXX.hosts.neosys.com&amp;quot;&amp;gt;&lt;br /&gt;
 Jan 28 01:54:26 monitor ddns.py: DDNS IP_NO 4481 &amp;quot;ddns XXXX&amp;quot; No. 11327 was 82.178.63.35 &amp;lt;SUCCESS CODE=&amp;quot;200&amp;quot; TEXT=&amp;quot;XXXX.hosts.neosys.com updated to 85.154.7.138&amp;quot; ZONE=&amp;quot;XXXX.hosts.neosys.com&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Working/Status Files&lt;br /&gt;
&lt;br /&gt;
 ll /var/lib/neosysddns/&lt;br /&gt;
&lt;br /&gt;
Hosts that have been seen by Nagios but were ignored because the xxxxxxxx.client file was not present in /var/lib/neosysddns&lt;br /&gt;
&lt;br /&gt;
 ll /var/lib/neosysddns/ignored&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=NEOSYS_DDNS_Service&amp;diff=2446</id>
		<title>NEOSYS DDNS Service</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=NEOSYS_DDNS_Service&amp;diff=2446"/>
		<updated>2016-02-05T09:55:09Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Stopping the Windows service on the client server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Using NEOSYS DDNS service ==&lt;br /&gt;
&lt;br /&gt;
The NEOSYS monitoring server at monitor.neosys.com will update NEOSYS &lt;br /&gt;
DNS server currently zonedit.com if it is requested to do so by NEOSYS &lt;br /&gt;
installations. NEOSYS installations do that automatically when updating &lt;br /&gt;
Nagios and can also have a Windows service configured to do it at all times.&lt;br /&gt;
&lt;br /&gt;
Normally this would only be used at NEOSYS installations that have a &lt;br /&gt;
dynamic ip number ie do not have a static ip number.&lt;br /&gt;
&lt;br /&gt;
This is not required generally at client installations with static ip &lt;br /&gt;
numbers or NEOSYS win3/win4 installations but it MAY be used in that &lt;br /&gt;
situation too to provide for automatic change of static DNS for example &lt;br /&gt;
to cater for:&lt;br /&gt;
&lt;br /&gt;
*migration from old server to new server&lt;br /&gt;
*moving to backup servers&lt;br /&gt;
*moving back to live servers&lt;br /&gt;
*moving between client&#039;s own server and NEOSYS hosts on win3/win4.&lt;br /&gt;
&lt;br /&gt;
Care will be needed to ensure that the DDNS service is not running &lt;br /&gt;
simultaneously on the both old and new servers.&lt;br /&gt;
&lt;br /&gt;
=== Using Windows service neosysddns ===&lt;br /&gt;
&lt;br /&gt;
This will work even when NEOSYS processes are not running. This is &lt;br /&gt;
useful when NEOSYS processes are stopped overnight and when the server &lt;br /&gt;
is rebooted, for example for Windows Updates, and NEOSYS processes are &lt;br /&gt;
not configured to run automatically after rebooting&lt;br /&gt;
&lt;br /&gt;
==== Starting Windows service on the client server ====&lt;br /&gt;
&lt;br /&gt;
In NEOSYS maintenance mode&lt;br /&gt;
&lt;br /&gt;
 STARTDDNS&lt;br /&gt;
&lt;br /&gt;
==== Stopping the Windows service on the client server ====&lt;br /&gt;
&lt;br /&gt;
In NEOSYS maintenance mode&lt;br /&gt;
&lt;br /&gt;
 STOPDDNS&lt;br /&gt;
&lt;br /&gt;
or you can stop and/or disable the windows service manually&lt;br /&gt;
&lt;br /&gt;
This will NOT stop Nagios based DDNS which has to be done separately. See section below.&lt;br /&gt;
&lt;br /&gt;
=== Nagios based DDNS ===&lt;br /&gt;
&lt;br /&gt;
NAGIOS can update NEOSYS ddns entries (currently on zoneedit) automatically as by product of the processing of NAGIOS server updates from NEOSYS processes running on the client server. This is done independently and in parallel to the NEOSYSDDNS service which runs on NEOSYS servers.&lt;br /&gt;
&lt;br /&gt;
=== Automatic Nagios based DDNS ===&lt;br /&gt;
&lt;br /&gt;
This will occur if a special file exists on the NAGIOS server. This file is automatically created when STARTDDNS has been run on the NEOSYS server, or can be created manually.&lt;br /&gt;
&lt;br /&gt;
Therefore, if you are running NEOSYSDDNS service on the NEOSYS server, DDNS will be ALSO be done in parallel by Nagios. This is useful as a backup for example in the case where the NEOSYSDDNS service has to be stopped on the NEOSYS server eg while Cygwin updates are being processed.&lt;br /&gt;
&lt;br /&gt;
To see what hosts are subject to automatic Nagios based DDNS.&lt;br /&gt;
&lt;br /&gt;
 ll /var/lib/neosysddns&lt;br /&gt;
&lt;br /&gt;
=== Manually starting Nagios based DDNS ===&lt;br /&gt;
&lt;br /&gt;
If you need to switch on DDNS service for some reason but cannot get to the NEOSYS server to do so, then you can request Nagios to perform DDNS by creating a special file in the NAGIOS server as follows:&lt;br /&gt;
&lt;br /&gt;
 touch /var/lib/neosysddns/xxxxxxxx.client&lt;br /&gt;
 chmod a+rw /var/lib/neosysddns/xxxxxxxx.client&lt;br /&gt;
&lt;br /&gt;
=== Stopping Nagios based DDNS ===&lt;br /&gt;
&lt;br /&gt;
If you need to stop DDNS being done by NAGIOS after either automatically or manually starting it as above, you must remove a special file in the NAGIOS server as follows. Note that running STOPDDNS in the NEOSYS server does NOT remove the special file on NAGIOS server, so just running STOPDDNS in the NEOSYS server will NOT stop the parallel NAGIOS server updating DDNS. Therefore if you wish complete cessation of DDNS service for a hostname you will have to do this step AS WELL.&lt;br /&gt;
&lt;br /&gt;
 rm /var/lib/neosysddns/xxxxxxxx.client&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting NEOSYS DDNS Service ==&lt;br /&gt;
&lt;br /&gt;
On nagios/monitor server to see recent ddns updates for a hostname &amp;quot;XXXX&amp;quot; whatever is entered as System ID in System configuration file.&lt;br /&gt;
&lt;br /&gt;
 grep DDNS /var/log/syslog|grep XXXX&lt;br /&gt;
&lt;br /&gt;
or older updates&lt;br /&gt;
&lt;br /&gt;
 grep DDNS /var/log/syslog-*|grep XXXX&lt;br /&gt;
&lt;br /&gt;
or to watch new ddns updates as they come in&lt;br /&gt;
&lt;br /&gt;
 tail -f /var/log/syslog | grep DDNS&lt;br /&gt;
&lt;br /&gt;
or to watch new ddns updates as they come in for xxxxxxxx&lt;br /&gt;
&lt;br /&gt;
 tail -f /var/log/syslog | grep DDNS | grep xxxxxxxx&lt;br /&gt;
&lt;br /&gt;
Lines containing ddns.py are the result of NEOSYS Windows service. Lines containing apache2 are the result of nagios updates. e.g as shown below:&lt;br /&gt;
&lt;br /&gt;
 Jan 28 00:03:04 monitor apache2: DDNS IP_NO ums &amp;lt;SUCCESS CODE=&amp;quot;200&amp;quot; TEXT=&amp;quot;XXXX.hosts.neosys.com updated to 82.178.63.35&amp;quot; ZONE=&amp;quot;XXXX.hosts.neosys.com&amp;quot;&amp;gt;&lt;br /&gt;
 Jan 28 01:54:26 monitor ddns.py: DDNS IP_NO 4481 &amp;quot;ddns XXXX&amp;quot; No. 11327 was 82.178.63.35 &amp;lt;SUCCESS CODE=&amp;quot;200&amp;quot; TEXT=&amp;quot;XXXX.hosts.neosys.com updated to 85.154.7.138&amp;quot; ZONE=&amp;quot;XXXX.hosts.neosys.com&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Working/Status Files&lt;br /&gt;
&lt;br /&gt;
 ll /var/lib/neosysddns/&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=NEOSYS_DDNS_Service&amp;diff=2445</id>
		<title>NEOSYS DDNS Service</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=NEOSYS_DDNS_Service&amp;diff=2445"/>
		<updated>2016-02-05T09:53:25Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Nagios based DDNS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Using NEOSYS DDNS service ==&lt;br /&gt;
&lt;br /&gt;
The NEOSYS monitoring server at monitor.neosys.com will update NEOSYS &lt;br /&gt;
DNS server currently zonedit.com if it is requested to do so by NEOSYS &lt;br /&gt;
installations. NEOSYS installations do that automatically when updating &lt;br /&gt;
Nagios and can also have a Windows service configured to do it at all times.&lt;br /&gt;
&lt;br /&gt;
Normally this would only be used at NEOSYS installations that have a &lt;br /&gt;
dynamic ip number ie do not have a static ip number.&lt;br /&gt;
&lt;br /&gt;
This is not required generally at client installations with static ip &lt;br /&gt;
numbers or NEOSYS win3/win4 installations but it MAY be used in that &lt;br /&gt;
situation too to provide for automatic change of static DNS for example &lt;br /&gt;
to cater for:&lt;br /&gt;
&lt;br /&gt;
*migration from old server to new server&lt;br /&gt;
*moving to backup servers&lt;br /&gt;
*moving back to live servers&lt;br /&gt;
*moving between client&#039;s own server and NEOSYS hosts on win3/win4.&lt;br /&gt;
&lt;br /&gt;
Care will be needed to ensure that the DDNS service is not running &lt;br /&gt;
simultaneously on the both old and new servers.&lt;br /&gt;
&lt;br /&gt;
=== Using Windows service neosysddns ===&lt;br /&gt;
&lt;br /&gt;
This will work even when NEOSYS processes are not running. This is &lt;br /&gt;
useful when NEOSYS processes are stopped overnight and when the server &lt;br /&gt;
is rebooted, for example for Windows Updates, and NEOSYS processes are &lt;br /&gt;
not configured to run automatically after rebooting&lt;br /&gt;
&lt;br /&gt;
==== Starting Windows service on the client server ====&lt;br /&gt;
&lt;br /&gt;
In NEOSYS maintenance mode&lt;br /&gt;
&lt;br /&gt;
 STARTDDNS&lt;br /&gt;
&lt;br /&gt;
==== Stopping the Windows service on the client server ====&lt;br /&gt;
&lt;br /&gt;
In NEOSYS maintenance mode&lt;br /&gt;
&lt;br /&gt;
 STOPDDNS&lt;br /&gt;
&lt;br /&gt;
or you can stop and/or disable the windows service manually&lt;br /&gt;
&lt;br /&gt;
=== Nagios based DDNS ===&lt;br /&gt;
&lt;br /&gt;
NAGIOS can update NEOSYS ddns entries (currently on zoneedit) automatically as by product of the processing of NAGIOS server updates from NEOSYS processes running on the client server. This is done independently and in parallel to the NEOSYSDDNS service which runs on NEOSYS servers.&lt;br /&gt;
&lt;br /&gt;
=== Automatic Nagios based DDNS ===&lt;br /&gt;
&lt;br /&gt;
This will occur if a special file exists on the NAGIOS server. This file is automatically created when STARTDDNS has been run on the NEOSYS server, or can be created manually.&lt;br /&gt;
&lt;br /&gt;
Therefore, if you are running NEOSYSDDNS service on the NEOSYS server, DDNS will be ALSO be done in parallel by Nagios. This is useful as a backup for example in the case where the NEOSYSDDNS service has to be stopped on the NEOSYS server eg while Cygwin updates are being processed.&lt;br /&gt;
&lt;br /&gt;
To see what hosts are subject to automatic Nagios based DDNS.&lt;br /&gt;
&lt;br /&gt;
 ll /var/lib/neosysddns&lt;br /&gt;
&lt;br /&gt;
=== Manually starting Nagios based DDNS ===&lt;br /&gt;
&lt;br /&gt;
If you need to switch on DDNS service for some reason but cannot get to the NEOSYS server to do so, then you can request Nagios to perform DDNS by creating a special file in the NAGIOS server as follows:&lt;br /&gt;
&lt;br /&gt;
 touch /var/lib/neosysddns/xxxxxxxx.client&lt;br /&gt;
 chmod a+rw /var/lib/neosysddns/xxxxxxxx.client&lt;br /&gt;
&lt;br /&gt;
=== Stopping Nagios based DDNS ===&lt;br /&gt;
&lt;br /&gt;
If you need to stop DDNS being done by NAGIOS after either automatically or manually starting it as above, you must remove a special file in the NAGIOS server as follows. Note that running STOPDDNS in the NEOSYS server does NOT remove the special file on NAGIOS server, so just running STOPDDNS in the NEOSYS server will NOT stop the parallel NAGIOS server updating DDNS. Therefore if you wish complete cessation of DDNS service for a hostname you will have to do this step AS WELL.&lt;br /&gt;
&lt;br /&gt;
 rm /var/lib/neosysddns/xxxxxxxx.client&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting NEOSYS DDNS Service ==&lt;br /&gt;
&lt;br /&gt;
On nagios/monitor server to see recent ddns updates for a hostname &amp;quot;XXXX&amp;quot; whatever is entered as System ID in System configuration file.&lt;br /&gt;
&lt;br /&gt;
 grep DDNS /var/log/syslog|grep XXXX&lt;br /&gt;
&lt;br /&gt;
or older updates&lt;br /&gt;
&lt;br /&gt;
 grep DDNS /var/log/syslog-*|grep XXXX&lt;br /&gt;
&lt;br /&gt;
or to watch new ddns updates as they come in&lt;br /&gt;
&lt;br /&gt;
 tail -f /var/log/syslog | grep DDNS&lt;br /&gt;
&lt;br /&gt;
or to watch new ddns updates as they come in for xxxxxxxx&lt;br /&gt;
&lt;br /&gt;
 tail -f /var/log/syslog | grep DDNS | grep xxxxxxxx&lt;br /&gt;
&lt;br /&gt;
Lines containing ddns.py are the result of NEOSYS Windows service. Lines containing apache2 are the result of nagios updates. e.g as shown below:&lt;br /&gt;
&lt;br /&gt;
 Jan 28 00:03:04 monitor apache2: DDNS IP_NO ums &amp;lt;SUCCESS CODE=&amp;quot;200&amp;quot; TEXT=&amp;quot;XXXX.hosts.neosys.com updated to 82.178.63.35&amp;quot; ZONE=&amp;quot;XXXX.hosts.neosys.com&amp;quot;&amp;gt;&lt;br /&gt;
 Jan 28 01:54:26 monitor ddns.py: DDNS IP_NO 4481 &amp;quot;ddns XXXX&amp;quot; No. 11327 was 82.178.63.35 &amp;lt;SUCCESS CODE=&amp;quot;200&amp;quot; TEXT=&amp;quot;XXXX.hosts.neosys.com updated to 85.154.7.138&amp;quot; ZONE=&amp;quot;XXXX.hosts.neosys.com&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Working/Status Files&lt;br /&gt;
&lt;br /&gt;
 ll /var/lib/neosysddns/&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=NEOSYS_DDNS_Service&amp;diff=2433</id>
		<title>NEOSYS DDNS Service</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=NEOSYS_DDNS_Service&amp;diff=2433"/>
		<updated>2016-01-31T21:46:16Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Troubleshooting NEOSYS DDNS Service */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Using NEOSYS DDNS service ==&lt;br /&gt;
&lt;br /&gt;
The NEOSYS monitoring server at monitor.neosys.com will update NEOSYS &lt;br /&gt;
DNS server currently zonedit.com if it is requested to do so by NEOSYS &lt;br /&gt;
installations. NEOSYS installations do that automatically when updating &lt;br /&gt;
Nagios and can also have a Windows service configured to do it at all times.&lt;br /&gt;
&lt;br /&gt;
Normally this would only be used at NEOSYS installations that have a &lt;br /&gt;
dynamic ip number ie do not have a static ip number.&lt;br /&gt;
&lt;br /&gt;
This is not required generally at client installations with static ip &lt;br /&gt;
numbers or NEOSYS win3/win4 installations but it MAY be used in that &lt;br /&gt;
situation too to provide for automatic change of static DNS for example &lt;br /&gt;
to cater for:&lt;br /&gt;
&lt;br /&gt;
*migration from old server to new server&lt;br /&gt;
*moving to backup servers&lt;br /&gt;
*moving back to live servers&lt;br /&gt;
*moving between client&#039;s own server and NEOSYS hosts on win3/win4.&lt;br /&gt;
&lt;br /&gt;
Care will be needed to ensure that the DDNS service is not running &lt;br /&gt;
simultaneously on the both old and new servers.&lt;br /&gt;
&lt;br /&gt;
=== Using Windows service neosysddns ===&lt;br /&gt;
&lt;br /&gt;
This will work even when NEOSYS processes are not running. This is &lt;br /&gt;
useful when NEOSYS processes are stopped overnight and when the server &lt;br /&gt;
is rebooted, for example for Windows Updates, and NEOSYS processes are &lt;br /&gt;
not configured to run automatically after rebooting&lt;br /&gt;
&lt;br /&gt;
==== Starting Windows service on the client server ====&lt;br /&gt;
&lt;br /&gt;
In NEOSYS maintenance mode&lt;br /&gt;
&lt;br /&gt;
 STARTDDNS&lt;br /&gt;
&lt;br /&gt;
==== Stopping the Windows service on the client server ====&lt;br /&gt;
&lt;br /&gt;
In NEOSYS maintenance mode&lt;br /&gt;
&lt;br /&gt;
 STOPDDNS&lt;br /&gt;
&lt;br /&gt;
or you can stop and/or disable the windows service manually&lt;br /&gt;
&lt;br /&gt;
=== Nagios based DDNS ===&lt;br /&gt;
&lt;br /&gt;
This will only work when NEOSYS processes are running on the client server.&lt;br /&gt;
&lt;br /&gt;
Nothing extra needs to be done.&lt;br /&gt;
&lt;br /&gt;
NEOSYS processes when running and updating NAGIOS will automatically update cause NAGIOS to update&lt;br /&gt;
NEOSYS dns server (zoneedit at the moment)&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting NEOSYS DDNS Service ==&lt;br /&gt;
&lt;br /&gt;
On nagios/monitor server to see recent ddns updates for a hostname &amp;quot;XXXX&amp;quot; whatever is entered as System ID in System configuration file.&lt;br /&gt;
&lt;br /&gt;
 grep DDNS /var/log/syslog|grep XXXX&lt;br /&gt;
&lt;br /&gt;
or older updates&lt;br /&gt;
&lt;br /&gt;
 grep DDNS /var/log/syslog-*|grep XXXX&lt;br /&gt;
&lt;br /&gt;
or to watch new ddns updates as they come in&lt;br /&gt;
&lt;br /&gt;
 tail -f /var/log/syslog | grep DDNS&lt;br /&gt;
&lt;br /&gt;
or to watch new ddns updates as they come in for xxxxxxxx&lt;br /&gt;
&lt;br /&gt;
 tail -f /var/log/syslog | grep DDNS | grep xxxxxxxx&lt;br /&gt;
&lt;br /&gt;
Lines containing ddns.py are the result of NEOSYS Windows service. Lines containing apache2 are the result of nagios updates. e.g as shown below:&lt;br /&gt;
&lt;br /&gt;
 Jan 28 00:03:04 monitor apache2: DDNS IP_NO ums &amp;lt;SUCCESS CODE=&amp;quot;200&amp;quot; TEXT=&amp;quot;XXXX.hosts.neosys.com updated to 82.178.63.35&amp;quot; ZONE=&amp;quot;XXXX.hosts.neosys.com&amp;quot;&amp;gt;&lt;br /&gt;
 Jan 28 01:54:26 monitor ddns.py: DDNS IP_NO 4481 &amp;quot;ddns XXXX&amp;quot; No. 11327 was 82.178.63.35 &amp;lt;SUCCESS CODE=&amp;quot;200&amp;quot; TEXT=&amp;quot;XXXX.hosts.neosys.com updated to 85.154.7.138&amp;quot; ZONE=&amp;quot;XXXX.hosts.neosys.com&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Working/Status Files&lt;br /&gt;
&lt;br /&gt;
 ll /var/lib/neosysddns/&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=NEOSYS_DDNS_Service&amp;diff=2432</id>
		<title>NEOSYS DDNS Service</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=NEOSYS_DDNS_Service&amp;diff=2432"/>
		<updated>2016-01-31T21:43:56Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Using NEOSYS DDNS service */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Using NEOSYS DDNS service ==&lt;br /&gt;
&lt;br /&gt;
The NEOSYS monitoring server at monitor.neosys.com will update NEOSYS &lt;br /&gt;
DNS server currently zonedit.com if it is requested to do so by NEOSYS &lt;br /&gt;
installations. NEOSYS installations do that automatically when updating &lt;br /&gt;
Nagios and can also have a Windows service configured to do it at all times.&lt;br /&gt;
&lt;br /&gt;
Normally this would only be used at NEOSYS installations that have a &lt;br /&gt;
dynamic ip number ie do not have a static ip number.&lt;br /&gt;
&lt;br /&gt;
This is not required generally at client installations with static ip &lt;br /&gt;
numbers or NEOSYS win3/win4 installations but it MAY be used in that &lt;br /&gt;
situation too to provide for automatic change of static DNS for example &lt;br /&gt;
to cater for:&lt;br /&gt;
&lt;br /&gt;
*migration from old server to new server&lt;br /&gt;
*moving to backup servers&lt;br /&gt;
*moving back to live servers&lt;br /&gt;
*moving between client&#039;s own server and NEOSYS hosts on win3/win4.&lt;br /&gt;
&lt;br /&gt;
Care will be needed to ensure that the DDNS service is not running &lt;br /&gt;
simultaneously on the both old and new servers.&lt;br /&gt;
&lt;br /&gt;
=== Using Windows service neosysddns ===&lt;br /&gt;
&lt;br /&gt;
This will work even when NEOSYS processes are not running. This is &lt;br /&gt;
useful when NEOSYS processes are stopped overnight and when the server &lt;br /&gt;
is rebooted, for example for Windows Updates, and NEOSYS processes are &lt;br /&gt;
not configured to run automatically after rebooting&lt;br /&gt;
&lt;br /&gt;
==== Starting Windows service on the client server ====&lt;br /&gt;
&lt;br /&gt;
In NEOSYS maintenance mode&lt;br /&gt;
&lt;br /&gt;
 STARTDDNS&lt;br /&gt;
&lt;br /&gt;
==== Stopping the Windows service on the client server ====&lt;br /&gt;
&lt;br /&gt;
In NEOSYS maintenance mode&lt;br /&gt;
&lt;br /&gt;
 STOPDDNS&lt;br /&gt;
&lt;br /&gt;
or you can stop and/or disable the windows service manually&lt;br /&gt;
&lt;br /&gt;
=== Nagios based DDNS ===&lt;br /&gt;
&lt;br /&gt;
This will only work when NEOSYS processes are running on the client server.&lt;br /&gt;
&lt;br /&gt;
Nothing extra needs to be done.&lt;br /&gt;
&lt;br /&gt;
NEOSYS processes when running and updating NAGIOS will automatically update cause NAGIOS to update&lt;br /&gt;
NEOSYS dns server (zoneedit at the moment)&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting NEOSYS DDNS Service ==&lt;br /&gt;
&lt;br /&gt;
On nagios/monitor server to see recent ddns updates for a hostname &amp;quot;XXXX&amp;quot; whatever is entered as System ID in System configuration file.&lt;br /&gt;
&lt;br /&gt;
 grep DDNS /var/log/syslog|grep XXXX&lt;br /&gt;
&lt;br /&gt;
or older updates&lt;br /&gt;
&lt;br /&gt;
 grep DDNS /var/log/syslog-*|grep XXXX&lt;br /&gt;
&lt;br /&gt;
or to watch new ddns updates as they come in&lt;br /&gt;
&lt;br /&gt;
 tail -f /var/log/syslog | grep DDNS&lt;br /&gt;
&lt;br /&gt;
or to watch new ddns updates as they come in for xxxxxxxx&lt;br /&gt;
&lt;br /&gt;
 tail -f /var/log/syslog | grep DDNS | grep xxxxxxxx&lt;br /&gt;
&lt;br /&gt;
Lines containing ddns.py are the result of NEOSYS Windows service. Lines containing apache2 are the result of nagios updates. e.g as shown below:&lt;br /&gt;
&lt;br /&gt;
 Jan 28 00:03:04 monitor apache2: DDNS IP_NO ums &amp;lt;SUCCESS CODE=&amp;quot;200&amp;quot; TEXT=&amp;quot;XXXX.hosts.neosys.com updated to 82.178.63.35&amp;quot; ZONE=&amp;quot;XXXX.hosts.neosys.com&amp;quot;&amp;gt;&lt;br /&gt;
 Jan 28 01:54:26 monitor ddns.py: DDNS IP_NO 4481 &amp;quot;ddns XXXX&amp;quot; No. 11327 was 82.178.63.35 &amp;lt;SUCCESS CODE=&amp;quot;200&amp;quot; TEXT=&amp;quot;XXXX.hosts.neosys.com updated to 85.154.7.138&amp;quot; ZONE=&amp;quot;XXXX.hosts.neosys.com&amp;quot;&amp;gt;&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
	<entry>
		<id>https://techwiki.neosys.com/index.php?title=NEOSYS_DDNS_Service&amp;diff=2431</id>
		<title>NEOSYS DDNS Service</title>
		<link rel="alternate" type="text/html" href="https://techwiki.neosys.com/index.php?title=NEOSYS_DDNS_Service&amp;diff=2431"/>
		<updated>2016-01-31T10:30:02Z</updated>

		<summary type="html">&lt;p&gt;Steve: /* Troubleshooting NEOSYS DDNS Service */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Using NEOSYS DDNS service ==&lt;br /&gt;
&lt;br /&gt;
The NEOSYS monitoring server at monitor.neosys.com will update NEOSYS &lt;br /&gt;
DNS server currently zonedit.com if it is requested to do so by NEOSYS &lt;br /&gt;
installations. NEOSYS installations do that automatically when updating &lt;br /&gt;
Nagios and can also have a Windows service configured to do it at all times.&lt;br /&gt;
&lt;br /&gt;
Normally this would only be used at NEOSYS installations that have a &lt;br /&gt;
dynamic ip number ie do not have a static ip number.&lt;br /&gt;
&lt;br /&gt;
This is not required generally at client installations with static ip &lt;br /&gt;
numbers or NEOSYS win3/win4 installations but it MAY be used in that &lt;br /&gt;
situation too to provide for automatic change of static DNS for example &lt;br /&gt;
to cater for:&lt;br /&gt;
&lt;br /&gt;
*migration from old server to new server&lt;br /&gt;
*moving to backup servers&lt;br /&gt;
*moving back to live servers&lt;br /&gt;
*moving between client&#039;s own server and NEOSYS hosts on win3/win4.&lt;br /&gt;
&lt;br /&gt;
Care will be needed to ensure that the DDNS service is not running &lt;br /&gt;
simultaneously on the both old and new servers.&lt;br /&gt;
&lt;br /&gt;
=== Configuring the ddns server ===&lt;br /&gt;
&lt;br /&gt;
ddns server in this case means nagios/monitor which will request NEOSYS&#039;s real dns server, currently zoneedit, to change dns ip number as and when it changes&lt;br /&gt;
&lt;br /&gt;
You will only get ddns if there is a file in nagios server /tmp folder&lt;br /&gt;
&lt;br /&gt;
XXXXXXXX is hostname whatever is registered as System ID in the NEOSYS System Configuration File&lt;br /&gt;
&lt;br /&gt;
 touch /tmp/XXXXXXXX.client&lt;br /&gt;
 chmod a+rw /tmp/XXXXXXXX.client&lt;br /&gt;
&lt;br /&gt;
Currently You MUST ALSO inform NEOSYS IT to add your hostname to ddns.py because the above is only a temporary configuration and will be lost when the server is rebooted.&lt;br /&gt;
&lt;br /&gt;
To stop zoneedit being updated you must first inform NEOSYS IT to remove the hostname and then remove the tmp file&lt;br /&gt;
&lt;br /&gt;
=== Nagios based DDNS ===&lt;br /&gt;
&lt;br /&gt;
This will only work when NEOSYS processes are running on the client server. Nothing extra needs to be done.&lt;br /&gt;
&lt;br /&gt;
NEOSYS processes when running and updating NAGIOS will automatically update cause NAGIOS to update&lt;br /&gt;
NEOSYS dns server (zoneedit at the moment)&lt;br /&gt;
&lt;br /&gt;
=== Using Windows service neosysddns ===&lt;br /&gt;
&lt;br /&gt;
This will work even when NEOSYS processes are not running. This is &lt;br /&gt;
useful when NEOSYS processes are stopped overnight and when the server &lt;br /&gt;
is rebooted, for example for Windows Updates, and NEOSYS processes are &lt;br /&gt;
not configured to run automatically after rebooting&lt;br /&gt;
&lt;br /&gt;
==== Starting the service on the client server ====&lt;br /&gt;
&lt;br /&gt;
In NEOSYS maintenance mode&lt;br /&gt;
&lt;br /&gt;
 STARTDDNS&lt;br /&gt;
&lt;br /&gt;
==== Stopping the service on the client server ====&lt;br /&gt;
&lt;br /&gt;
In NEOSYS maintenance mode&lt;br /&gt;
&lt;br /&gt;
 STOPDDNS&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting NEOSYS DDNS Service ==&lt;br /&gt;
&lt;br /&gt;
On nagios/monitor server to see recent ddns updates for a hostname &amp;quot;XXXX&amp;quot; whatever is entered as System ID in System configuration file.&lt;br /&gt;
&lt;br /&gt;
 grep DDNS /var/log/syslog|grep XXXX&lt;br /&gt;
&lt;br /&gt;
or older updates&lt;br /&gt;
&lt;br /&gt;
 grep DDNS /var/log/syslog-*|grep XXXX&lt;br /&gt;
&lt;br /&gt;
or to watch new ddns updates as they come in&lt;br /&gt;
&lt;br /&gt;
 tail -f /var/log/syslog | grep DDNS&lt;br /&gt;
&lt;br /&gt;
or to watch new ddns updates as they come in for xxxxxxxx&lt;br /&gt;
&lt;br /&gt;
 tail -f /var/log/syslog | grep DDNS | grep xxxxxxxx&lt;br /&gt;
&lt;br /&gt;
Lines containing ddns.py are the result of NEOSYS Windows service. Lines containing apache2 are the result of nagios updates. e.g as shown below:&lt;br /&gt;
&lt;br /&gt;
 Jan 28 00:03:04 monitor apache2: DDNS IP_NO ums &amp;lt;SUCCESS CODE=&amp;quot;200&amp;quot; TEXT=&amp;quot;XXXX.hosts.neosys.com updated to 82.178.63.35&amp;quot; ZONE=&amp;quot;XXXX.hosts.neosys.com&amp;quot;&amp;gt;&lt;br /&gt;
 Jan 28 01:54:26 monitor ddns.py: DDNS IP_NO 4481 &amp;quot;ddns XXXX&amp;quot; No. 11327 was 82.178.63.35 &amp;lt;SUCCESS CODE=&amp;quot;200&amp;quot; TEXT=&amp;quot;XXXX.hosts.neosys.com updated to 85.154.7.138&amp;quot; ZONE=&amp;quot;XXXX.hosts.neosys.com&amp;quot;&amp;gt;&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
</feed>