asp.net web api - How to name api routing on a webhost sub folder -
i have thought api controllers not found physical paths. reason ask have website example.com created folder example.com/testing , uploaded project there. when ran got errors saying none of apicontrollers found. changed /api/apicustomers /testing/api/apicustomers. worked, not actual posting of new records. did locate , retrieve records database though. doesn't seem need do? have domain winhost , default publish folder example.com/myapp looking @ wrong way?
to handle request not know root path, can use (as in asp.net) ~-character this:
~/api/apicustomers
~ replaced root (i.e. /api/apicustomers
prod , /testing/api/apicustomers
test environment)
Comments
Post a Comment