There are two ways to get NWSGI: by installing it or by using .zip package. The installer is mainly used to install the IIS 7 management tools, but it will also copy
NWSGI and the HelloWorld sample to C:\Program Files\NWSGI. When deploying an application, you have to use xcopy deployment, so it needs to be available on the development machine; it only needs to be installed
on the server if you're using the management tools.
The term “xcopy deployment” refers to the Windows
xcopy command, which is used to (among other things) copy entire directory trees. Using this method is useful if you can’t (or don’t want to) use the installer package. If this is the case, download the .zip package or the MSI installer. To
use this method, simply copy NWSGI.dll into your application’s Bin/ directory, and then copy the whole application folder to the server. If you use the installer, it's in C:\Program Files\NWSGI.
Setting Up the Hello World Example
To check that it is working, use the HelloWorld example that is included with both packages. This is the most common configuration, and assumes you have access to the server; if you have a custom setup (such as a hosted site),
- Copy the HelloWorld sample folder to C:\inetpub\wwwroot.
- Copy NWSGI.dll and IronPython.dll, IronPython.Modules.dll, Microsoft.Scripting.dll, and Microsoft.Dynamic.dll to C:\inetpub\wwwroot\HelloWorld\Bin.
- Mark C:\inetpub\wwwroot\HelloWorld as an application.
- IIS 6/7: From the IIS management UI,
mark the folder as an application.
- IIS 7: From an elevated command prompt, run: appcmd add app /site.name:"Default Web Site" /path:/HelloWorld /physicalPath:C:\inetput\wwwroot\HelloWorld
- Visit http://localhost/HelloWorld/hello.wsgi.
If the browser says “Hello, World!”, you’re good to go! If not,
please ask in the forum, and I’ll try to help you out.