| 1 | [[PageOutline]] |
| 2 | |
| 3 | This page is one of the !MapGuide Community CodeSamples. Visit the CodeSamples page to view more! |
| 4 | |
| 5 | == Introduction == |
| 6 | |
| 7 | Have you ever required the ability to host the mapagent http interface outside of Apache or IIS? Maybe in a lightweight http server that can be interfaced via .net/Java/PHP? |
| 8 | |
| 9 | It turns out that the MapGuide API provides classes that make it possible for you to create your own mapagent http handler. The classes in question are: |
| 10 | |
| 11 | * MgHttpRequest |
| 12 | * MgHttpResponse |
| 13 | |
| 14 | These 2 classes form the backbone of the mapagent infrastructure. The current Apache/ISAPI/CGI mapagents all use these classes to work with the respective Apache/ISAPI/CGI interfaces |
| 15 | |
| 16 | [https://github.com/jumpinjackie/mapagent-dotnet-sample This sample project] demonstrates how you can have your own .net mapagent http interface. The default http server used for this VS project is IIS express, but can easily be Cassini or any other lightweight .net http server that is not IIS proper. |
| 17 | |
| 18 | == Requirements == |
| 19 | |
| 20 | The project requires: |
| 21 | |
| 22 | * [http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-for-web Visual Studio 2012 Express for Web] |
| 23 | * [http://trac.osgeo.org/mapguide/wiki/Release/2.4/Notes MapGuide Open Source 2.4] |
| 24 | |
| 25 | The VS project has been set up for NuGet package restore and will auto-fetch the required MapGuide assemblies on the first build of the project |