Configure IIS for WebApplication in Ensemble
Hi all,
I've configured my Ensemble instance to use IIS 7, according to the instructions CSP Gateway configuration Guide and I've configure the CSP Virtual application.
All the process about Native modules is done.
If I open http://localhost/csp/bin/Systems/Module.cxw I see that it is using the IIS as I expected.
I've created a WebApi and I've deployed in my server
If I call the check method it works
however, if I call it directly (localhost/myapi/check) it doesn't work.
Error HTTP 404.0 - Not Found
If I check the list of application access in the CSP Web Gateway management, it is in the list.
I've tried to add it manually, using the same configuration than /csp, also adding the application /myapi in the IIS, but no one works.
Any idea what I'm doing wrong?
Best regards,
Francisco Lopez
To pinpoint the error, please:
After that try to open:
Hi Eduard,
I tried to do that before, but all CSP pages was displayed, but WebApi didn't work. The problem has been resolved. Please check the other answer.
Thanks for your comment
Hi Alexander,
I have the extension *.* to CSPms, instead of each extension (CSP, ZEN, CLS....) and the "Invoke handler only if request is mapped" is unchecked, but still doesn't work
Thanks Kyle,
You are right, Apache send all request to CSP Gateway, but IIS needs to know who to response the request. The answer is "*"
Hi Francisco.
Besides defining "/myapi" application in IIS you also need to add mapping of "*" extension to CSPms, as in "Registering Additional File Types with CSP" section of documentation. When adding this mapping ensure that "Invoke handler only if request is mapped to" is unchecked.
Hope this helps,
Alexander.
I've just done a "rubber duck" with myself... when I've wrote the comment, I've realised that the extensión that I have is "*.*", instead of "*", that is the difference.
A WebApi hasn't an extensión, therefore it is handler by the CSPms library.
I've just changed it and it works
Thanks for all
Your IIS configuration maps /csp to the CSP Gateway, but your application is /myapp - so when IIS looks at /myapp, it doesn't know what to do so it tries to serve files off of your filesystem which, of course, it can't!
So your question now, no doubt, is why does it work through the private Apache server (57773)? Well because the private Apache server is set up to ALWAYS send ALL requests to the CSP Gateway, and the CSP Gateway knows how to handle it.
There's another trick, too. When you create your /myapp virtual application, make sure you create a new module mapping for *. REST requests do not have extensions so you need to be sending all requests to the CSP Gateway regardless of extension (or things won't work)!
If you are having any more trouble getting this set up, please feel free to contact the WRC and we'll be happy to help you get set up.