I am using OData as an api within an app. One of my database tables has a unique id that contains periods (.) I’m trying to access the entries in that table using the the following convention:
http://foo.bar.com/services/v001.svc/Categories(‘A.B.C’)
..but I’m continually receiving the following error:
The controller for path ‘/services/v001.svc/Categories(‘A.B.C’)’ was not found or does not implement IController.
I initially thought this was due to a mis-configuration in my routes but I removed all custom routes and still get the same error. Accessing all other entries in all tables within my database via the same uri convention works just fine. The only difference between these entries and all others is that I use a period in the unique identifier column.
Help!
The probelm is that Cassini (the development web server within Visual Studio) has a problem handling periods in a URL. The solution is to change the project’s properties to use a Local IIS Web Server instead of using Cassini. To do this:
This of course assumes you have IIS installed on your PC. Why Cassini doesn’t like periods and full IIS does? Who knows?