The remote server returned an error: (401) Unauthorized

9 posts, 1 answers
  1. towpse
    towpse avatar
    224 posts
    Member since:
    Mar 2008

    Posted 17 Nov 2009 Link to this post

    Might anyone be able to suggest why I am geting this error when I host my web application in IIS?
    If I use the Visual Studio Dev server, the page loads with a scheduler.
    All I do is create a virtual directory for my app in IIS and I get the following error...

    Any hep would be greatly appreciated. Thanks.

    The remote server returned an error: (401) Unauthorized.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Net.WebException: The remote server returned an error: (401) Unauthorized.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [WebException: The remote server returned an error: (401) Unauthorized.]
       System.Net.WebClient.UploadDataInternal(Uri address, String method, Byte[] data, WebRequest& request) +302
       System.Net.WebClient.UploadString(Uri address, String method, String data) +170
       System.Net.WebClient.UploadString(String address, String method, String data) +35
       Telerik.Web.UI.SchedulerWebServiceClient.GetResources() +460
    
    [Exception: An error occurred while requesting resources from the web service. Server responded with: {"Message":"Authentication failed.","StackTrace":null,"ExceptionType":"System.InvalidOperationException"}]
       Telerik.Web.UI.SchedulerWebServiceClient.GetResources() +622
       Telerik.Web.UI.RadScheduler.BindResourcesFromWebService() +95
       Telerik.Web.UI.RadScheduler.PerformSelect() +122
       System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
       Telerik.Web.UI.RadScheduler.EnsureDataBound() +51
       Telerik.Web.UI.RadScheduler.CreateChildControls(Boolean bindFromDataSource) +63
       Telerik.Web.UI.RadScheduler.CreateChildControls() +10
       System.Web.UI.Control.EnsureChildControls() +87
       System.Web.UI.Control.PreRenderRecursiveInternal() +44
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842
    


            <telerik:RadScheduler    ID="RadScheduler1"   
                                                runat="server"   
                                                Height=""   
                                                HoursPanelTimeFormat="htt"   
                                                ValidationGroup="RadScheduler1"   
                                                StartEditingInAdvancedForm="false"   
                                                Skin="Office2007">  
                <WebServiceSettings Path="SchedulerWebService.asmx" ResourcePopulationMode="ServerSide" /> 
            </telerik:RadScheduler> 

  2. Answer
    Mike Taylor
    Mike Taylor avatar
    27 posts
    Member since:
    Sep 2009
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. towpse
    towpse avatar
    224 posts
    Member since:
    Mar 2008

    Posted 19 Nov 2009 Link to this post

    perfect. somehow didn't stumble on that article.

    thanks!
  5. towpse
    towpse avatar
    224 posts
    Member since:
    Mar 2008

    Posted 19 Nov 2009 Link to this post

    seems to be the answer but i'm running into that issue once again.

    is there anything else to investigate or debug?
  6. Landon
    Landon avatar
    11 posts
    Member since:
    Dec 2010

    Posted 15 May 2012 Link to this post

    Did anyone ever get an answer for this? The initial response, marked as "answer", worked for a while, but now has stopped working, and I'm desperate! Any thoughts?
  7. Landon
    Landon avatar
    11 posts
    Member since:
    Dec 2010

    Posted 30 Aug 2012 Link to this post

    Hello, is anybody out there? The fix listed is STILL not working for me! Does anyone have any idea how to fix it??
  8. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 04 Sep 2012 Link to this post

    Hi,

    You can check for the steps explained in the following ASP.NET forum:
    http://forums.asp.net/t/1165237.aspx/1.

    Greetings,
    Ivana
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  9. Nelson
    Nelson avatar
    12 posts
    Member since:
    Nov 2010

    Posted 09 Nov 2012 Link to this post

    I am also running into issues with web service binding and 401 Unauthorized errors when using ServerSide Resource Population.

    My current development environment is set up to use a local instance of full IIS on my Windows 7 machine (not IIS Express). I have enabled at the site root both anonymous access configured with IUSR as well as Windows Authentication to enable debugging. We do use cookies for authentication but do not integrate with ASP.NET authentication and failure to authenticate in code does not return a 401, but rather a redirect to another page. Based on this, I'm sure the issue is not our websites cookiebased authentication but rather having enabled Windows Authentication and somehow it fails as this will definitely cause a 401.

    Any advice on how I may pass through my current credentials?
  10. Plamen
    Admin
    Plamen avatar
    2729 posts

    Posted 14 Nov 2012 Link to this post

    Hi Nelson,

     
    We are not aware and have not been reported of another known settings that may be causing such error out of the box so it may be caused by some custom setting. If you are still observing the issue please if you find out more information  about it.

    Regards,
    Plamen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017