I need to develop web api with OData enabled. My API uses another service which have OData enabled.
My problem is that if I enable SkipToken on my API I need to fetch all records from external OData service same applies for Select, Filter and other OData options.
I don't know if this is even possible to "redirect" or something like that calls from my API to external OData service.
Any Ideas what can I do?
Regards
Related
When developing
OData endpoints
in ASP.NET Core
then adding swagger to auto document the api endpoints
the OData endpoint is listed as being both an OData endpoint AND a traditional REST interface.
This could be confusing to service client developers (not knowing when to use which?)
Can one control what is shown/how automatic documentation is developed for OData endpoints?
If so, how?
If you think this is actually not a problem, I'd love to hear your reasoning as to why not.
Thank you!
I have a multi-tiered application with data and application layers.
If I need to use odata, I can implement it with web-api and user can pass parameters but how can web-api can talk to wcf service in this scenario?
Is it possible? Is there a standard solution? Is there a recommended solution from Microsoft?
I tried to search for a good reference, but I couldn't find any samples for how to use OData with web api and WCF together.
Is it possible to create an OData compliant RESTful web service on an MS platform without using WCF data services?
Sure, you can comply with the spec using plain old asp.net. Its way more work though. Why would you do this?
Yes and since time has passed since you originally asked the question it is now easier to create an OData Service without using WCF Data Services as you can use the ASP.NET Web API which can provide (somewhat limited) OData functionality when you expose IQueryable methods.
http://www.nuget.org/packages/microsoft.aspnet.webapi.odata
I want to create a create a WCF Service which is invoked on the button click of MS Access Form.
You CAN consume WCF services through MS Access, but not via standard WCF mechanisms. You'll need to consume the service via GET requests, POST requests, or SOAP requests.
One way to accomplish this for SOAP requests on the Access side is using the SOAP toolkit:
http://msdn.microsoft.com/en-us/library/aa140260%28office.10%29.aspx
Another way that would work for GET, POST or SOAP requests is using XMLHTTP (if you go the SOAP route, you'll need to make your own SOAP envelope in the XML):
http://www.codemaker.co.uk/it/tips/ado_conn.htm (search for XMLHTTP)
On the WCF side you have a couple of choices:
Host a WebHttpBinding service. This gives you options to expose GET and POST endpoints for your services. See http://www.windowsitpro.com/article/net-framework2/exposing-classic-http-endpoints-with-wcf-in-net-3-5.aspx.
Host a BasicHttpBinding service that exposes a SOAP endpoint (this is the default WCF endpoint if you create a new service in Visual Studio). If you go this route, you probably want to set it to use legacy XML serialization and WSDL for compatibility if you go with option 1 on the access end (see http://msdn.microsoft.com/en-us/library/system.servicemodel.xmlserializerformatattribute.aspx).
One other thing to note: If you create a BasicHttpBinding WCF Service with XmlSerializerFormatAttribute, you are basically getting (from a data exchange standpoint) the same thing as if you were to write a legacy asmx service.
You cannot consume a WCF directly with MS Access.
If you own the WCF service, you would have to change it to a web service using HTTP bindings.
If you don't own it, you will have to write your own web service that is basically a wrapper around the WCF.
Then you can consume it as a web service in MS Access.
I am using a WCF authentication service I set up with a web application. I have successfully set up and tested the AuthenticationService and RolesService. The web application can successfully call methods like ValidateUser and GetRolesForCurrentUser through the WCF services.
I want to integrate the WCF authentication service with my web.config and site.map. Do I need to write a custom provider, or is there some way I can modify the web.config of the web application to use the WCF authentication service as its membership provider?
This way I can set what roles have access to what directories based off the WCF authentication service.
Application Services are not intended as a replacement for the provider stack.
They are meant to augment and enable usage from context other than .aspx.
In most cases you may simply use the default provider stack (Membership/Roles/Profiles).
You simply need to pass the cookies that you get when you call 'Login' via app services around in the context of the service call.
See here for some more information about adding cookies to a WCF call.
If you are using AJAX to call the services, you don't have to do anything, simply authenticate via ajax and then call via ajax.
Skys answer doesn't seem to answer the question?
It seems to me that there is a genuine need to call the WCF AuthenticationService from an ASP.NET application?
Consider a three tier application where all database access is mandated to be performed by the application tier. There is a single database (data tier) containing business data as well as membership data.
I have written a three tier implementation whereby a custom MembershipProvider on the presentation tier invokes the AuthenticationService on the application tier which in turn runs my custom authentication routine.
I could quite easily create a custom WCF service (eg not AutheticationService) which does this authentication but I try to use .NET objects where possible.
it would be nice if I could tell ASP.NET to use the AutheticationService without needing a custom membership provider but I dont think this is possible?