replace MAP extension with ASPX or ASP
Richard Greenwood
richard.greenwood at GMAIL.COM
Sat Sep 30 06:15:01 PDT 2006
On 9/29/06, william paul <williampaul28 at yahoo.com> wrote:
> Hello:
>
> Is it possible to replace the map extension with aspx or asp? I have seen an
> example (http://www2.tetonwyo.org/mapserver/) where the map
> file is called map.asp. I tried to create an aspx file like:
I built the site that you are looking at. I have pasted the complete
map.asp file in below. It contains both VB and JScript
implementations, and references to original source. I have not figured
out how to do it with .NET (ASPX). If you come up with a .NET
solution, would you please share it with me and the rest of the list?
Rich
--
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com
<%@language=JScript%>
<%
// Server.ScriptTimeout = 360
var mapFile = "/data/gis/mapserver/tc/tc.map"
var qstring = Request.ServerVariables("QUERY_STRING")
var host= Request.ServerVariables("HTTP_HOST")
var referrer= Request.ServerVariables("HTTP_REFERER")
var uri = "http://"+host+"/mapserv-4.6.1/mapserv.exe?map=" +
mapFile + "&" + qstring;
var objHTTP
objHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")
objHTTP.open("GET", uri, false);
objHTTP.send();
Response.ContentType = objHTTP.getResponseHeader("content-type");
Response.BinaryWrite (objHTTP.responseBody);
%>
<%
/*
JScript example from
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk30/htm/xmobjxmldomserverxmlhttp_using_directly.asp
var objSrvHTTP;
objSrvHTTP = Server.CreateObject ("MSXML2.ServerXMLHTTP");
objSrvHTTP.open ("GET","http://someotherserver/respond.asp", false);
objSrvHTTP.send ();
Response.ContentType = "text/xml";
Response.Write (objHTTP.responseXML.xml);
*/
%>
<%
/*
VB example from:
http://mapserver.gis.umn.edu/doc40/wms-server-howto.html#onlineresourceurl
Server.ScriptTimeout = 360
strRequest = Request.ServerVariables("QUERY_STRING")
strURL = "http://myserver/cgi-bin/mapserv.exe?map=C:\Inetpub\wwwroot\WMS\mymap.map&"
& strRequest
Dim objHTTP
Set objHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")
objHTTP.open "GET", strURL, false
objHTTP.send ""
Response.ContentType = objHTTP.getResponseHeader("content-type")
Response.BinaryWrite objHTTP.responseBody
Set objHTTP = Nothing
*/
%>
More information about the MapServer-users
mailing list