401 K CatchUP

Hi All,
I have a requirement where in the 401k deduction is given to emps but it does have catch up. Now I want to have catchup and have defined a new element with catch up enabled. Can u pls let me know how will the balances ,old element will migrated to new element ..

Hi,
I will refer you to Doc ID: 208239.1 Implementing 401(k) Catchup for Releases 10.7 and 11
Regards,

Similar Messages

  • Question on how to handle United States 401-K catch up deduction

    Just have a question here to see how other Oracle customers in the United States might be handling the 401-K catch up deduction. For 2009, an employee can deduct up to $16,500 in pay as 401-K deductions. That is the limit for this year as set by US law and IRS regulations. However for employees who are age 50 and over, for 2009 they can deduct an additional $5,500 for 401-K, making their total limit for the year $22,000. These limits can change from year to year. Since not all employees are eligible for this catch up amount, you cannot just set one limit amount for 401-K. The way we have attacked it is that we created two elements, one for 401-K and one for 401-K catchup. That mostly works pretty well. The issue we run into is that when an employee hits the limit on the main 401-K deduction, payroll does not automatically roll over and start the catch up deduction, in the same payroll run. In the next payroll run, the catch up deduction will kick in and the employee's paycheck is back to normal. But it is confusing for the employees who hit this situation (which is a small number) because their paycheck ends up a higher amount in the week that they hit the limit on the main 401-K deduction. How have other customers handled setting up the 401-K catch up deduction? Have you been able to get payroll to continue the normal weekly deduction for 401-K even when the employee hits the yearly limit for the regular 401-K deduction? If so, would be curious to hear how you have configured your system to do this. Thanks for your time and assistance.
    John Dickey

    Okay, after doing a lot of research and studying, I am beginning to see a way to make this work. We will have to find a way to test this out in a development environment. It looks like that if I set the catch up element entry percentage amount to NULL (blank), then set the Take Overlimit Catchup value to ALWAYS, then it may work the way that I want it to. If I am reading this right, at the start of the year only the base element percentage will have a calculation done and a deduction taken (let me emphasize that I am talking about a SEQUENTIAL value for the catch up processing field value). In the period that the employee hits the base limiit, the base element percentage will be fully calculated, with the amount in excess assigned to the CATCH UP ELEMENT. The trick here, that I was failing to realize at first, was that the take overlimit amounts always goes to the catchup element. The next week all of the base percentage amount is overflow and goes to the catch up element. You keep adding to the catch up element amount until you hit the catch up limit. There is NEVER a calculation of an catch up element amount, since the percentage is NULL in that element entry. The only element that ever gets an amount calculated for it is the base element. There is a document, document id 733997.1, that gives an explanation and example of how this Take Overlimit Catchup function works. Will see what happens whenever we can get around to testing this out.
    John Dickey

  • Getting 401 error while creating a Report Data Source with MOSS 2010 Foundation

    I have setup SQL Server 2008 R2 Reporting Services with SharePoint 2010 Foundation in SharePoint integrated mode. SharePoint Foundation is in machine 1 whereas SQL Server 2008 R2 and SSRS Report Server are in machine 2. While configuring Reporting
    Services - Sharepoint integration, I have used Authentication Mode as "Windows Authentication" (I need to use Kerberos).
    My objective is to setup a Data Connection Library, a Report Model Library, and a Reports Library so that I can upload a Report Data Source, some SMDLs, and a few Reports onto their respective libraries.
    While creating the top level site, "Business Intelligence Center" was not available for template selection since SharePoint Foundation is being used. I therefore selected "Blank Site" as the template.
    While creating a SharePoint Site under the top level site, for template selection I again had to select "Blank Site".
    I then proceeded to create a library for the data connection. Towards this, I created a new document library and selected "Basic page" as the document template. I then went to Library Settings for this newly created library and clicked on
    Advanced Settings. In the Advanced Settings page, for "Allow management of content types?" I selected "Yes". Then I clicked on "Add from existing content types" and selected "Report Data Source". I deleted the existing
    "Document" content type for this library.
    Now I wanted to created a Data Connection in the above Data Connection library. For this when I clicked on "New Document" under "Documents" of "Library Tools" and selected "Report Data Source", I got the error "The
    request failed with HTTP status
    401: Unauthorized.".
    Can anybody tell me why I am getting this error?
    Note: I have created the site and the library using SharePoint Admin account.

    Hi,
    Thank you for your detailed description. According to the description, I noticed that the report server was not part of the
    SharePoint farm. Add the report server to the
    SharePoint farm and see how it works.
    To join a report server to a SharePoint farm, the report server must be installed on a computer that has an instance of a SharePoint product or technology. You can install the report server before or after installing the SharePoint product
    or technology instance.
    More information, see
    http://msdn.microsoft.com/en-us/library/bb283190.aspx
    Thanks.
    Tracy Cai
    TechNet Community Support

  • 401:Unauthorized error while consuming a MOSS web service

    Hi, We are trying to cosume a Web Service from MOSS using Spring and Axis. The WSDL requires user name and password. We are passing the right credentials however we are getting the 401 error. The exact exception is provided below. Could any one advise how this can be resolved?
    java.io.FileNotFoundException: Response: '401: Unauthorized' for url: 'https://ts2amr.accenture.com/_vti_bin/Search.asmx?wsdl'.
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'spWSClient' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'spWebService' while setting bean property 'service'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'spWebService' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.remoting.RemoteLookupFailureException: Failed to initialize service for JAX-RPC port [{urn:Microsoft.Search}QueryServiceSoap]; nested exception is javax.xml.rpc.ServiceException: Error processing WSDL document:
    java.io.FileNotFoundException: Response: '401: Unauthorized' for url: 'https://ts2amr.accenture.com/_vti_bin/Search.asmx?wsdl'

    I can't speak for MOSS for sure, but other Microsoft services such as MapPoint used to require Digest Authentication, which isn't quite as pervasive as Basic Authentication. You should doublecheck with the MOSS administrator about the proper credentials and access. You might even try a utility like SoapUI to see if things work from a test client before trying it on the application server.

  • HTTP 401 received when running exRCA and authentication fails

    After upgrading Exchange 2013 to CU6 our ActiveSync functionality stopped (along with a few other things). I have been using ExRCA to troubleshoot and have spent several days looking at forums and trying different things out to get it working again but to
    no avail. Essentially when I enter valid account credentials it fails to authenticate and as a result I receive an 401 response.
    I have already checked Inherited permissions are enabled for the user account in AD. I have checked that the authentication for the Virtual directory is set to Basic with SSL required. (Have also tried with windows authentication enabled). I have recycled
    the ApplicationPool especially the MSExchangeSyncAppPool - That appears to be correctly configured and running under LocalSystem Identity. I have recreated the virtual directory using the reset feature in the EPC. Both internal and external URLs are set as
    well as the CAS server being assigned to the External URL.
    The report that I get: -         
    An ActiveSync session is being attempted with the server.
     Errors were encountered while testing the Exchange ActiveSync session.
     Additional Details
    Elapsed Time: 3721 ms.
     Test Steps
     Attempting to send the OPTIONS command to the server.
     Testing of the OPTIONS command failed. For more information, see Additional Details.
      Tell me more about this issue and how to resolve it
     Additional Details
    An HTTP 401 Unauthorized response was received from the server. This may be the result of invalid credentials or a configuration problem on the Exchange Server.
    HTTP Response Headers:
    request-id: 216790d5-03dc-4616-87c6-d196c870a6f0
    X-CalculatedBETarget: ex2013.domain.org
    X-FEServer: EX2013
    Content-Length: 0
    Cache-Control: private
    Date: Wed, 12 Nov 2014 16:13:10 GMT
    Server: Microsoft-IIS/8.5
    WWW-Authenticate: Basic realm="domain.org"
    X-AspNet-Version: 4.0.30319
    X-Powered-By: ASP.NET
    Elapsed Time: 3721 ms.
    I have failed request logging enabled and I am seeing numerous entries for some of the other services including ActiveSync and getting similar errors to the below: -
    ModuleName
    WindowsAuthenticationModule
    Notification
    AUTHENTICATE_REQUEST
    HttpStatus
    401
    HttpReason
    Unauthorized
    HttpSubStatus
    1
    ErrorCode
    No credentials are available in the security package
     (0x8009030e)
    Any thoughts or additional diagnostic steps will be appreciated.
    I tried recreating the backend virtual directory via EMC using the following command: - 
    New-WebApplication  -Site "Exchange Back End" -Name Microsoft-Server-ActiveSync -PhysicalPath "C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\sync" -ApplicationPool MSExchangeSyncAppPool -Force
    (didnt work...)

    Hi Joby 
    Thanks for getting back - tried your suggestion but still the same. 
    Attempting to send the OPTIONS command to the server.
    Additional Details
    An HTTP 401 Unauthorized response was received from the server. This may be the result of invalid credentials or a configuration problem on the Exchange Server.
    HTTP Response Headers:
    request-id: 53f6bea6-4ef2-463e-87a1-f2dfd6a7bcf8
    X-CalculatedBETarget: ex2013.xx.domain.org
    X-FEServer: EX2013
    Content-Length: 0
    Cache-Control: private
    Date: Mon, 24 Nov 2014 13:16:15 GMT
    Server: Microsoft-IIS/8.5
    WWW-Authenticate: Basic realm="xx.domain.org"
    X-AspNet-Version: 4.0.30319
    X-Powered-By: ASP.NET
    Elapsed Time: 681 ms.

  • Error 401--Unauthorized when deployed on WL Managed server (10.3.3)

    Hi,
    I created & started a WL-Managed server on my window desktop machine. I deployed to this Managed server, an application which is running without problem on Admin Server. (The managed server is created in the same Domain as that of Admin Server)
    However, when I log on to the application on Managed server & enter the UID & PW I get the Error 401--Unauthorized page. The same security works perfectly well for Admin Server.
    Any clues what could be going wrong.
    Thanks in advance.
    Edited by: Prakash Chavan on Feb 28, 2011 4:57 PM

    Thanks Faisal,
    Here is the log after I add the 2 flags
    <Mar 1, 2011 8:59:30 AM EST> <Notice> <WebLogicServer> <BEA-000365> <Server stat
    e changed to RUNNING>
    <Mar 1, 2011 8:59:30 AM EST> <Notice> <WebLogicServer> <BEA-000360> <Server star
    ted in RUNNING mode>
    Mar 1, 2011 9:13:27 AM oracle.jbo.uicli.mom.CpxUtils$Visitor logMainApplicationC
    px
    INFO: zip:C:/JDev11g/Middleware/user_projects/domains/base_domain/servers/Svr0/t
    mp/_WL_user/TestTrackApp_V2.0/77qs7f/war/WEB-INF/lib/_wl_cls_gen.jar!/view/DataB
    indings.cpx
    [JpsAuth] Check Permission
    PolicyContext: [TestTrackApp#V2.0]
    Resource/Target: [view.pageDefs.ttsPageDef]
    Action: [view]
    Permission Class: [oracle.adf.share.security.authorization.RegionP
    ermission]
    Result: [FAILED]
    For more information on this failure, please set -Djps.auth.debug.verb
    ose=true
    I have emailed you the requested log & the config files.
    Edited by: Prakash Chavan on Mar 1, 2011 9:35 AM

  • Error message : HTTP responce code: 401 Access denied

    Hi,
    I am working on Oracle OpenScript 8.5.
    After record the script when i click on playback I got an error message in the following Bold lines code.
    http.get(33, "http://fusion.satyam.com/idc/idcplg", http.querystring(http.param("IdcService", "GET_DOC_PAGE"), http.param("Action", "GetTemplatePage"), http.param("Page", "TRAY_SEARCH_FORM")), null, true, "iso-8859-1", "utf-8/");
    http.get(37, "http://fusion.satyam.com/idc/idcplg", http.querystring(http.param("IdcService", "SS_GET_PAGE"), http.param("siteId", "FCOE"), http.param("siteRelativeUrl", "%2Fhttp%3A%2F%2Fstclnx01.satyam.com%2Fidc%2Fidcplg"), http.param("ssUrlType", "2"), http.param("IdcService", "COLLECTION_DISPLAY"), http.param("hasCollectionID", "true"), http.param("dCollectionID", "42")), null, true, "utf-8/", "utf-8/");
    http.get(41, "http://fusion.satyam.com/idc/idcplg", http.querystring(http.param("IdcService", "SS_GET_PAGE"), http.param("nodeId", "13"), http.param("siteId", "FCOE")), null, true, "iso-8859-1", "ASCII");
    The error message in Result view is HTTP responce code: 401 Access denied .
    The error message in Console View is oracle.oats.scripting.modules.http.api.exceptions.ThinBrowserException: HTTP response code: 401  Access denied
    Note: When i comment that Bolded Code then the script was passed.
    Can any one help me... ..it's very urgent.
    Thanking you.
    Regards,
    Ramesh Dodda
    Edited by: Ramesh Dodda on Jun 11, 2009 1:27 AM
    Edited by: Ramesh Dodda on Jun 11, 2009 1:40 AM

    Hi
    Do you need a username and password to get to the application ?
    Regards
    Alex

  • Adobe Print Form Error - Invalid Response Code: (401) Unauthorized

    Hi, I've just configured ADS on Netweaver 2004s. I've run through the config guide and everything works ok including the form generation test report FP_TEST_00 which outputs PDF without issue. I have two problems:
    -When I run a "test connection" on the RFC destination 'ADS' using the ADSUSER for the login details, I get a 403 not authorized error. Changing this user to J2EE_ADMIN resolves the issue and I get a 302 redirect. I've tried adding other permissions to the ADSUSER without any luck.
    -Running a report on the Portal under e.g. Executive Reporting and attempting to just right-click and hit "Print Version" results in a 401 error for request "http://hostXX:portXX/AdobeDocumentServices/Config?style=document" exactly as per this thread: Re: Adobe Form Creation Error - Invalid Response Code: (401) Unauthorized. However, I've double-checked all user details in Visual Administrator (ADS_AGENT) and on the ABAP stack side in su01 and sm59. I also tried changing the users to dialog with no effect. If I go directly to that URL and log in with ADSUSER I get a 403 not authorised error (using J2EE_ADMIN is again successful). I've noticed that in the http access log the HTTP protocol used is 1.1 when using the web browser and 1.0 when using the sm59 connection test. I've heard of problems with using HTTP/1.1, but when I change the options on IE8 to use HTTP/1.0, it changes for all other requests except the request for "http://hostXX:portXX/AdobeDocumentServices/Config?style=document", which is still submitted as HTTP/1.1. Conversely, in sm59 if I specify that it should use HTTP/1.1 under Special Options, I can see from the access log that it is in fact still using HTTP/1.0. Could this be related to the 401 error code that I'm seeing?
    Any help would be appreciated. Thanks,
    John

    I think I've ruled out the HTTP protocol version as being an issue here. However I may have found more useful information on the actual issue.
    In the security log under usr\sap\<SID>\DVEBMGS00\j2ee\cluster\server0\log\system I see a different message for the unsuccessful report PDF generation attempt to that of a direct query to the same URL with the same web browser, as below. The unsuccessful attempt appears to forget the ADSUSER credentials and resort to the default J2EE_GUEST which has no authorisations and therefore fails. The direct query doesn't lose the ADSUSER credentials and I think this is because it prompts for the user/password when needed. Does anyone know why this happens for a direct query to this URL but not for the PDF generation attempt?
    Resulting logs from unsuccessful PDF generation attempt:
    #1.5 #005056AF1EB300750000002D0000142000048B4D2208F055#1279063306899#/System/Security/WS/SecurityProtocol#sap.com/irj#com.sap.security.core.client.ws.AuthenticationContext.setDestination#AICL0001#622##<host>_<sid>_3576650#AICL0001#4c1a62608ed511dfbe2a005056af1eb3#SAPEngine_Application_Thread[impl:3]_5##0#0#Info#1#com.sap.security.core.client.ws.AuthenticationContext#Java###An destination was set with the following properties:
    {0}.#1#{PROXY_ENABLED=false, CLIENT_AUTHENTICATION_KEYSTORE_VIEW=, SAP_SID=, SLD_URL=, USERNAME=ADSUSER, SLD_WS_NAME=, URL=http://<host>:50000/AdobeDocumentServices/Config?style=document, PROXY_URL=, SSL_SERVER_AUTHENTICATION=IGNORE, SLD_WS_SYSTEM_NAME=, PASSWORD=XXX, SLD_WS_PORT=, SAP_CLIENT=, DEFAULT_URL=http://localhost:50000/AdobeDocumentServices/Config?style=document, Authentication=BASIC, CLIENT_AUTHENTICATION_KEYSTORE_CERTIFICATE=, URL_CHOICE=Custom, SAP_LANGUAGE=}#
    #1.5 #005056AF1EB30072000000250000142000048B4D220A12ED#1279063306977#/System/Security/Authentication##com.sap.engine.services.security.authentication.logincontext#J2EE_GUEST#0##<host>_<sid>_3576650#Guest#4c1a62608ed511dfbe2a005056af1eb3#SAPEngine_Application_Thread[impl:3]_24##0#0#Info#1#com.sap.engine.services.security.authentication.logincontext#Plain###LOGIN.FAILED
    User: N/A
    Authentication Stack: com.adobe/AdobeDocumentServices*AdobeDocumentServices_Config
    Login Module                                                               Flag        Initialize  Login      Commit     Abort      Details
    1. com.sap.engine.services.security.server.jaas.BasicPasswordLoginModule   SUFFICIENT  ok          exception             true       Authentication did not succeed.#
    Successful direct access of URL http://<host>:50000/AdobeDocumentServices/Config?style=document (click on rpData test and manually log in as ADSUSER):
    #1.5 #005056AF1EB30070000000250000142000048B4D3E260016#1279063778670#/System/Security/Authentication##com.sap.engine.services.security.authentication.logincontext#ADSUSER#675##<host>_<sid>_3576650#Guest#812f72008ed611dfa62d005056af1eb3#SAPEngine_Application_Thread[impl:3]_14##0#0#Info#1#com.sap.engine.services.security.authentication.logincontext#Plain###LOGIN.OK
    User: ADSUSER
    Authentication Stack: com.adobe/AdobeDocumentServices*AdobeDocumentServices_Config
    Login Module                                                               Flag        Initialize  Login      Commit     Abort      Details
    1. com.sap.engine.services.security.server.jaas.BasicPasswordLoginModule   SUFFICIENT  ok          true       true                 
    Central Checks                                                                                true                  #
    #1.5 #005056AF1EB30070000000260000142000048B4D3E2666A6#1279063778702#/System/Security/Audit/J2EE##com.sap.engine.services.security.roles.audit#ADSUSER#675##<host>_<sid>_3576650#ADSUSER#812f72008ed611dfa62d005056af1eb3#SAPEngine_Application_Thread[impl:3]_14##0#0#Info#1#com.sap.engine.services.security.roles.audit#Java###{0}: Authorization check for caller assignment to J2EE security role [{1} : {2}].#3#ACCESS.OK#SAP-J2EE-Engine#all#

  • Error 401 while trying to connect SSRS via BIDS Report Designer to PowerPivot workbook hosted in SharePoint 2013

    I am having trouble connecting from BIDS 2012 to a PowerPivot workbook hosted in SharePoint 2013. I'm following this guide:
    http://technet.microsoft.com/en-us/library/gg413489.aspx but run into authentication problems (Error 401, access denied).
    I saw this issue comming up a number of times on this forum, but non of the proposed solutions really solve my issue. Also a lot of the solutions apply to SP2010. I verified the following items and they seem to be ok:
    All servers / clients are member of the same ad domain.
    The Excel PowerPivot file opens in SharePoint Excel Online and sliders and filters work (so connection SSAS / SharePoint is ok)
    I enabled Kerberos, and fiddler/ Kerberos auth tester (http://blog.michelbarneveld.nl/michel/archive/2009/12/05/kerberos-authentication-tester.aspx) are reporting kerberos is used when connecting to the sharepoint site.
    SPN for the sharepoint server is created and the sharepoint service account is allowed for delegation.
    When looking at fiddler when connecting to the PowerPivot document in BIDS, i see an ADOMD.net POST request to /_vti_bin/PowerPivot/redirector.svc/ failing with error 401, even the request containing the auth cookie.
    I updated the web.Config in C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\PowerPivot to use CredentialType "Windows" instead
    of NTLM.
    In the sharepoint logs I find this error:
    03/28/2014 16:39:26.35 w3wp.exe (0x1FE4) 0x0170 SharePoint Foundation Monitoring nasq Medium Entering monitored scope (Request (POST:http://spserver:80/_vti_bin/PowerPivot/redirector.svc/?DataSource=%2Fsites%2FAndreas%2FShared%2520Documents%2FRapportering%2520Resultaat%2520-%2520BalansV5.xlsx)). Parent No
    03/28/2014 16:39:26.35 w3wp.exe (0x1FE4) 0x0170 SharePoint Foundation Runtime aep93 High Exception trying get context compatibility level: System.IO.FileNotFoundException: The site http://spserver:80/_vti_bin/PowerPivot/redirector.svc/?DataSource=%2Fsites%2FAndreas%2FShared%2520Documents%2FRapportering%2520Resultaat%2520-%2520BalansV5.xlsx could not be found in the Web application SPWebApplication Name=SharePoint - 80. at Microsoft.SharePoint.SPSite.LookupSiteInfo(SPFarm farm, Boolean contextSite, Boolean swapSchemeForPathBasedSites, Uri& requestUri, Boolean& lookupRequiredContext, Guid& applicationId, Guid& contentDatabaseId, Guid& siteId, Guid& siteSubscriptionId, SPUrlZone& zone, String& serverRelativeUrl, Boolean& hostHeaderIsSiteName, Boolean& appWebRequest, String& appHostHeaderRedirectDomain, String& appSiteDomainPrefix, String& subscriptionName, String& appSit...
    03/28/2014 16:39:26.35* w3wp.exe (0x1FE4) 0x0170 SharePoint Foundation Runtime aep93 High ...eDomainId, Uri& primaryUri) at Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.GetContextCompatibilityLevel(Uri requestUri)
    03/28/2014 16:39:26.35 w3wp.exe (0x1FE4) 0x0170 SharePoint Foundation Logging Correlation Data xmnv Medium Name=Request (POST:http://spserver:80/_vti_bin/PowerPivot/redirector.svc/?DataSource=%2Fsites%2FAndreas%2FShared%2520Documents%2FRapportering%2520Resultaat%2520-%2520BalansV5.xlsx) 55b8819c-6791-2052-bd23-f1c5b08a996c
    03/28/2014 16:39:26.35 w3wp.exe (0x1FE4) 0x0170 SharePoint Foundation Claims Authentication aip8h Medium Token Cache: Could not find SPSite for 'http://spserver/_vti_bin/PowerPivot/redirector.svc/?DataSource=%2Fsites%2FAndreas%2FShared%2520Documents%2FRapportering%2520Resultaat%2520-%2520BalansV5.xlsx'. Stack: ' at Microsoft.SharePoint.SPSite.LookupSiteInfo(SPFarm farm, Boolean contextSite, Boolean swapSchemeForPathBasedSites, Uri& requestUri, Boolean& lookupRequiredContext, Guid& applicationId, Guid& contentDatabaseId, Guid& siteId, Guid& siteSubscriptionId, SPUrlZone& zone, String& serverRelativeUrl, Boolean& hostHeaderIsSiteName, Boolean& appWebRequest, String& appHostHeaderRedirectDomain, String& appSiteDomainPrefix, String& subscriptionName, String& appSiteDomainId, Uri& primaryUri) at Microsoft.SharePoint.SPSite..ctor(SPFarm farm, Uri requestUri, Boolean contextSite, Boolean ... 55b8819c-6791-2052-bd23-f1c5b08a996c
    03/28/2014 16:39:26.35* w3wp.exe (0x1FE4) 0x0170 SharePoint Foundation Claims Authentication aip8h Medium ...swapSchemeForPathBasedSites, SPUserToken userToken) at Microsoft.SharePoint.IdentityModel.SPTokenCache.GetSubscriptionIdFromContext(String context)'. 55b8819c-6791-2052-bd23-f1c5b08a996c
    03/28/2014 16:39:26.37 w3wp.exe (0x1FE4) 0x0170 SharePoint Foundation Runtime aep93 High Exception trying get context compatibility level: System.IO.FileNotFoundException: The site http://spserver:80/_vti_bin/PowerPivot/redirector.svc/?DataSource=%2Fsites%2FAndreas%2FShared%2520Documents%2FRapportering%2520Resultaat%2520-%2520BalansV5.xlsx could not be found in the Web application SPWebApplication Name=SharePoint - 80. at Microsoft.SharePoint.SPSite.LookupSiteInfo(SPFarm farm, Boolean contextSite, Boolean swapSchemeForPathBasedSites, Uri& requestUri, Boolean& lookupRequiredContext, Guid& applicationId, Guid& contentDatabaseId, Guid& siteId, Guid& siteSubscriptionId, SPUrlZone& zone, String& serverRelativeUrl, Boolean& hostHeaderIsSiteName, Boolean& appWebRequest, String& appHostHeaderRedirectDomain, String& appSiteDomainPrefix, String& subscriptionName, String& appSit... 55b8819c-6791-2052-bd23-f1c5b08a996c
    03/28/2014 16:39:26.37* w3wp.exe (0x1FE4) 0x0170 SharePoint Foundation Runtime aep93 High ...eDomainId, Uri& primaryUri) at Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.GetContextCompatibilityLevel(Uri requestUri) 55b8819c-6791-2052-bd23-f1c5b08a996c
    03/28/2014 16:39:26.37 w3wp.exe (0x1FE4) 0x0170 SharePoint Foundation Authentication Authorization agb9s Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|myad\adasseville, ClaimsCount=21 55b8819c-6791-2052-bd23-f1c5b08a996c
    03/28/2014 16:39:26.37 w3wp.exe (0x1FE4) 0x0170 PowerPivot Service Request Processing 99 High Unable to retrieve SPUser. SPContext.Current.Web not available 55b8819c-6791-2052-bd23-f1c5b08a996c
    03/28/2014 16:39:26.37 w3wp.exe (0x1FE4) 0x0170 SharePoint Foundation Runtime aep93 High Exception trying get context compatibility level: System.IO.FileNotFoundException: The site http://spserver:80/_vti_bin/PowerPivot/redirector.svc/?DataSource=%2Fsites%2FAndreas%2FShared%2520Documents%2FRapportering%2520Resultaat%2520-%2520BalansV5.xlsx could not be found in the Web application SPWebApplication Name=SharePoint - 80. at Microsoft.SharePoint.SPSite.LookupSiteInfo(SPFarm farm, Boolean contextSite, Boolean swapSchemeForPathBasedSites, Uri& requestUri, Boolean& lookupRequiredContext, Guid& applicationId, Guid& contentDatabaseId, Guid& siteId, Guid& siteSubscriptionId, SPUrlZone& zone, String& serverRelativeUrl, Boolean& hostHeaderIsSiteName, Boolean& appWebRequest, String& appHostHeaderRedirectDomain, String& appSiteDomainPrefix, String& subscriptionName, String& appSit... 55b8819c-6791-2052-bd23-f1c5b08a996c
    03/28/2014 16:39:26.37* w3wp.exe (0x1FE4) 0x0170 SharePoint Foundation Runtime aep93 High ...eDomainId, Uri& primaryUri) at Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.GetContextCompatibilityLevel(Uri requestUri) 55b8819c-6791-2052-bd23-f1c5b08a996c
    03/28/2014 16:39:26.37 w3wp.exe (0x1FE4) 0x0170 SharePoint Foundation Monitoring b4ly High Leaving Monitored Scope (PreSendRequestHeaders). Execution Time=1.4166 55b8819c-6791-2052-bd23-f1c5b08a996c
    03/28/2014 16:39:26.37 w3wp.exe (0x1FE4) 0x0170 SharePoint Foundation Micro Trace uls4 Medium Micro Trace Tags: 0 nasq,1 aep93,5 aip8h,7 aep93,0 agb9s,3 aep93,0 b4ly 55b8819c-6791-2052-bd23-f1c5b08a996c
    03/28/2014 16:39:26.37 w3wp.exe (0x1FE4) 0x0170 SharePoint Foundation Monitoring b4ly Medium Leaving Monitored Scope (Request (POST:http://spserver:80/_vti_bin/PowerPivot/redirector.svc/?DataSource=%2Fsites%2FAndreas%2FShared%2520Documents%2FRapportering%2520Resultaat%2520-%2520BalansV5.xlsx)). Execution Time=19.8324 55b8819c-6791-2052-bd23-f1c5b08a996c
    I tried all suggestions and have no longer a clue what the issue could be :(
    Is there someone who could give me a hint on what to try next?
    Thank you

    Hi Adam,
    Thanks for helping out.
    The web-app is set to Negotiate so that's ok. I've reset the web.config back to Windows, but without luck.
    I did see some strange log entries in the ULS logs:
    Token Cache: Could not find SPSite for 'http://spserver/_vti_bin/PowerPivot/redirector.svc/?DataSource=%2Fsites%2FAndreas%2FShared%2520Documents%2Ftestrapport_13012014.xlsx'. Stack: '   at Microsoft.SharePoint.SPSite.LookupSiteInfo(SPFarm farm, Boolean contextSite, Boolean swapSchemeForPathBasedSites, Uri& requestUri, Boolean& lookupRequiredContext, Guid& applicationId, Guid& contentDatabaseId, Guid& siteId, Guid& siteSubscriptionId, SPUrlZone& zone, String& serverRelativeUrl, Boolean& hostHeaderIsSiteName, Boolean& appWebRequest, String& appHostHeaderRedirectDomain, String& appSiteDomainPrefix, String& subscriptionName, String& appSiteDomainId, Uri& primaryUri)     at Microsoft.SharePoint.SPSite..ctor(SPFarm farm, Uri requestUri, Boolean contextSite, Boolean swapSchemeForPathBasedSites, SPUserToken userToken)     at Microsoft.SharePoint.IdentityModel.SPTokenCache.GetSubscriptionIdFromContext(String context)'.
    You mentioned the claims-to-windows token service. How do i check if it is configured correctly?
    Andreas

  • SharePoint Provider Hosted App (401) Unauthorized Microsoft.SharePoint.SPException: The Azure Access Control service is unavailable

    Hello,
    I'm attempting to get a SharePoint 2013 Provider Hosted Application working in a brand new SharePoint environment.  I've created snapshots of both my dev and the sharepoint environments along the way and have meticulously documented every step of the
    way.  I've followed these instructions (among many other resources found along this journey) :
    http://msdn.microsoft.com/en-us/library/fp179923(office.15).aspx
    http://technet.microsoft.com/en-us/library/fp161236(office.15).aspx
    http://msdn.microsoft.com/library/office/fp179901%28v=office.15%29
    Upon package and publish of my application to SharePoint, I get a 401 Unauthorized error.  I use Fiddler to obtain the SPErrorCorrelationID to ultimately obtain the following ULS Viewer Output.  Please explain how to fix if you're able.
    Please Note:  I was under the impression that a Provider Hosted Application does not use the Azure Access Control service, so I'm confused as to why my system is attempting to make this connection?
    Also Note:  I've used a self signed and godday obtained certificate to successfully f5 debug my basic web.title (out of the visual studio 2012 box) sharepoint provider hosted application... so I know my certs are good.
    Here's my ULS output:
    03/24/2014 08:54:47.83    w3wp.exe (0x1448)    0x22D8    SharePoint Foundation    Logging Correlation Data    xmnv    Medium    Name=Request (GET:http://portal.cltenet.com/_layouts/15/appredirect.aspx?instance_id=22d5252f%2D392c%2D4f68%2Db820%2Da3053b9d4f24)  
     306c809c-66a1-d0d5-d8e2-89d3631ce1bf
    03/24/2014 08:54:47.83    w3wp.exe (0x1448)    0x22D8    SharePoint Foundation    Authentication Authorization    agb9s    Medium    Non-OAuth request.
    IsAuthenticated=True, UserIdentityName=0#.w|cltenet\sp.apps, ClaimsCount=25    306c809c-66a1-d0d5-d8e2-89d3631ce1bf
    03/24/2014 08:54:47.83    w3wp.exe (0x1448)    0x22D8    SharePoint Foundation    Logging Correlation Data    xmnv    Medium    Site=/    306c809c-66a1-d0d5-d8e2-89d3631ce1bf
    03/24/2014 08:54:47.84    w3wp.exe (0x1448)    0x22D8    SharePoint Foundation    App Deployment    acjjg    Medium    The current user has System.Threading.Thread.CurrentPrincipal.Identity.Name
    = 0#.w|cltenet\sp.apps, System.Security.Principal.WindowsIdentity.GetCurrent().Name = NT AUTHORITY\IUSR, System.Web.HttpContext.Current.User.Identity.Name = 0#.w|cltenet\sp.apps.    306c809c-66a1-d0d5-d8e2-89d3631ce1bf
    03/24/2014 08:54:47.84    w3wp.exe (0x1448)    0x22D8    SharePoint Foundation    App Auth    ajsrv    Medium    redirectLaunUrl after getting it from query
    string, web or app instance: https://hightrust31.cltenetapps.com/Pages/Default.aspx?{StandardTokens}    306c809c-66a1-d0d5-d8e2-89d3631ce1bf
    03/24/2014 08:54:47.85    w3wp.exe (0x1448)    0x22D8    SharePoint Foundation    General    aib0n    High    trying to get app tokens for site: 888b71f7-51ee-40f5-8344-8de4869d37d0
    Unable to load app tokens from appInstanceId: 22d5252f-392c-4f68-b820-a3053b9d4f24    306c809c-66a1-d0d5-d8e2-89d3631ce1bf
    03/24/2014 08:54:47.85    w3wp.exe (0x1448)    0x22D8    SharePoint Foundation    App Auth    ajsrw    Medium    redirectLaunUrl after getting token replacement:
    https://hightrust31.cltenetapps.com/Pages/Default.aspx?SPHostUrl=http%3A%2F%2Fportal%2Ecltenet%2Ecom&SPLanguage=en%2DUS&SPClientTag=0&SPProductNumber=15%2E0%2E4420%2E1017    306c809c-66a1-d0d5-d8e2-89d3631ce1bf
    03/24/2014 08:54:47.85    w3wp.exe (0x1448)    0x22D8    SharePoint Foundation    App Auth    ajsry    Medium    m_oauthAppId after NormalizeAppIdentifier()
    i:0i.t|ms.sp.ext|[email protected]8df36d5d.  Now getting app principal info.    306c809c-66a1-d0d5-d8e2-89d3631ce1bf
    03/24/2014 08:54:47.85    w3wp.exe (0x1448)    0x22D8    SharePoint Foundation    App Auth    ajsr0    Medium    decided that we need to do a POST to the
    app.    306c809c-66a1-d0d5-d8e2-89d3631ce1bf
    03/24/2014 08:54:47.85    w3wp.exe (0x1448)    0x22D8    SharePoint Foundation    App Auth    ajsr1    Medium    m_redirectMessage: EndpointAuthorityMatches  
     306c809c-66a1-d0d5-d8e2-89d3631ce1bf
    03/24/2014 08:54:47.85    w3wp.exe (0x1448)    0x22D8    SharePoint Foundation    App Auth    ajsr2    Medium    realm matched attempting to get app token
    using GetAccessToken()    306c809c-66a1-d0d5-d8e2-89d3631ce1bf
    03/24/2014 08:54:47.85    w3wp.exe (0x1448)    0x22D8    SharePoint Foundation    App Auth    advzm    High    Error when get token for app i:0i.t|ms.sp.ext|[email protected]8df36d5d,
    exception: Microsoft.SharePoint.SPException: The Azure Access Control service is unavailable.     at Microsoft.SharePoint.ApplicationServices.SPApplicationContext.GetApplicationSecurityTokenServicesUri(SPServiceContext serviceContext)    
    at Microsoft.SharePoint.ApplicationServices.SPApplicationContext..ctor(SPServiceContext serviceContext, SPIdentityContext userIdentity, OAuth2EndpointIdentity applicationEndPoint)     at Microsoft.SharePoint.SPSecurityContext.SecurityTokenForApplicationContext(SPIdentityContext
    userIdentityContext, String applicationId, Uri applicationRealm, SPApplicationContextAccessTokenType applicationTokenType, SPApplicationDelegationConsentType consentValue)     at Microsoft.SharePoint.SPServerToAppServerAccessTokenManager.GetAccessTokenPrivate(SPServiceContext
    serviceContext, String appId, Uri appEndpointUrl, SPAppPrincipalInfo appPrincipal, SPApplicationContextAccessTokenType tokenType, Boolean useThreadIdentity, SPUserToken userToken)    306c809c-66a1-d0d5-d8e2-89d3631ce1bf
    03/24/2014 08:54:47.85    w3wp.exe (0x1448)    0x22D8    SharePoint Foundation    App Auth    ajsr3    High    App token requested from appredirect.aspx
    for site: 888b71f7-51ee-40f5-8344-8de4869d37d0 but there was an error in generating it.  This may be a case when we do not need a token or when the app principal was not properly set up.  LaunchUrl:https://hightrust31.cltenetapps.com/Pages/Default.aspx?SPHostUrl=http://portal.cltenet.com&SPLanguage=en-US&SPClientTag=0&SPProductNumber=15.0.4420.1017
    Exception Message:The Azure Access Control service is unavailable.  Stacktrace:    at Microsoft.SharePoint.ApplicationServices.SPApplicationContext.GetApplicationSecurityTokenServicesUri(SPServiceContext serviceContext)    
    at Microsoft.SharePoint.ApplicationServices.SPApplicationContext..ctor(SPServiceContext serviceContext, SPIdentityContext userIdentity, OAuth2EndpointIdentity applicationEndPoint)     at Microsoft.SharePoint.SPSecurityContext.SecurityTokenForApplicationContext(SPIdentityContext
    userIdentityContext, String applicationId, Uri applicationRealm, SPApplicationContextAccessTokenType applicationTokenType, SPApplicationDelegationConsentType consentValue)     at Microsoft.SharePoint.SPServerToAppServerAccessTokenManager.GetAccessTokenPrivate(SPServiceContext
    serviceContext, String appId, Uri appEndpointUrl, SPAppPrincipalInfo appPrincipal, SPApplicationContextAccessTokenType tokenType, Boolean useThreadIdentity, SPUserToken userToken)     at Microsoft.SharePoint.SPServerToAppServerAccessTokenManager.GetAccessTokenFromThreadIdentityOrUserToken(SPServiceContext
    serviceContext, String appId, Uri appEndpointUrl, SPApplicationContextAccessTokenType tokenType, SPAppPrincipalInfo appPrincipal, Boolean useThreadIdentity, SPUserToken userToken)     at Microsoft.SharePoint.ApplicationPages.AppRedirectPage.ValidateAndProcessRequest(). 
    Since this is a nonfatal error, it will be sanitized and posted to the app as part of the app launch.    306c809c-66a1-d0d5-d8e2-89d3631ce1bf
    03/24/2014 08:54:47.85    w3wp.exe (0x1448)    0x22D8    SharePoint Foundation    General    ajlz0    High    Getting Error Message for Exception Microsoft.SharePoint.SPException:
    The Azure Access Control service is unavailable.     at Microsoft.SharePoint.ApplicationServices.SPApplicationContext.GetApplicationSecurityTokenServicesUri(SPServiceContext serviceContext)     at Microsoft.SharePoint.ApplicationServices.SPApplicationContext..ctor(SPServiceContext
    serviceContext, SPIdentityContext userIdentity, OAuth2EndpointIdentity applicationEndPoint)     at Microsoft.SharePoint.SPSecurityContext.SecurityTokenForApplicationContext(SPIdentityContext userIdentityContext, String applicationId, Uri
    applicationRealm, SPApplicationContextAccessTokenType applicationTokenType, SPApplicationDelegationConsentType consentValue)     at Microsoft.SharePoint.SPServerToAppServerAccessTokenManager.GetAccessTokenPrivate(SPServiceContext serviceContext,
    String appId, Uri appEndpointUrl, SPAppPrincipalInfo appPrincipal, SPApplicationContextAccessTokenType tokenType, Boolean useThreadIdentity, SPUserToken userToken)     at Microsoft.SharePoint.SPServerToAppServerAccessTokenManager.GetAccessTokenFromThreadIdentityOrUserToken(SPServiceContext
    serviceContext, String appId, Uri appEndpointUrl, SPApplicationContextAccessTokenType tokenType, SPAppPrincipalInfo appPrincipal, Boolean useThreadIdentity, SPUserToken userToken)     at Microsoft.SharePoint.ApplicationPages.AppRedirectPage.ValidateAndProcessRequest()  
     306c809c-66a1-d0d5-d8e2-89d3631ce1bf
    03/24/2014 08:54:47.85    w3wp.exe (0x1448)    0x22D8    SharePoint Foundation    App Auth    aib0p    Medium    Doing appredirect from appredirect.aspx:
    in site: 888b71f7-51ee-40f5-8344-8de4869d37d0 with RedirectLaunchUrl: https://hightrust31.cltenetapps.com/Pages/Default.aspx?SPHostUrl=http%3A%2F%2Fportal%2Ecltenet%2Ecom&SPLanguage=en%2DUS&SPClientTag=0&SPProductNumber=15%2E0%2E4420%2E1017  
     306c809c-66a1-d0d5-d8e2-89d3631ce1bf
    03/24/2014 08:54:47.85    w3wp.exe (0x1448)    0x22D8    SharePoint Foundation    Monitoring    b4ly    Medium    Leaving Monitored Scope (Request (GET:http://portal.cltenet.com/_layouts/15/appredirect.aspx?instance_id=22d5252f%2D392c%2D4f68%2Db820%2Da3053b9d4f24)).
    Execution Time=26.5933938531294    306c809c-66a1-d0d5-d8e2-89d3631ce1bf
    Your help is very much appreciated.
    With Respect,
    Larry

    Yes, actually - I was able to resolve it.
    However I don't know how, unfortunately.  I suspect it was because I needed to have the names of the certificates, defined during the certificate registration (to sharepoint) process, different.
    I have a complete document that shows step by step instructions on the exact process I took to complete the provider hosted application creation, deployment and publishing.  It was a daunting task, but I finished it successfully.
    If there's a way to send private message on this forum, please do so and I'll respond with a way to obtain my document.
    NOTE:  I'm not all impressed with the way this forum works.  This is supposed to be a Microsoft resource and I'll be damned if I ever get a response to highly technical questions.  Completely lame.  Boooooo Microsoft.

  • 401 Authentication in Apex 4.0

    Hi,
    Is it possible to use 401 Authentication in Apex 4.0 and if yes then how to use ?
    Thanks,
    Vaibhav

    Is it possible to use 401 Authentication in Apex 4.0 and if yes then how to use ?Yes, using DAD Credentials Verification as the authentication scheme, where each user has an account in the database.
    (Please update your forum profile with a real handle instead of "user10600404".)

  • SSRS report with PowerPivot datasource - 401 Unauthorized

    Hello together,
    I have a tricky issue and hope that you can help me:
    Problem: I want to build a Reporting Services Report with a PowerPivot datasource with Report Builder 3.0. When I try to access the datasource via Report Builder I get the error: The remote server returned an error: 401 - Unauthorized.
    The PowerPivot file lies on a Sharepoint 2013 with Kerberos authentification.
    Logs: Here are some sample log entries after getting the error:
    Token Cache: Could not find SPSite for 'sharepoint.com/_vti_bin/PowerPivot/secureredirector.svc/?DataSource=sample.xlsx'.
    Exception trying get context compatibility level: System.IO.FileNotFoundException: The site sharepoint.com/_vti_bin/PowerPivot/secureredirector.svc/?DataSource=sample.xlsx could not be found in the Web application SPWebApplication Name=sharepoint.com. 
    Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user, ClaimsCount=118
    Notes: I tried some solutions from the internet, where the web.config from PowerPivot has to be changed. Also I saw that it could be Kerberos related, but no detailed information where to start as the other features are working fine. SPNs
    and Delegations are configured. And changing to NTLM is not an option as this is a multi-server platform. 
    I hope that you have another idea, where the problem could be.
    Kind regards, 
    Robin

    Has noone an idea?

  • SSRS web services 401 if you pass "Authorization" http header

    We use both SSRS 2008 R2 and 2012. When i access a report using url access (direct ssrs server hit) and add a "Authorization: Bearer xyzelkalklsjsdfalsjdf" http header, i get a 401 from somewhere in the request pipeline. I have a custom httpmodule
    registered at the top of the chain which does some OAuth related security checks. But when this header is included, the request never reaches the httpmodule. If i change the header slightly ex: "YAuthorization: ljlxzcvc..", then the request reaches
    the httpmodule and everything works. So obviously SSRS is looking for a particular header named "Authorization" and does something with it. Point to note: we have implemented a custom forms authentication module and we are doing some rich authorization
    using the extensible ssrs api. 
    Now my questions are:
    1. What is happening here? Who is acting on my request before my HttpModule registered on top in ssrs\reporting service\web.config gets it?
    2. How do i ensure my httpmodule executes before whatever component is terminating my request with a 401

    Sorry if this sounds like I am new to this but I am.
    So, the extended version is the format that would be used if you were not utilizing the files that the wsdl2java function creates?
    And this is done to when you want more flexibiility for the user to call your service?
    So, you would push to have the stub files used when you want to control how the web service is used?
    thanks for the feedback.

  • Hi i have an ipad mini and i have not used it for 2 month or more. Today i have tried to use it i came across with a problem. my Ipad is blocked and it asks me to wait 23,401,418 :) what should i do need your help. thanks

    hi i have an ipad mini and i have not used it for 2 month or more. Today i have tried to use it i came across with a problem. my Ipad is blocked and it asks me to wait 23,401,418 what should i do need your help. thanks 

    Have you charged ipad Try a Reboot press & hold power button & menu button hold both down until you see Apple Logo You may need to do this more than once. Bsydd uk

  • Provider-hosted Apps debug error: The remote server returned an error: (401) unauthorised

    Hi,
    Any help appreciated!!
    I'm getting this error: "The remote server returned an error: (401) unauthorised when I debug a provider-hosted app.  I get the error on this line:  
    HttpWebResponse response = (HttpWebResponse)request.GetResponse();
    See code below
    I created a high trust development environment following the instructions provided here:
    http://msdn.microsoft.com/en-us/library/office/fp179901(v=office.15).aspx and
    http://msdn.microsoft.com/library/office/fp179923
    I created a provider-hosted app with the intent to:
    create a SharePoint list in the appweb
    Use self-signed certificate, tokenhepler.cs and sharepointcontext.cs to retrieve current user context and access on SharePoint.  (No changes were made to tokenhelper.cs and sharepointcontext.cs)
    retrieve list items from the SharePoint list in a button click event handler on a default.aspx of the remote web
    What happens:
    The app is deployed successfully to the Dev site
    The SharePoint feature is deployed and activated
    The default.aspx page of the remote web loads
    The error (see image) is returned on clicking of the button
    My environment is an on-premise SharePoint 2013 with AD and my dev box is standalone windows 8.1 running Visual Studio Professional 2013 Update 3.
    The code block below is a copy of the default.aspx code-behind
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using Microsoft.SharePoint.Client;
    using Microsoft.IdentityModel.S2S.Tokens;
    using System.Net;
    using System.IO;
    using System.Xml;
    using System.Data;
    using System.Xml.Linq;
    using System.Xml.XPath;
    namespace Idea.GeneratorWeb
    public partial class Default : System.Web.UI.Page
    SharePointContextToken contextToken;
    string accessToken;
    Uri sharepointUrl;
    protected void Page_PreInit(object sender, EventArgs e)
    Uri redirectUrl;
    switch (SharePointContextProvider.CheckRedirectionStatus(Context, out redirectUrl))
    case RedirectionStatus.Ok:
    return;
    case RedirectionStatus.ShouldRedirect:
    Response.Redirect(redirectUrl.AbsoluteUri, endResponse: true);
    break;
    case RedirectionStatus.CanNotRedirect:
    Response.Write("An error occurred while processing your request.");
    Response.End();
    break;
    protected void Page_Load(object sender, EventArgs e)
    //// The following code gets the client context and Title property by using TokenHelper.
    //// To access other properties, the app may need to request permissions on the host web.
    var spContext = SharePointContextProvider.Current.GetSharePointContext(Context);
    //var spContext = new ClientContext("MySPDevInstance");
    //spContext.Credentials = new NetworkCredential("username", "password");
    //using (var clientContext = spContext.CreateUserClientContextForSPHost())
    // clientContext.Load(clientContext.Web, web => web.Title);
    // clientContext.ExecuteQuery();
    // Response.Write(clientContext.Web.Title);
    string contextTokenString = TokenHelper.GetContextTokenFromRequest(Request);
    if (contextTokenString != null)
    // Get context token
    contextToken = TokenHelper.ReadAndValidateContextToken(contextTokenString, Request.Url.Authority);
    // Get access token
    sharepointUrl = new Uri(Request.QueryString["SPAppWebUrl"]);
    accessToken = TokenHelper.GetAccessToken(contextToken, sharepointUrl.Authority).AccessToken;
    // Pass the access token to the button event handler.
    Button1.CommandArgument = accessToken;
    protected void Button1_Click(object sender, EventArgs e)
    // Retrieve the access token that the Page_Load method stored
    // in the button's command argument.
    string accessToken = ((Button)sender).CommandArgument;
    if (IsPostBack)
    sharepointUrl = new Uri(Request.QueryString["SPAppWebUrl"]);
    // REST/OData URL section
    string oDataUrl = "/_api/Web/lists/getbytitle('Diagrams In Idea Generator')/items?$select=Title,Diagram,SharingStatus";
    // HTTP Request and Response construction section
    HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(sharepointUrl.ToString() + oDataUrl);
    request.Method = "GET";
    request.Accept = "application/atom+xml";
    request.ContentType = "application/atom+xml;type=entry";
    request.Headers.Add("Authorization", "Bearer " + accessToken);
    HttpWebResponse response = (HttpWebResponse)request.GetResponse();
    // Response markup parsing section
    XDocument oDataXML = XDocument.Load(response.GetResponseStream(), LoadOptions.None);
    XNamespace atom = "http://www.w3.org/2005/Atom";
    XNamespace d = "http://schemas.microsoft.com/ado/2007/08/dataservices";
    XNamespace m = "http://schemas.microsoft.com/ado/2007/08/dataservices/metadata";
    List<XElement> entries = oDataXML.Descendants(atom + "entry")
    .Elements(atom + "content")
    .Elements(m + "properties")
    .ToList();
    var entryFieldValues = from entry in entries
    select new
    Character = entry.Element(d + "Title").Value,
    Actor = entry.Element(d + "Diagram").Value,
    CastingStatus = entry.Element(d + "SharingStatus").Value
    GridView1.DataSource = entryFieldValues;
    GridView1.DataBind();
    Any ideas what I might be doing wrong

    Hi ,
    Use the below code
    Public string GetAccessToken(){
    string sharePointSiteUrlHost =  Page.Request["SPHostUrl"].Tostring();
    string AccessToken = tokenHelper.GetS2SAccessTokenWithWindowsIdentity(sharePointSiteUrlHost, Request.LogonUserIdentity);
    return accessToken;
    Than initialize the ClientCOntext with the below Method
     private static ClientContext GetClientContextWithAccessTokenString(string targetUrl, object accessToken)
                ClientContext clientContext = new ClientContext(targetUrl);
                clientContext.AuthenticationMode = ClientAuthenticationMode.Anonymous;
                clientContext.FormDigestHandlingEnabled = false;
                clientContext.ExecutingWebRequest +=
                    delegate(object oSender, WebRequestEventArgs webRequestEventArgs)
                        webRequestEventArgs.WebRequestExecutor.WebRequest.UserAgent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)";
                        webRequestEventArgs.WebRequestExecutor.RequestHeaders["Authorization"] =
                            "Bearer " + accessToken;
                return clientContext;
    use this clientCOntext and it will work.
    Do not use
    SharePointContextProvider
    Whenever you see a reply and if you think is helpful,Vote As Helpful! And whenever you see a reply being an answer to the question of the thread, click Mark As Answer

Maybe you are looking for

  • Time Capsule extremely slow recover

    Hi and tnxs for reading. Since my iPhoto Library has been corrupted, I am trying to test some old versions/backup by restoring them from my Time Capsule (2TB last version on the Apple Store), but unfortunately the process is extremely slow. My iPhoto

  • How can I fix this hijack?

    Here's my problem, and I browsed through the forums to find a solution, but none have the particular problem I'm having. Yesterday, I downloaded the updated (current) FireFox, updated my addons, and added new addons. Night falls, I shut my computer o

  • Realtek AC97 Audio Drivers Not Working!

    Hi. I recently had a HD crash and I was forced to format it. I installed everything just as the first time, and everything worked fine except the audio drivers. The problem is, it does actually install the drivers, but when I look at Sound Options or

  • RMI Start need some help !

    Hi All, I have just started to learn RMI by following a simple tutorial which have one Interface "Hello" , a "Server" class, and a "Client" class... I have test it on windows XP, Now i want to test it with different scenerio which is Server is = linu

  • Spec2000/SC tab

    Hello, I need to gray out all fields in SPEC2000/SC tab in the Purchase order. Is it possible to gray out following fields. -Mod.ID.CD -Order priority -Aircraftreg no Didn't find any field in the PO screen layout configuration. Thanks for your kind a