Anybody have any tips on deploying a lightswitch app to Windows Azure along with the shapefiles needed for my map controls? App runs fine locally, doesn't appear as though the shapefiles get published. Have tried to publish different ways (desktop app, web app, http/https, etc.).
I just tried a deployment to IIS and same thing, shapefiles do not appear to load. I've tried manually copying them to the \bin directory, specifying an exact web URL for the URI path of the file where I have the shapefiles shared... nothing.
Hello William,
Thank you for posting!
ShapeFile are added as an external resource and they are not automatically published. They should be manually copied and their extension included in the supported types. I have tested this using IIS. After adding the shapefiles to the Web folder and also .shp, .shx and .dbf to the supported MIME Types the map is loaded as expected (see attached screenshot). This could be done either by following the steps in this blog post: https://www.infragistics.com/community/blogs/b/devin_rader/posts/configuring-mime-types-in-iis-for-use-with-xamwebmap or by adding the extentions in the web.config: <system.webServer>
<staticContent>
<mimeMap fileExtension=".dbf" mimeType="application/octet-stream" />
<mimeMap fileExtension=".shp" mimeType="application/octet-stream" />
</staticContent>
</system.webServer>
I am checking if adding shapefiles to deployed application is still an issue for you.
If you require any further assistance, please do not hesitate to ask.
Maria,
Your solution worked great. I do have one last question... adding an HTML client to my Lightswitch project seems to break the map control all together, it will no longer function in debug mode or function when deployed. This is not as vital because there are workarounds but still an item worth mentioning.
Billy Meredith
Hi William,
HTML client apps are not supported by our Lightswitch controls and this is the reason for that behavior on your side. So you may want to use one of the workarounds.
Please feel free to ask if you have any other questions.