Thursday, 15 March 2012

wix - Adding script maps during installation of web application IIS -



wix - Adding script maps during installation of web application IIS -

has added iis script maps wix installation. have been using this:

<customaction id="addhandlers_cmd" property="addhandlers" value="&quot;[systemfolder]inetsrv\appcmd&quot; set config -section:system.webserver/handlers /+&quot;[\[]name='gsoap',path='*.dll', verb='*',modules='isapimodule',scriptprocessor='[bin]mod_gsoap.dll',resourcetype='file', requireaccess='execute'[\]]&quot;" execute="immediate"/> <customaction id="addhandlers" binarykey="wixca" dllentry="caquietexec" execute="deferred" return="check" impersonate="no"/>

however 404 errors web application , when add together script map manually after installing application works perfectly. appreciate if share how done this.

i haven't worked gsoap handler, used asp.net isapi extention. suppose has same level of integration. post code asp.net , hope won't have problem changing gsoap. have huge risk of changing incorrectly , create examples unusable you, allow better.

here code register extention if isn't

<component id="iis6configextentions" guid="{guidhash({productid}-1822e4f3-5850-47d5-9281-d1e0e20c77d4)}" keypath="yes" permanent="yes"> <condition><![cdata[installed or (iismajorversion , (iismajorversion = "#6"))]]></condition> <iis:webserviceextension id="extensionasp4" group="asp.net v4.0.30319" allow="yes" file="[frameworkroot]v4.0.30319\aspnet_isapi.dll" description="asp.net v4.0.30319"/> </component>

and adding concrete site need utilize webapplicationextention, @yan mentioned:

<iis:webapplication id="iis6webapp" name="[site_app_name]" webapppool="apppool" > <iis:webapplicationextension verbs="get,head,post" checkpath="no" script="yes" executable="[frameworkroot]v4.0.30319\aspnet_isapi.dll" /> </iis:webapplication>

the checkpath="no" required on iis 6 because utilize asp.net mvc doesn't map urls files on disk. might need since service address doesn't map physical file.

update:

looks not possible straight in wix (at to the lowest degree in 3.5 version). going in right direction - custom action using appcmd. provided custom actions aren't finish or need: first 1 sets property value command need execute , sec 1 calls dll custom action wasn't provided.

what i'd seek execute is:

<customaction id="addgsoaphandler" directory="targetdir" impersonate="no" execute="deferred" return="check" execommand="[systemfolder]inetsrv\appcmd.exe set config -section:system.webserver/handlers /+&quot;[\[]name='gsoap',path='*.dll', verb='*',modules='isapimodule',scriptprocessor='[bin]mod_gsoap.dll',resourcetype='file', requireaccess='execute'[\]]&quot; /commit:apphost" />

please pay attending path attribute of handler configuration. it limit handler usage url's ends ".dll" - copied code not sure if you've done intentionally or copied example @ microsoft site. might have led 401 error if handler registered successfully.

also added /commit:apphost argument. not sure if need this, utilize explicitly specify need configure application's config.

update 2:

if need set configuration single application, should specify application object argument of appcmd instead of 'config' means global configuration. please seek this:

<customaction id="addgsoaphandler" directory="targetdir" impersonate="no" execute="deferred" return="check" execommand="[systemfolder]inetsrv\appcmd.exe set app "mysite/app1" -section:system.webserver/handlers /+&quot;[\[]name='gsoap',path='*.dll', verb='*',modules='isapimodule',scriptprocessor='[bin]mod_gsoap.dll',resourcetype='file', requireaccess='execute'[\]]&quot; /commit:apphost" />

for more details can read this tutorial.

iis wix

No comments:

Post a Comment