WCF rest services STS and JavaScript

Hello
I want to have rest services that are claims enabled, the token should be issued by the STS after the user log in to the web app. This token shall be saved and used by JavaScript calls to the rest services. Is this possible? if so kindly provide a sample
or explanation, since I have been through a lot of examples for STS and rest and trying to build this scenario but it seems very complex. I have spent a lot of time on this.
Thank you in advance
Regards,
Moe

Hi Don Hamdan,
>>I want to have rest services that are claims enabled, the token should be issued by the STS after the user log in to the web app. This token shall be saved and used by JavaScript calls to the rest services. Is this possible?
Yes, it is possible, I will recommand you build the claims enabled WCF Services using WIF, the following is the scenario of it:
In this way the client will use the WIF to send credentials to the STS and upon successful authentication, the agent is issued a token by the STS and the agent sends this STS-issued token to the WCF service.The claims enabled WCF service is configured
to trust the STS and the tokens it issues. Besides, the claims enabled WCF service uses WIF to validate the token and to parse it.
For more information, please try to refer to the following article:
#Understanding Windows Identity Foundation (WIF) 4.5:
http://www.codeproject.com/Articles/504399/Understanding-Windows-Identity-Foundation-WIF .  
#Using WIF for securing REST Service:
http://zamd.net/2010/07/31/using-wif-for-securing-rest-service/ .
#Secure your REST-based WCF service with WIF:
https://waysec.wordpress.com/2011/12/28/secure-your-rest-based-wcf-service-with-wif-part-1/ .
Best Regards,
Amy Peng
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • WCF and WP8.1: Can I only use WCF REST services? Then better WCF or Web API?

    I am trying to create a simple application to test WCF with WP8.1. I have created my service. Later I create my WP8.1 silver light application and I try to add a reference to my service Project. The problem is that I get an error that says that I have only
    add reference to projects that are Windows pone 8.
    I have read some solutions, but all of them are creating a WCF REST service, so my doubt if the WP8.1 applications only can connect to WCF REST services.
    In this case, if this is true, it not would be better to use Web API instead of WCF?
    Thanks so much.

    You can use any type of rest service with windows phone 8.1 because rest services can be called via the httpclient class.  You dont need a service reference.  Personally I prefer the web api but there is no reason you can not use a wcf rest service.

  • Getting Excel to interpret the return string of a WEBSERVICE() function using a WCF REST service.

    I am using the WEBSERVICE() function in Excel and a WCF REST service is called through this function.  
    The web service returns a string value of true or false when invoked.  E.g. <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">True</string>
    This has been confirmed through debugging and it seems to be working fine when invoked through a client application or browser.
    However, the result shown in the cell in the Excel sheet is #VALUE!. This particular cell has a custom format (set using the Format Cells ... option) that displays "Yes" or "No". (The
    custom format is "Yes" ; "Yes" ; "No".)  Is this the correct way of interpreting the results of a Web Service method called in Excel? Does a #VALUE! result actually imply a formatting issue or some other interpretation
    error? Is there anything missing? Can somebody suggest ideas?
    Any help would be appreciated.
    Many thanks,
    Keith
    R K Howard

    Hi Keith,
    Have you used the formula FILTERXML(xml, xpath) function to extract single pieces of data from the XML string?
    If not, please follow the blog below, the author will guide you to get data from Webservice.
    http://blogs.office.com/2013/03/21/use-webservice-functions-to-automatically-update-excel-2013-spreadsheets-with-online-data/
    Best Regards
    Lan 
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to Create simple WCF/REST (JOSN,get and post) and deploy to Sharepoint 2013 Server.

    HI All,
       I wan to create a simple WCF/REST service and deployed to SharePoint server , i have created some sample svc file and put in to _vti_bin folder using SharePoint solution using vs 2013 but its not accessible from IIS its always asking the Widows
    Authentcation .
    however my exact requirement is custom service should be accessible without asking the authentication like _vti_bin/Listdata.svc is there any way to do like this ? 
    my reference:
    http://platinumdogs.me/2013/03/14/sharepoint-adventures-with-the-rest-api-part-1/
    http://msdn.microsoft.com/en-us/library/office/jj860569(v=office.15).aspx
    http://dotnetmentors.com/wcf/wcf-rest-service-to-get-or-post-json-data-and-retrieve-json-data-with-datacontract.aspx
    http://stevenhollidge.blogspot.in/2011/09/wcfwebapi-rest-json-services.html
    Thanks
    SujilKumar
    Software developer

    Hi Sujil
    Greetings. pls check this link
    http://social.technet.microsoft.com/wiki/contents/articles/24194.sharepoint-2013-create-a-custom-wcf-rest-service-hosted-in-sharepoint-and-deployed-in-a-wsp.aspx
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • WCF Rest Service Vs Web API

    1. What is difference between WCF REST SERVICE(and not WCF) and WebAPI?
    2. When we should one over another?
    Deepak Talele Ph: 91-9158413830 Email: [email protected], [email protected]

    Hi,
    Use WCF to create reliable, secure web services that accessible over a variety of transports. Use ASP.NET Web API to create HTTP-based services that are accessible from a wide variety of clients. Use ASP.NET Web API if you are creating and designing new
    REST-style services. Although WCF provides some support for writing REST-style services, the support for REST in ASP.NET Web API is more complete and all future REST feature improvements will be made in ASP.NET Web API.
    For the difference between WCF REST Service and web api, you could refer to the following links for more information:
    https://msdn.microsoft.com/en-us/library/jj823172(v=vs.110).aspx
    http://www.dotnet-tricks.com/Tutorial/webapi/JI2X050413-Difference-between-WCF-and-Web-API-and-WCF-REST-and-Web-Service.html
    Regards

  • WCF Rest Service

    Hi,
    What the difference betwwen the wcf rest service and web api? When to choose to use the web api?

    Hi Andrewsys,
    >>What the difference betwwen the wcf rest service and web api?
    For the difference betwwen the WCF Rest Service and Web API, please try to refer to the following information:
    WCF Rest Service:
    To use WCF as WCF
    Rest service you have to enable webHttpBindings.
    It support HTTP GET and POST verbs by [WebGet] and [WebInvoke] attributes respectively.
    To enable other HTTP verbs you have to do some configuration in IIS to accept request of that particular verb on .svc files
    Passing data through parameters using a WebGet needs configuration. The UriTemplate must be specified
    It support XML, JSON and ATOM data format.
    Web API:
    This is the new framework for building HTTP services with easy and simple way.
    Web API is open source an ideal platform for building REST-ful services over the .NET Framework.
    Unlike WCF Rest service, it use the full featues of HTTP (like URIs, request/response headers, caching, versioning, various content formats)
    It also supports the MVC features such as routing, controllers, action results, filter, model binders, IOC container or dependency injection, unit testing that makes it more simple and robust.
    It can be hosted with in the application or on IIS.
    It is light weight architecture and good for devices which have limited bandwidth like smart phones.
    Responses are formatted by Web API’s MediaTypeFormatter into JSON, XML or whatever format you want to add as a MediaTypeFormatter.
    >>When to choose to use the web api?
    Choose Web API when you want to create a resource-oriented services over HTTP that can use the full features of HTTP (like URIs, request/response headers, caching, versioning, various content formats).
    Choose Web API when you want to expose your service to a broad range of clients including browsers, mobiles, iphone and tablets.
    For more information, please try to refer to the following articles:
    https://msdn.microsoft.com/en-us/library/jj823172(v=vs.110).aspx .
    http://www.dotnet-tricks.com/Tutorial/webapi/JI2X050413-Difference-between-WCF-and-Web-API-and-WCF-REST-and-Web-Service.html
    http://blogs.msdn.com/b/fkaduk/archive/2014/01/07/rest-wcf-vs-webapi-throughput.aspx .
    Best Regards,
    Amy Peng
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Unable to deploy a simple WCF REST service on IIS

    Hi,
    I have create a simple WCF based REST service in VS. I am able to run this in VS while deploying it in IIS 8.5 is really difficult. I am not able to do this. Everytime IIS gives 500 error and gives possible errors but not the actual one. Is there any document
    for web service (REST based WCF) deployment on IIS 8.5 which I can refer to.
    Regards,
    UmeshB

    Check if the below articles helps-
    RESTful WCF Architecture
    – Hosting RESTful WCF Services in IIS
    Walkthrough on creating WCF 4.0 Service and Hosting
    Also, where is BizTalk in your flow?
    Thanks,
    Prashant
    Please mark this post accordingly if it answers your query or is helpful.

  • Restful services, widgets and the widget foundation

    Hi,
    I installed the widget foundation and found the tutorial helpful when craeting a simple RFC call widget for displaying a customers details.
    In the description document I raed even RESTful services can be created with the foundation.
    Is a tutorial or at least a prototype application available ? How can  a REST service be build in SAP anyway (say for a customer) ?
    Would be great to skip all the RFc and SOAP stuff in favour of http://myserver:port/customers/12345 for all the details.
    Any help on this is appreciated.
    Marcus

    REST service can be simple BSP page which takes some parameters and process them and returns the result in xml or json format.
    check out my weblog at /people/durairaj.athavanraja/blog/2006/10/10/sap-logged-on-users-list-widget ,
    i am using a similar approach
    Raja

  • Problem: Project can't connect to WCF RESTful service in the same solution

    I followed the instruction in "Consuming
    a RESTful web service with jQuery and Ajax" on the blog of Dedra L. Welch and created in my solution a WFC Web Application (RestService)
    and a ASP.NET Empty Website (TestClient), but the client website couldn't connect to the service. I'm not sure did the jQuery function even run at all.

    Hi blue_lightning,
    >>but the client website couldn't connect to the service. I'm not sure did the jQuery function even run at all.
    First please try to follow the blog step by step to see if it works.
    Then please try to use the fiddler to help you detect if the service is run or not. Or you can just use a Get method in your web service to test if you can broswer it in the broswer. If you can get the right value with the Get method, then it means
    that your service should run.
    #Fiddler:
    http://www.telerik.com/fiddler .
    Best Regards,
    Amy Peng
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • RESTful Service Module and Blob column

    Hi
    I created Restful as GET with some parameters. Everythink works without blob column. When I run restful handler in blob column i had "...binary data omitted...". Is some solution to catch file from APEX web service ?
    APEX 4.2.2 on Listener 2.1 or 2.2
    Regards

    Hi,
    You cannot use Blobs directly as fields in CMP EJB, since Blob is really an open cursor to the database, and it is not serializable.
    Here's a How-to on using Blobs
    http://otn.oracle.com/tech/java/oc4j/904/content_preview.html
    You can see the code for this at the end of the page
    http://otn.oracle.com/tech/java/oc4j/904/how_to/how-to-ejb-cmpblob.zip
    Hope this helps,
    Thanks,
    Neelesh
    OTN Team @ IDC

  • Adobe Document Services - WebDynPro and Javascript error

    Hello,
    I am a new to ADS. I just finished installing a test ADS and made some test, non interactive forms in WebDynPro.
    I have several webdynpro views and some of them embed also a PDF object rendered from ADS and have noticed that in some clients, when attempting to navigate away from the view that contains the PFD by clicking on buttons, a JavaScript "Access denied" error is thrown and no action is taken.
    My only option is to have the view containing the PDF with no buttons to navigate away.
    If the WebDynPro App is embedded in Portal, things go even worst.
    Anybody else has seen this ? Any advice on how to solve this problem ?
    Regards
    Vitaliano Trecca

    Hi Vitaliano,
    Firstly let me tell you that I am not an expert in this, but somethings that I have tried are listed below.
    The buttons that you press are present in the Adobe Form right.
    I was using WAS SP9, Adobe 7.0, and xACF_SP11, I think there was initially a problem with ACF itself, some dlls were not correct.
    I would suggest that you uninstall ACF, and manually remove the dll's if it doesnt remove automatically. Try reinstalling ACF and see.
    I believe you should also move to higher version other than SP9 atleast to SP10 because I faced some other additional problems in SP9, which are fixed in SP10.
    Regards,
    Pavan

  • Flex and Restful Services

    Hello,
    I'm new to the whole Flex system and I'm trying to integrate with WCF Rest Services
    I see that Flex doesn't support PUT and DELETE which is fine because we can use the x-http-method-override header which I assume you set in Flex with the headers property of the HttpService object?
    httpService.headers["x-http-method-override"] = "DELETE"
    The other thing is the HTTP Status code - it seems that Flex can't give you the HTTP Status code returned by the HttpService and that codes over 200 cause an exception. Is this correct and is this going to be resolved in Flex 4?
    Thanks,
    Dave

    I had a similar problem with 302 codes.  Firefox gets HTTPStatusEvent.HTTP_STATUS and IE gets Event.COMPLETE.  Can you check HTTPStatusEvent in Safari?
    Basically the HTTP stuff is a total disaster because of all the inconsistencies in the browser plug-in interfaces.  So much for "write once run anywhere"!  More like write once, test everywhere, pray...
    If you're in control of the server returning the 204 I'd say change it to not do that but I understand that may not be an option.

  • Rest services using WCF

    Hi,
    Couple of doubts about wcf rest  services.
    1, how a wcf rest service call is made from a asp.net mvc or asp.net web application .
     a, What is the better way to consume in ecommerce application (where traffic is more)
    b, is it using a httpwebrequest obejct or do we need to create a proxy class , can anybody paste a snippet of the code
    consume it ore please suggest a web reference link .
    2, is the web api took over the wcf rest service role  or still it is using in industry.
    Thanks

    Hi techasuran,
    >>1, how a wcf rest service call is made from a asp.net mvc or asp.net web application .
    a,What is the better way to consume in ecommerce application (where traffic is more)
    b, is it using a httpwebrequest obejct or do we need to create a proxy class , can anybody paste a snippet of the code
    For the WCF Rest Service, we can not do the add the service reference as do in WCF SOAP Service, because the REST Service has no concept of a WSDL in WCF. Then if you want to call the WCF Rest Service from a asp.net mvc or asp.net
    web application, please try to use the HttpWebReqest, HttpClient or the Jquery to help us. In my mind the better way to consume the WCF Rest Services in the ecommerce application is to use the Jquery Ajax Calls.
    For more information, please try to refer to the following articles:
    #Call Restful Service using HttpWebRequest:
    http://fromjami.wordpress.com/2013/05/26/call-restful-service-using-httpwebrequest-and-post-data/ .
    #Create and consume WCF Restful Service using an HttpClient:
    http://chsakell.com/2013/07/12/create-and-consume-wcf-restful-service-using-an-httpclient/ .
    #Consume RESTful service using jQuery in 2 simple steps:
    http://www.topwcftutorials.net/2013/10/consume-rest-service-using-jquery.html .
    >>2, is the web api took over the wcf rest service role  or still it is using in industry.
    Web API is open source an ideal platform for building REST-ful services over the .NET Framework. Unlike WCF Rest service, it use the full featues of HTTP (like URIs, request/response headers, caching, versioning, various content formats). It also supports the
    MVC features such as routing, controllers, action results, filter, model binders, IOC container or dependency injection, unit testing that makes it more simple and robust.
    For more information about the difference betwwen the WCF Rest Service and Web API and how to choose betwwen them, please try to refer to the following articles:
    #Difference between WCF and Web API and WCF REST and Web Service:
    http://www.dotnet-tricks.com/Tutorial/webapi/JI2X050413-Difference-between-WCF-and-Web-API-and-WCF-REST-and-Web-Service.html
    #WCF or ASP.NET Web APIs:
    http://www.codeproject.com/Articles/341414/WCF-or-ASP-NET-Web-APIs-My-two-cents-on-the-subjec .
    Best Regards,
    Amy Peng
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Silverlight 5 and WCF Ria Services Link Visual Studio 2012

    Hi, I have a Visual Studio 2010 Project, I installed Visual Studio 2012 and Opened the Project with VS 2012. I can run the Project without issues but at design time the Web Project is no recognized as a valid reference.
    My Silverlight application has a WCF RIA Services link to this Project. If I switch to Visual Studio 2010 I have not design time errors.
    Why in Visual Studio 2012 my Silverlight 5 Project shows a message indicating the Web Project namespace does not exists?
    Obiously the reference does not exists because is a WCF RIA Services link and VS Should infer the namespace.
    I've notice that the generated code is being created with the right namespace, it's just that Visual Studio 2012 is not recognizing the classes in the generated code.
    Help please.

    Hi,
     You need add web service again for VS-2012. You can see the step by step process
     http://atikpassion.blogspot.com/2013/01/add-service-after-migrating-silverlight.html
    Hope it will help you.
    Regards atik sarker

  • WCF-WebHttp dynamic URL and Dynamic Header/Behavior configuration.

    HI,
    I have an requirement to integrate with the REST Services in BizTalk Server 2013 R2, And This REST Service URL and HTTP Headers will differs per message. So I had created an Orchestration with the Dynamic Request-Response port and assign the properties in
    Message Assignment Shape. However while testing HTTP Headers were not added to service request message.
    I had tried with create Custom endpoint behaviour and assigned this behaviour to service request in Orchestration, however this property also not assigned from the Orchestration.
    Is this a bug for WCF-WebHttp Adapter? Is any other options to achieve my requirement?
    Thanks,
    Raj
    Praveen

    Hi Praveen,
    Its a known bug already
    reported to Microsoft. 
    BizTalk 2013 servers that have been upgraded from BizTalk 2010 are missing
    some of the new global properties including HttpHeaders properties because
    of this even in orchestration we cannot change the HttpHeaders on messages.
    As a workaround WCF behavior extension
    can be used to solve this problem.
    Which can be downloaded from here.
    For the detailed explanation, I would adivce you to follow the below link on how to dynamically change
    the WCF-HttpHeaders for WCF-WebHTTP adapter.
    Dynamic
    WCF-HttpHeaders for WCF WebHttp adapter
    There is already a discussion going on around this on another post. Ashwin has also recommend to use custom pipeline component as a work around .
    Refer: BizTalk WCF-WebHttp Custom Headers per message
    Rachit
    Please mark as answer or vote as helpful if my reply does

Maybe you are looking for

  • GL Translation at Transaction Level?

    We are mutli-national company with 22 Sets of Books and 21 different functional currencies running on 11i (11.5.10.2) We consolidate all into single SOB at end of each month into USD. Issue is we are getting a lot of questions from our upper level ma

  • PJC tab-key navigation problem within bean  (FORMS intercepting tab key??)

    Using Forms 10.1.2.3, IE7, JRE 1.6 When attempting to navigate within the bean area, it appears as if FORMS is suppressing the keyEvent when the tab key is pressed. This means that I cannot use tab or shift-tab to navigate within the PJC's editable f

  • Setting a minimum height for a dyanmic subform

    I am creating a form that is reading in a set of instructions from XML. I would like to limit the instructions to 2 per page. Is there a way I can set a minimum height for the subform, so it will at least be 1/2 the page?

  • Oracle Database & Zones

    We are moving our Oracle Database from Solaris 10 to Solaris 11.2. Is there advantage and disadvantages  of running the Database in Kernel Zone?

  • Table Maintenance, during upgrades

    Experts, How do we handle table maintenance generator screens and t-codes during upgrades (for Z tables)? Do they come up in the SPAU list post upgrade or is there anything to do in SPDD during ACT_<version> stage? Tx, in adv.