-
- Preview browser
- Page designer
- DQL editor
- Application wide settings
- Security settings
- Page caching module
- Modules
- Snippets
- Actions
- Context editor
- Task editor
- Scheduler editor
- Search engine editor
- Web server console
- Site layout editor
- Template editor
- Robots editor
- Style definitions
- Database manipulation
- Table designer
- Transfer editor
- Reporter
- Deployment module
- Deployment server settings
- Debugger
- .end
- .form header
- .form trailer
- .items
- assign
- application status
- backup db
- begin transaction
- break
- call menu
- call program
- case
- cluster by
- commit
- connect
- copy all from
- data-entry
- db status
- delete records
- define
- disconnect
- do
- documents
- exec SQL
- else
- end
- enter a record
- error messages off
- error messages on
- exit
- export
- for
- global
- if
- import
- imports
- in
- input using
- install application
- into
- list records
- lock
- lock db
- modify records
- message
- named
- others
- prompt
- query selection
- record entry
- records
- reorganize
- restore db
- rollback
- run procedure
- servers
- temp
- then
- tran off
- tran on
- unclustered
- unlock
- unlock db
- via form
- while
- with
- abs
- acos
- addressof
- ampm
- anylookup
- asin
- atan
- atan2
- ceil
- CHR
- concat
- ConsoleCopy
- ConsoleMemoCopy
- ConsoleShow
- ConsoleWriteToFile
- cos
- cosh
- date
- DatePicker
- day
- DEOS
- DialogOpen
- DialogOpenRelated
- DocumentCloseName
- DoesObjectExist
- ExecDQL
- ExecuteFile
- exp
- FileExecDQL
- firstc
- firstlast
- firstw
- FixedWidth
- floor
- futurevalue
- GetCurrent
- GetVar
- hours
- if
- installment
- jointext
- julian
- lastc
- lastfirst
- lastw
- length
- log
- log10
- lower
- MemoChunk
- MemoCopy
- MemoDecodePair
- MemoExecDQL
- MemoFind
- MemoGetGlobal
- MemoLength
- MemoMemoCopy
- MemoMemoReplace
- MemoReadFromFile
- MemoReplace
- MemoSetGlobal
- MemoStringBetween
- MemoStringFrom
- MemoStringTo
- MemoWordCount
- MemoWriteToFile
- midc
- midw
- minutes
- mod
- month
- OpenForm
- OpenMenu
- OpenProcedure
- OpenReport
- periods
- power
- presentvalue
- proper
- random
- rate
- RefreshForm
- RefreshScreen
- RefreshStatus
- Remote
- Remote authentication
- Remote POP3
- Remote IMAP
- Remote SMTP
- Remote XML
- seconds
- SetColor
- SetCurrent
- SetFocus
- SetLabelText
- SetMemoValue
- SetState
- SetStyle
- SetValue
- SetVar
- sin
- sinh
- spellcurrency
- spelldate
- spellmonth
- spellnumber
- spellweekday
- sqrt
- StringBetween
- StringEscape
- StringFind
- StringFrom
- StringReplace
- StringTo
- tan
- tanh
- textpos
- timeampm
- ToText
- UniqueID
- upper
- Wait
- weekday
- WriteToFile
- year
- yearday
- yearweek
- " (quotation marks)
- () (parentheses)
- + (addition)
- , (comma)
- - (subtraction)
- . (period)
- -- (comment)
- / (division)
- * (multiplication)
- * (asterisk)
- ? (question mark)
- ~ (tilde)
- : (colon)
- := (assignment operator)
- ; (semicolon)
- < (less than)
- <= (less than or equal to)
- = (equals)
- > (greater than)
- >= (greater than or equal to)
- all
- all files
- and
- any
- between
- blank
- count
- count of
- file
- highest of
- in groups
- in groups with group-totals
- in order
- in reverse
- item (Statistical)
- item (Conditional Statistical)
- lock files
- lock nothing
- lock records
- lookup
- lowest of
- max
- mean
- mean of
- min
- not
- number
- numeric string
- or
- pause
- percent
- selected record
- std.dev.
- std.err.
- sum
- sum of
- text
- time
- to
- variance
- window
- Rules for queries
- * (asterisk)
- ? (question mark)
- ~ (tilde)
- and
- or
- not
- ( ) (parentheses)
- Debug querys
- Livetext tags
- xdg3 query
- Sessions
- Pagination
- Free text search
- Intro on fields
- Text
- Hidden
- Date
- Dropdown
- List
- Checkbox
- Radio button
- Text edit
- Redactor (richtext)
- CKEditor
- TinyMCE
- Intro
- hasPrismConnection
- doAction
- doDerivation
- doMenuItem
- doPrismDerivation
- setFormField
- runPrismFunction
- @GetDefinition
- . document
- . listcommands
- . listdocuments
- . listdrives
- . listfiles
- . listfunctions
- . listinternals
- . listoperators
- . listrelated
- . listtables
- . object
- . table
- . testdql
- @SetDefinition
- . document
- . object
- Extra modules intro
- python
- Qt
- wkhtmltopdf
- PySide
- PyXCC
- django
- Apache
- LightTPD
- nginx
- pywin32
- flup
- cssutils
- Pillow
- psutil
- mysqldb
- psycopg2
- pyodbc
- python_dateutil
- requests
- suds-ews
- setuptools
- Whoosh
- wmi
- django-send
- bootstrap
- bootstrapmultiselect
- jquery
- jqueryui
- ckedit
- tinymce
- redactor
- JavaScript EU VAT Number Validation
- feedparser
- beautifulsoup
- appsdir
- six
- pycparser
- pyOpenSSL
- cryptography
- cffi
- enum34
- pyasn1
- idna
- ipaddress
- PyYAML
- coverage
- coveralls
- docopt
- mock
- funcsigs
- pbr
- nose
- paypalrestsdk
- paypal
- libcurl
- 7zipcpp
- cef
- cpp-jwt
Setting up DG3 on IIS
IIS installation
To install IIS you use server manager Dashboard and add a roles and features. Use Role based or feature-based installation. Select your server from server pool. Activate Web Server (IIS) and let it add IIS Managment Console for you. Add management tools if it asks for that. Do next until you get to Web Server Role (IIS) and the Role Services. Add HTTP Redirection found in Common HTTP Features. Next go to Application Development and add CGI as this is used by the wfastcgi package we are going to install later. If you are a developer and want to debug your application on this server, you can add Logging Tools, Request Monitor and Tracing as well under Health and Diagnostics.
Setup server
Start IIS Manager and accept to Get the Microsoft Web Platform to install the latest web components. Go to the server name in iis manager and Click on "Get New Web Platform Component" found in right side of the interface and ok installation of Web Platform Installer. This will help you find the components you need later. To coexist with server you need to install Application Request Routing (3.0) and URL Rewrite (2.1) as well. If you have any problem using it from inside of IIS Manager, just search for the components and launch the installer from the web browser (have happened on occasions).
Open a command prompt (as administrator) and got to c:\DG3V4\Scripts and run "wfastcgi-enable" to enable wfastcgi in iis if not already done by DG3V4 installer. This will take care of all you need to get you going. If you get error about privileges, it usually mean you already have run the enable. To check if this is the case, run wfastcgi-disable and then wfastcgi-enable and it should run without errors.
Make the application ready for IIS
To do this, copy the application to C:\inetpub\DeployedDG3Apps4\YourAppName and manually add a web.config file to C:\inetpub\DeployedDG3Apps4\YourAppName that is the root of your application. The root is also the one we will use when we set up the site in IIS Management Console.
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <handlers> <add name="Python FastCGI" path="*" verb="*" modules="FastCgiModule" scriptProcessor="c:\DEDS\python.exe|c:\DEDS\lib\site-packages\wfastcgi.pyc" resourceType="Unspecified" requireAccess="Script" /> </handlers> </system.webServer> <appSettings> <!-- Required settings --> <add key="WSGI_HANDLER" value="web.wsgi.application" /> <add key="PYTHONPATH" value="C:\DEDS\;C:\inetpub\DeployedDG3Apps4\YourAppName\web" /> <!-- Optional settings --> <add key="DJANGO_SETTINGS_MODULE" value="web.settings" /> <!-- <add key="WSGI_LOG" value="C:\inetpub\DeployedDG3Apps4\webserver\Logs\YourAppName.log" /> --> </appSettings> </configuration>
The setting in the root of this application will set up the application to be handled by the wfastcgi module installed by DG3 and enabled by wfastcgi-enable. The handler part will be the same for all applications, but the appSettings is the part that differs between applications.
Setup a new site
Select sites and Add WebSite. Give it a name like the app name and select the physical path to the DG3 deployed app. Then add the same host name to the Host name settings. This means that the server will only reply when this name is given. If you need to debug the server, leave this out and make sure this site is the only site without binding or the only site running. This will make this site the default site and when you then access it with http://localhost/ it will give you proper error messages telling you what is wrong instead of just a error 500 message.
Unlock your handler
Since we have added the config files manually, we need to unlock the handlers we have added. To do this click on your server name in IIS Manager and then Configuration Editor. Then locate system.webServers/handlers and press Unlock Section on the right.
Setting up static
To let IIS serve the static files, we need to clear the wsgi handler and add a virtual folder. To do that we create a new web.config at the root of the static folder with the following content:
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <handlers> <clear/> <add name="StaticFile" path="*" verb="*" modules="StaticFileModule" resourceType="File" requireAccess="Read" /> </handlers> </system.webServer> </configuration>
Click on your site and add virtual folder. Then set the following:
Alias: static
Physical path: C:\inetpub\DeployedDG3Apps4\YourAppName\web\static
Setting up folder security
You need to make sure the web server has rights to both application files and to python and is libraries. To do that, find out the name of the app pool used by your site. This is usually the same as the name of the site given and can be found in Application Pools in IIS Manager. Right click on c:\DEDS and select properties then Security and edit. Select add and enter "IIS AppPool\yourname" into "Enter the object names to select" and do a "Check Names". Give it Read & Excecute, List folder contents and Read.
icacls "c:\DEDS" /grant "IIS APPPOOL\Your app":(OI)(CI)(F)
Next we need to do the same for the application folder under C:\inetpub\DeployedDG3Apps4. Select your application and select Security tab. Select Edit and then Add. Wrtite IIS AppPool\yourname into "Enter the object names to select" and do a "Check Names". Give it Read & Excecute, List folder contents and Read. If you want to be able to let it compile py files, you need to add Modify and possible Write. If you have a upload folder that the application needs to write files to, then this folder must have Modify and Write.
icacls "c:\inetpub\DeployedDG3Apps4\Your app" /grant "IIS APPPOOL\Your app":(OI)(CI)(F)
If you have Windows Server 2022 or newer, it seams like virtual directories need it's own security setting. If you set everyone read, it should work. It not you have to set a pretend user in advanced settings.
If you have added a WSGI_LOG option to your appSettings, you must make sure that Write and Modify is added for the IIS AppPool\yourname as well.
More to do later
We need to investigate if add IIS_IUSRS to have read and write access to your application folder is enough for all applications and for c:\dg3v4, but that is for later.
If you are stuck with unwanted IIS setting and can't get any way, you could try to do a clean IIS by following this guide.
This document was created based on information found in this video.