slimphp / Slim-Website

Slim Framework website for GitHub Pages
http://slimframework.com
127 stars 336 forks source link

When using IIS & CORS middleware - web.config documentation could use an update #244

Closed ghost closed 3 months ago

ghost commented 7 years ago

Hi,

I hit an issue recently while following the documentation for running SLIM 3 on IIS (specifically IIS8 via Azure App Services), I tried following https://www.slimframework.com/docs/start/web-servers.html which is close but need a couple of additions if you want the OPTIONS calls to be passed to SLIM instead of intercepted by IIS/ASP.NET.

The problem presented during to work I was trying to do with CORS using @tuupola's middleware so I started the issue over at his repo, but it became apparent the web.config needs the tweak not SLIM or the CORS middleware: tuupola/cors-middleware#8

Just logging an issue to update/add a note on the documentation, attached the Web.Config I used to resolve in case it helps someone.

web.config.txt

geggleto commented 7 years ago

I've left this alone as I have no way to test it.

ghost commented 7 years ago

Apologies, I just dropped the issue in so I didnt forget about it and got tied up afterwards (plus didn't trust my GH skills to PR!).

To test it, I ran up an Azure App Service on the free tier with a very basic slim 3 implementation that had just one route and the middleware above then incrementally altered the web.config until it worked. I can run up a second copy of the app service on my Azure account if you want to PM me a microsoft account you have access to - happy to give you access on mine if that makes it easier?

odan commented 3 months ago

We have updated the IIS section some time ago. Please try that. If there are still issues, please create a new Github issue.