Question

I am trying to deploy a PHP application to azure web cgi role. I set my web.config and web.roleconfig correctly, I believe. Since when I remote to the machine, I set the fast cgi handler in IIS manually to the same value. It works. However, it doesn't work after the package is deployed, even if the value is the same! I have to manually reset it to the same value! Sounds weird?

So I am thinking to write a piece of code in role start event to reset the mapping. Does anybody knows how to do it in C#?

Thanks

Was it helpful?

Solution

KAO! Setting up the handler mapping has two phases: 1. setup web.config 2. create application

I only did first one. By clicking the OK on the popup window on UI will set the second. So if I want to deploy to Azure on a side website (which mean the website is not linked with the web role), I have to do the second setup myself, by either manually or runing a command line: %windir%\system32\inetsrv\appcmd set config /section:system.webServer/fastCGI /+[fullPath='XXXX\php-cgi.exe']

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top