.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Client Object Model - Anonymous Access (Access Denied)

Posted By:      Posted Date: September 30, 2010    Points: 0   Category :SharePoint
I am trying to get a silverlight application which uses the client object model to work with anonymous access.  I have found the following msdn article.
however on the beta there does not appear to be any authenticationmode method to use.

Does anyone know if they have removed this from the beta dll?  or does anyone have any idea how you can get the client object model to work over anonymous access.



View Complete Post

More Related Resource Links

Create List Sharepoint Client Object Model Access Denied



I am trying to create a silverlight application by making use of the SharePoint 2010 Client Object Model using the following code:

private void CreateList(object sender, ClientRequestFailedEventArgs e)
  ClientContext ctx = new ClientContext("http://server");
  ListCreationInformation lc = new ListCreationInformation();
  lc.Title = "FlexiTime";
  lc.Description = "";
  lc.TemplateType = (int)ListTemplateType.GenericList;
  List newList = ctx.Web.Lists.Add(lc);
  System.Threading.ThreadPool.QueueUserWorkItem(new WaitCallback(CreateListCallback), ctx);

private void CreateListCallback(object s)
  var context = (ClientContext)s;  

The error I receive is as follows:


Exception when access to sharepoint by Client Object Model


Hello ,

  - I have a windows Application .

  - In the  Form  load , I write the following code to aceess sharepoint site :

      ClientContext clientContext = new ClientContext("URL");

     Web site = clientContext.Web;



    MessageBox.Show("Title: {0}", site.Title);

  The following exception happened when execute query :

         "The re

Access denied while uploading documents using sharepoint object model



I have one document library , with item updating, item updated event receivers. we have created a custom form for document uploading and updating its properties using SP object model.  

while uploading the document using my form, it is fine for administator. And for other users, it shows Access denied,and the document got uploaded , but the properties are not updating.

Please guide me. Thanks in advance.

How to access querystring in Client Object model [silverlight webpart]


can we access querystring in Client Object model [silverlight webpart]?


Sharepoint site client access denied


I have an sharepoint application which was working fine.

I encountered a license expired message in sql server enterprise evaluation 2008 version after which i changed the date to 2 months earlier date, I have also changed HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\100\ConfigurationState to 3 after which sql server started working but the issue is that the clients are unable to access the sharepoint site completely. On providing the url the web site requests for logon information and then access is denied. The same url with the same authentication credentials is accessible from the server and the entire application works fine from the server. 

From the  client the below error page appears.

You are not authorized to view this page

You do not have permission to view this directory or page using the credentials that you supplied.

Please try the following:

  • Contact the Web site administrator if you believe you should be able to view this directory or page.
  • Click the Refresh button to try again with different credentials.

HTTP Error 401.1 - Unauthorized: Access is denied due to invalid credentials.
Internet Information Services (IIS)


Object Cache set with Portal Super User accounts. Access denied to site.

I have the same issue on multiple farms. In this example i'll outline this problem for a three tier farm. SharePoint web server SharePoint Application server (hosts central admin) Sql server After installation and configuration i have created two web applications (claims based auth with NTLM). https://portal.contoso.com https://mysite.contoso.com The client connects on the URLs to the web server (1st tier). All is working correctly and they can access the portal and their mysite. The log file keeps reporting that i need to configure the user accounts for the Object Chache. So, i looked up the required steps and executed these conform mcrosoft guidelines (http://technet.microsoft.com/en-us/library/ff758656.aspx) All the steps run seccesfully. But when i connect to the URL i now get an access denied (even with the administrator who is site collection administrator) In the log file i get the following to lines when i connect to the site. Unknown SPRequest error occurred. More information: 0x80070002 Unknown SPRequest error occurred. More information: 0x80070005 I have exact the same issue on two other farms. Marc

Getting Access Denied when trying to work with PrintQueue object


I have client app that I am working on that is supposed to be able to manage print queues, such as resuming print jobs or purging jobs that have hung up.  The problem I am running in to is that I need to open the queue with appropriate rights to do that management.

I am using the line  below to create the queue.

pq = new PrintQueue(ps, printQueue, PrintSystemDesiredAccess.AdministratePrinter);

However, this line returns an access denied.  I am an admin on the local box, so I can't image why I am having this issue.

If I open the queue like this:

pq = new PrintQueue(ps, printQueue);

The open works find, but when I try to access the jobs in that queue, I get the access denied message.

Any idea what I am doing wrong here?  Any help would be greatly appreciated.


Joel WZ

Access denied for anonymous users on list webparts



I have problem with list webparts on Sharepoint foundation web site with anonymous access allowed.

Here is the configuration:

1. Sharepoint Foundation on win 2008 r2 server in standalone mode.

2. Anonymous access is allowed on the web site

3. All permissions are inherited from the top level site (anonymous users have reading allowed)

4. I've created custom xsl templates for rendering list content. They are all stored in Site Assets Library

5. I've added standard OOB list webparts to my webpart pages and linked those webparts to my custom xsl files.

6. everything works fine

7. But when I do an iisreset and try to reach my webpart page as anonymous user I get: "access denied. you do not have permission to perform this action or access this resource." error

8. When authenticated user visits problematic page everything is fine for anonymous user too. (Visiting page as authenticated user is enough)

9. While I'm receiving an error, when I try to access xsl file it shows up in a browser so the xsl file itself is accessible.

Anyone has an idea? There is no custom code here or some references it is just plain old list web part with xsl file.

It looks like cache problem but I'm not sure

Drasko Popovic

Access to report file denied. Another program may be using it.


Migrated from Windows 2000 ASP.NET 1.1 to Windows 2003, ASP.NET 2.0 and had this error. All the forums/MSDN/Blogs says to give Read/Write Access to C:\Windows\Temp folder. Why should we give Full Access to some folder in Production server?? In windows 2000, ASP.NET 2.0 development machine, no files are created when we run crystal reports from aspx pages. Then why in Windows 2003 servers, we need to give rights to temp folder?? It is a simple code


And the code is not storing anything on the disk. Then why should it store the GUID.rpt file in Temp file in Windows 2003 server?? Any alternative is there not to store anything on the disk when Crystal Reports are opened in aspx page??


Return of the Rich Client: Code Access Security and Distribution Features in .NET Enhance Client-Sid


Rich clients employ many of the features and conveniences of the operating system they run on, and the list of these features has been growing since the dawn of the PC. But as apps have migrated to the Web, the trend towards increasing client-side functionality has ground to a virtual halt. There are several reasons for this; chief among them are security and deployment problems. But that's all about to change. With the .NET Framework, you can participate in building the distributable rich client of the future. In this article, the author enumerates the pertinent features of .NET that will allow you to build safe, easily deployable controls. The features discussed include managed code, code access security, versioning control, Windows Forms classes, and isolation.

Jason Clark

MSDN Magazine June 2002

SQL and Outlook: Enable Database Access and Updates Through Exchange and Any E-mail Client


Using Microsoft technologies, you can insert, edit, query, and delete database entries using any e-mail client such as Hotmail, Outlook, Yahoo, or even WAP phone. While e-mail is certainly a powerful and widely used tool, it is usually not integrated with an application for performing any tasks other than sending reminders. The application scenario described here, an e-mail-based SQL update program, uses a simple data model; however, this solution will apply to any data model that you are working with. It will also eliminate the need for complex n-tier Internet applications and serves as a low maintenance solution for providing data access.

Alok Mehta and Daniel Williams

MSDN Magazine January 2002

A Young Person's Guide to The Simple Object Access Protocol: SOAP Increases Interoperability Across


The Simple Object Access Protocol (SOAP) facilitates interoperability among a wide range of programs and platforms, making existing applications accessible to a broader range of users. SOAP combines the proven Web technology of HTTP with the flexibility and extensibility of XML. This article takes you on a comprehensive tour of Object RPC technology to help you understand the foundations of SOAP and the ways it overcomes many of the limitations of existing technologies, including DCOM and CORBA. This is followed by a detailed treatment of the SOAP encoding rules with a focus on how SOAP maps onto existing ORPC concepts.

Don Box

MSDN Magazine March 2000

Usage of Client Access Policy and crossdomain xml for sharepoint 2010>?


Hi Folks,

1.What is Clientaccesspolicy.xml in sharepoint ?

2.What is Crossdomain.xml ?

What is usage of wcf service deploy in sharepoint 2010?

Kindly give me some valuable comments ?


Thank you


Immanuel c


"Access is denied. Check that the Default Content Access Account has access to this content"


Our search is not working. The crawl log indicates following error: "Access is denied. Check that the Default Content Access Account has access to this content, or add a crawl rule to crawl this content. (The item was deleted because it was either not found or the crawler was denied access to it.)".


If I check the event viewer, it indicates following error: "Login failed for user 'NT AUTHORITY\NETWORK SERVICE'. [CLIENT: <local machine>]"


My default content access account is another one than this NT AUTHORITY\NETWORK SERVICE account. The content access account password is correct. Apparently this content access account is translated to the NETWORK SERVICE account upon a crawl. And this network service account doesn't has the appropriate rights on database level. How can I fix this?


Access Denied with SPControlMode.New and RunWithElevatedPriviliges


I am trying to add MultipleLookupField to a webpart I am developing. It works fine as long as the user has Add permission on the list it points to: here is the code:

private MultipleLookupField _multiplelookupKeywords = new MultipleLookupField();
protected override void CreateChildControls()
Guid guidSite = SPContext.Current.Site.ID;
Guid guidWeb = SPContext.Current.Web.ID;
    using (SPSite site = new SPSite(guidSite))
        using (SPWeb web = site.OpenWeb(guidWeb))
  SPList listTest;   
  listTest = web.Lists[ListName]; 
  _multiplelookupKeywords.ListId = listTest.ID;
                _multiplelookupKeywords.ControlMode = SPControlMode.New; //Changing this to SPControlMode.Display works fine
                _multiplelookupKeywords.RenderContext = SPContext.GetContext(web);

How to access the refrenced table fields in Ilist object of table MVC asp.net



I have 2 tables, master, detail. 1.master table have fields (id, username, plan)-->id is primary key (PK) 2. detail table have fields (srNo,id, worksummary, ... )--> srNo is PK.

I have created foreign key relationship from detail to .master table for "id" field.

the code is:

IList<detail> objDetail=new List<detail> (); 
IList<master> objMaster = new List<master> ();
string[] sarray = queryFields.Split('|');//

for (int i = 0; i < sarray.Length; i++)
string[] sfields = sarray[i].Split(',');

if (sfields[0] != "")

objDetail.Add(new _detail { Id = count , modify = sfields[1].ToString(), verified = sfields[2], I});


I have problem to add fields in "objDetail" using Add method. But I am unable to access the reference field "Id" , rest of the field of detail table can be accessed using objDetail.

How can I access the "Id" field from objDetail object to add in IList.

I want to solve this problem

Asp.Net upload file access denied



I have the problem below, if anyone can help me, appreciate it.

Server Error in '/' Application.

Access to the path 'c:\Inetpub\EnewsAttFiles\employ-e-header2.jpg' is denied.

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.UnauthorizedAccessException: Access to the path 'c:\Inetpub\EnewsAttFiles\employ-e-header2.jpg' is denied.

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Hig
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend