I am new to the Azure environment. I have a flex application, which is hosted on Azure. the applications needs to run PHP scripts on IIS to upload to the blobs.
1. We have created a web cgi role. Added php scripts and flex files to it.
2. Deployed this on Azure.
This application seems to work fine from the hosted site, but I figured that it is referring to the IIS and PHP on my local development machine.
Hence, the IIS capabilities fail on machines of other users.
I want to understand do I need to make any necessary config changes to get the application to use the remote IIS?
Serviceconfiguration <?xml version="1.0"?> <ServiceConfiguration serviceName="Blob" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration"> <Role name="BlobCgiRole"> <Instances count="1" /> <ConfigurationSettings> <!-- for local storage --> <Setting name="DiagnosticsConnectionString" value="UseDevelopmentStorage=true" /> <!-- for cloud storage --> <!--<Setting name="DiagnosticsConnectionString" value="DefaultEndpointsProtocol=http;AccountName=accountname;AccountKey=accountkey" />--> </ConfigurationSettings> </Role> </ServiceConfiguration>
web.config <?xml version="1.0"?> <configuration> <system.diagnostics> <trace> <listeners> <add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=22.214.171.124, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="AzureDiagnostics"> <filter type=""/> </add> </listeners> </trace> </system.diagnostics> <system.webServer> <!-- DO NOT REMOVE: PHP FastCGI Module Handler --> <handlers> <clear/> <add name="PHP via FastCGI" path="*.php" verb="*" modules="FastCgiModule" scriptProcessor="%RoleRoot%\approot\php\php-cgi.exe" resourceType="Unspecified"/> <add name="StaticFile" path="*" verb="*" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" resourceType="Either" requireAccess="Read"/> </handlers> <!-- Diagnostics trace listeners --> <tracing> <traceFailedRequests> <add path="*"> <traceAreas> <add provider="ASP" verbosity="Verbose"/> <add provider="ASPNET" areas="Infrastructure,Module,Page,AppServices" verbosity="Verbose"/> <add provider="ISAPI Extension" verbosity="Verbose"/> <add provider="WWW Server" areas="Authentication,Security,Filter,StaticFile,CGI,Compression,Cache,RequestNotifications,Module" verbosity="Verbose"/> </traceAreas> <failureDefinitions statusCodes="400-599"/> </add> </traceFailedRequests> </tracing> </system.webServer> <system.web> <compilation debug="true"/></system.web> </configuration>
web.roleconfig <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.webServer> <fastCgi> <application fullPath="%RoleRoot%\approot\php\php-cgi.exe"/> </fastCgi> </system.webServer> </configuration>
You said your flex application which is hosted on Azure is referring to the IIS and PHP on my local development machine.
How did you know it is referring to the IIS and PHP on my local development machine?
If the web role contains both the flex application and PHP scripts, once the web role is deployed on Azure, the flex application will be referring to the web role on Azure. I'd suggest you check the source code of the flex application and find out which address is actually being referred.
Please mark the replies as answers if they help or unmark if not.
If you have any feedback about my replies, please contact firstname.lastname@example.org.
Microsoft One Code Framework
It can also be useful (as a testing / debugging tool) to enable RDP on the Role.
You can then log into the machine, look at the configuration on the azure-hosted environment to try and diagnose what's going on.
We often find that it's a quick way to identify the problem, correct if whilst RDP'd into the box making notes of what you change to make it work.
Once you have solved it you can then make the changes in your package and redeploy it to check it works with the automated deployment etc.
Hope this helps.