ThinkGeo.com    |     Documentation    |     Premium Support

Error 404 Not Found "thinkgeo.mvc.min_GeoResource.axd" and "ReferenceError: mapParser is not defined"

I started to examine MepSuite in my own project (MVC 4.0).
The first examination was succeed (showing the map on home index page).
On my second examination, i added “ThinkGeo Map” control into new .cshtml partial file (other than index.cshtml) And i got the following error when browser trying to render the partial view:
“404 Not Found - http://localhost:1813/Home/thinkgeo.mvc.min_GeoResource.axd?_=1480779867654”.
It also says that “ReferenceError: mapParser is not defined”.

It’s good to note that i have following lines in web.config file:

      <handlers> ... <add name="GeoResource" preCondition="integratedMode" path="*_GeoResource.axd" verb="*" type="ThinkGeo.MapSuite.MvcEdition.GeoResourceFactory" /> </handlers>

AND

      <httpHandlers> ... <add path="*_GeoResource.axd" verb="*" type="ThinkGeo.MapSuite.MvcEdition.GeoResourceFactory" /></httpHandlers>

And also have refrences of ‘MapSuiteCore.DLL’ &‘MvcEdition.dll’ &‘WindowsBase’ in the project.
what is just happening?
Am i forget something?

Hi Reza,

Are you using latest 9.0 or older 8.0?

Your exception information looks tell you the JavascriptLibrary hadn’t been loaded succeed, so I think you should want to review your project follow this way.

Please use the same version of MVCEdition and MapSuiteCore, and if possible please download our latest version which should get less bug and better performance.

And you can view our HowDoISample project first, if that’s not works, that should be an environment issue, if that’s works but your project don’t works, that should because you missed something in your own project. I think we don’t need manual add the httphandler(axd) information into setting file.

Regards,

Don

I viewed the requests urls and find out the correct url should be amed to ‘http://localhost:1813/tile_GeoResource.axd?.…’ meanwhile my requests are made to ‘http://localhost:1813/Home/tile_GeoResource.axd?.…’.
There is an extra ‘/Home/’ in URL.

For now, I fixed it using [this answer][1].
But i wanna know taht: Why every partial views(cshtml files) where suitable to embrace Map (with no problem) But this? I mean, what exactly cause Map url to be changed?
thanks.
[1]: Relative URLs for axd resource files when map is on MVC page defined as default route

Hi Reza,

I am glad to hear you solved that.

I don’t know why the url is changed, but I guess that’s related with the detail scenario.

By default our router should works well, I think you can double check the config file or find where is the “Home” inserted into the router.

Regards,

Don