Last post Dec 23, 2014 11:35 AM by Kyle.Watson
Dec 18, 2014 02:14 PM|Kyle.Watson|LINK
I cannot get this to fully work if you host it within a Web application. The application they provide works correctly. But if you move all the code to an empty web application. Install the correct Gnuget packages build it, the function routes do not work. For
http://localhost:12345/odata/Windows(1)/CurrentShape/ODataComplexTypeInheritanceSample.Circle/Radius //works in web app
http://localhost:12345/odata/Windows(1)/ODataComplexTypeInheritanceSample.GetTheLastOptionalShape() //404 in web app. Is a function
Even built from scratch the console application works correctly but i cannot get a web application to work for this sample.
Can someone help me get the sample project above hosted in a web application?
Here are my current steps:
1. Create empty web app.
2. Add New Item, Owin Startup class
public void Configuration(IAppBuilder app)
HttpConfiguration config = new HttpConfiguration();
IEdmModel edmModel = ODataModels.GetModel();
config.MapODataServiceRoute(routeName: "OData", routePrefix: "odata", model: edmModel);
I can reproduce their example in a console application and everything works correctly.
Dec 22, 2014 04:12 AM|Shawn - MSFT|LINK
I cannot get this to fully work if you host it within a Web application. The application they provide works correctly. But if you move all the code to an empty web application.
For this situation, if you move all the codes to an empty web application, you may need check all other settings, such as within the web.config file.
And the above sample in your original post can not be opened.
Besides, you may refer to the following links for more information:
Dec 23, 2014 11:35 AM|Kyle.Watson|LINK
Here is the direct link.
I'm not sure what web.config changes need to be made. But, the functions are not being routed correctly out of the box.