1

My iis express from visual studio 2017 doesn't recognize php. I don't want debugging php code at my VS. I just want to run my php file with asp.net codes.

I followed below links. How to Run PHP on IIS7.5 Express? https://www.iis.net/learn/application-frameworks/install-and-configure-php-on-iis/install-and-configure-php

If I manual create web site from IIS express manager, php is working.

But starting debugging from visual studio project, VS start it's local iis express, and launch http://localhost:7777/ In that case php doens't works, it returns 404.3

It seems iis express at VS doesn't proceed IIS express settings.

sungyong
  • 2,267
  • 8
  • 38
  • 66
  • 1
    " I just want to run my php file with asp.net codes." You shouldn't mix languages like that, as it will result in more errors – Filnor Nov 24 '17 at 09:19
  • Yes, I know, and I really dislike mixing languages. But I need to use existing php based open source to my asp.net code. – sungyong Nov 24 '17 at 09:22
  • "IIS express manager"? What's that? – Lex Li Nov 24 '17 at 14:43
  • @LexLi it's windows program. Internet Information Service(IIS) manager. – sungyong Nov 25 '17 at 08:17
  • @sungyong then you completely got it wrong. IIS Manager only configures full IIS. To configure IIS Express for your VS project, you might use a tool like Jexus Manager, http://jexusmanager.com – Lex Li Nov 25 '17 at 13:35
  • @LexLi Yes, you're right. I totally misunderstood. It's an honor to know you, you made jexusmanager. I installed jexusmanager, and confirmed it's "Handler Mapping" was correctly set FastCGI php. But still 404.3 error when I launch debug session in my VS 2017. VS's debu mode iis express is not controlled jexusmanager? – sungyong Nov 25 '17 at 14:26
  • The complexity of IIS Express and VS is that you need to make sure the correct applicationHost.config file is modified. What server node in Jexus Manager did you review? You'd better add the solution file as a new IIS Express server instance in Jexus Manager. The default "IIS Express" node is for VS2013 and older. – Lex Li Nov 25 '17 at 15:36
  • https://www.jexusmanager.com/en/latest/getting-started/features.html#add-iis-express-from-visual-studio-2015-solution-file This is how solution files can be added to Jexus Manager. – Lex Li Nov 25 '17 at 15:56
  • @LexLi Correct. I didn't know solution files exist per every projects. With your help, I can resolve problem. Thank you. – sungyong Nov 26 '17 at 04:19

1 Answers1

0

With LexiLi's answer was resolved my problem.

applicationhost.config files exist entire IIS express and every VS projects.

For launching IIS express with php from VS, {vs project dir}/.vs/config/applicationhost.config should be modified.
After modifying vs project's applicationhost.config, my php files worked.

sungyong
  • 2,267
  • 8
  • 38
  • 66