It seems the map resources are trying to access the web.config in the wrong place.
Is there a way to specify where to look for the web config?
It’s looking for the web.config in _binDev directory, when it should be looking inside the specific Tennant folder.
this is the simplified setup:
AppFolder
_binDev
pages
scripts
etc…
Tennant1
images
web.config
Tennant2
images
web.config
Map resources web config in multi-tennant application
Hi Maria,
In Map Suite, we are using the below code to access the web.config file and then modify the file when the map displays first time.
Configuration config =
WebConfigurationManager.OpenWebConfiguration("~");
From the code, we can say the map suite only find the web.config under the root of the web application. But as you are developing a multi-tenant application, which we are not familiar with, so we don’t know what’s the mapping relationship between those web.config and their “sub” application and I think we will keep doing the investigations on Multi-Tenant.
Not sure if it helps, there is a way to avoid to register the content to the web.config file automatically but modify it manually. We can set the property “WebConfigRegisterMode” as WebConfigRegistrationMode.Manual and then add the below sections into the config file:
<
httpHandlers
>
<
add
path
=
"*_GeoResource.*"
verb
=
"*"
type
=
“ThinkGeo.MapSuite.WebEdition.GeoResourceFactory”
/>
<
add
path
=
"*_GeoResource.axd"
verb
=
"*"
type
=
“ThinkGeo.MapSuite.WebEdition.GeoResourceFactory”
/>
</
httpHandlers
>
And
<
system.webServer
>
<
validation
validateIntegratedModeConfiguration
=
“false”
/>
<
handlers
>
<
remove
name
=
“GeoResource”
/>
<
add
name
=
“GeoResource”
path
=
"*_GeoResource.axd"
verb
=
"*"
preCondition
=
“integratedMode”
type
=
“ThinkGeo.MapSuite.WebEdition.GeoResourceFactory”
/>
</
handlers
>
</
system.webServer
>
Hope it helps and if there is any thing misunderstanding on the Multi-Tenant, please feel free to correct us.
Thanks,
Troy