Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

Server was unable to process request. ---> Access is denied

$
0
0

Hi,


I'm just getting started with SharePoint online(office365) and trying to connect to the WebServices using a C#.NET in an ASP.NET website. I think I've set up the user correctly (is an administrator and owner) but I'm getting an access error when I connect.

The code and full error is below.

 

The code is copied (more or less) from the file SharePoint Online Standard Developer Guide Dec 2008.doc which I downloaded from the Microsoft site.

 

Am I missing something obvious? All seems to work up to the point of authorisation.

protected void Page_Load(object sender, EventArgs e)
    {
        com.sharepoint.nws558.SiteData  site = new com.sharepoint.nws558.SiteData();
       
        System.Net.NetworkCredential myCredential = new System.Net.NetworkCredential();
        myCredential.UserName = "nws2013@nws558.onmicrosoft.com";
        myCredential.Password = "Wecando1801";

        site.Credentials = myCredential;

        com.sharepoint.nws558._sList[] lists;
        site.GetListCollection(out lists);
        
        //SiteData_sList[] lists;
        //site.GetListCollection(out lists);
        foreach (com.sharepoint.nws558._sList list in lists)
        {
            listdisp.InnerHtml += list.Title.ToString() + "<br/>";
        }

    }

Server was unable to process request. ---> Access is denied.
(Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

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.Web.Services.Protocols.SoapException: Server was unable to process
request. ---> Access is denied. (Exception from HRESULT: 0x80070005
(E_ACCESSDENIED))


Server Error in '/' Application.

Server was unable to process request. ---> Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

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.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

Source Error:
Line 487:        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://schemas.microsoft.com/sharepoint/soap/GetListCollection", RequestNamespace="http://schemas.microsoft.com/sharepoint/soap/", ResponseNamespace="http://schemas.microsoft.com/sharepoint/soap/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
Line 488:        public uint GetListCollection([System.Xml.Serialization.XmlArrayItemAttribute(IsNullable=false)] out _sList[] vLists) {Line 489:            object[] results = this.Invoke("GetListCollection", new object[0]);Line 490:            vLists = ((_sList[])(results[1]));
Line 491:            return ((uint)(results[0]));

Source File: c:\Users\NWS21\AppData\Local\Temp\Temporary ASP.NET Files\root\da6488ad\32c18de2\App_WebReferences.-xmwjq7r.0.cs   Line:489

Stack Trace:

[SoapException: Server was unable to process request. ---> Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))] System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +507386 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +215 com.sharepoint.nws558.SiteData.GetListCollection(_sList[]& vLists) in c:\Users\NWS21\AppData\Local\Temp\Temporary ASP.NET Files\root\da6488ad\32c18de2\App_WebReferences.-xmwjq7r.0.cs:489 _Default.Page_Load(Object sender, EventArgs e) in c:\Users\NWS21\Documents\Visual Studio 2012\WebSites\WebSite1\Default.aspx.cs:23 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51 System.Web.UI.Control.OnLoad(EventArgs e) +92 System.Web.UI.Control.LoadRecursive() +54 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772



please help me i am unable to find out this  error.

atleast tell me what this error,where is this error please tell me i cant findout the error ,error is on authenticationproblem or wht

please anybody tell me this,its urgent for me,sorry to saying like this i am working on this since 2 weeks i didnt get any solution for me.

Thanking you in Advance

Mahesh








Viewing all articles
Browse latest Browse all 25064

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>