.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

Anonymous Web Site receives "The request failed with HTTP status 401: Unauthorized"

Posted By:      Posted Date: August 26, 2010    Points: 0   Category :SharePoint

I set up a test website on my local box and was able to access sharepoint search using the querySearch web service from SP.  After I got it all working properly I transferred the code to the target website that is set up with anonymous access for all people on the fab floor.  However from this website I keep getting the 401 error.  It can't be SP because the same code worked from my local website "localhost".  Any suggestions?  we don't want to have to have the fab people log in so we can't not have the box anonymous.  I would appreciate any suggestions very much!!!

Using WSS 2007 with MOSS.


  private void GetDefaultCredentials()
      m_where = "get configuration data for credentials";
      string userid = ConfigurationManager.AppSettings[ "userid" ];
      string password = ConfigurationManager.AppSettings[ "password" ];
      string domain = ConfigurationManager.AppSettings[ "domain" ];

      m_where = "set search query credentials";
      m_query.Credentials = new NetworkCredential ( userid, password

View Complete Post

More Related Resource Links

Sharepoint 2010-Site Anonymous access

i have enabled Anonymous access for my site , and also turned the option 'Entire Site' under Anonymous Access but still i am prompted for the authentication when i try to access the Site. is there any solution for this .....???

How to add List item in search results for anonymous in a publishing site?

Hi all,   For now, results in Library (document set or not) are shown and the link is the binary file. This is ok. But for list, anonymous users can't view results. As logged in I see the items in the AllItems.aspx page. How could I allow this result to be viewed by anonymous users too?      Thank you,   Benoit Pironet

SharePoint 2010 Claims Based Authentication - anonymous site is prompting for CBA auth when opening

Hi, I have CBA setup successfully on my sites.  One site is setup for anonymous access and I have disabled "client integration" on that web application. I have a list of MS Office documents on a wiki.  When I click on one I am asked to either save or open or cancel.  Saving works fine but when I choose open, it launches the associated MS Office app.  I am then prompted for a login from CBA.  I can click cancel and the logon screen appears again.  After clicking cancel the 2nd time the document appears in the MS Office app, Word in this case. My question is how do I prevent my users from being prompted for a CBA login when clicking on these files and opening them in the native app on their machine?      --TR

User keeps losing Session on Anonymous site?


This code was working before, but something has changed and I don't know what.  I have an anonymous registration page.  On it, I have a CAPTCHA image, with a URL pointing to an ASPX page that is generating the image.  On the Registration page I am generating a 6 digit code to be displayed in the CAPTCHA image, then saving it to a Session variable.  On the CAPTCHA ASPX page, I am grabbing that Session variable and creating the image.  However, the Session is resetting when the CAPTCHA ASPX page is called.  If I debug it, it has a different ID and the variable is gone.

Why is this happening and how can I fix it?  I have Sessions enabled in SharePoint 2007.

Anonymous access turning off automatically on target site after content deployment


I have enabled the Anonymous access on internet facing site. Anonymous access turning off automatically on target site after running content deployment job, but the status of job was succeeded. Anonymous access setting to “nothing” automatically. it is happening only when more than 500 objects are exported. Appreciate your help.

-Sudhakar Chandragiri

anonymous site prompts for authentication when using https


I have extended a site in SPS 2010 and made it anonymous. When I go to the site http://site, it is okay. But when I go to the same site via https://site, I get prompted. What could be the reason. I am using a certificate from another site, so the certificate name does not match the site url, could that be the reason? I will be getting a certificate shortly.

Also on the same site, when I go into site settings via https:/site, I get a Microsoft Sharepoint foundation error. But I do not get the same error if I go to site setting using http://site. What could be wrong?

Lastly, is it possible to change the IP of the site to match the certificate url.

Please advise.

How to Hide the Ribbon and Site Actions Menu for Anonymous Users in SharePoint 2010?


How to Hide the Ribbon and Site Actions Menu for Anonymous Users in sharepoint2010?


any thoughts?

Thanks in Advance!

Share Knowledge and Spread Love!

Server out of memory error in a LIST (anonymous site) that has eventhandlers


Scenario: We have a sharepoint site on wss 3.0 set to anonymous access. It has couple of lists and the pages render fine to any user. The moment I associated eventhandler to a list, started getting 'server out of memory'. Removing eventhandlers works fine but without eventhandlers I can't write business logic.

Searched so far and found that people have suggested to use guest account or some other account. Still looking into this so far.

Does anyone has better resolutions? Has Microsoft released any solution / hofix so far? 


search results for anonymous user ---public facing site



How Do I enable search results for anonymous users on my internet site

I changed the inheritance of  results page but it didnot work

Thanks in advance

AJAX call to anonymous site returns 401 Unauthorized



I'm trying to do AJAX requests using jQuery to a custom aspx site which in turn gathers data from different lists and sites and in turn returns this to the client in a JSON object.

What I got:
A front facing page which does not require authentication.
A set of jQuery powered javascripts that should update certain parts of the frontpage with new content from the back end.
A server side custom page that builds and sends a JSON object with the proper data.

What I want:
A service that allows me to aggregate data from different lists and sites on the back end and feed this to the front page in a JSON object upon request. I don't need to write back updates to the list items on the server.

My problem: My current setup does not work for anonymous sites!

Also I was wondering if the way I'm doing this is the best (or preferred) way to perform such calls?

Anonymous Access in site template or feature activated by the site template, is it possible?



I'm building a custom site template and my question is if it's possible to set the anonymous access level in the deployment action.

I tried to create an EventReceiver (FeatureActivated), but I doesn't change the anonymous access level at deploy time. If I deactivate and reativate the feature from the site it works, but I miss the point, because like this it's the same thing then going to Site Permission and change the permission from there.

I do not want to set Anonymous Access from the Site Administration every time.


Alerts not working for Lists on FBA / Anonymous access site


Hi Folks,

I have a WSS3.0 site that allows anonymous access as well as using FBA. Another web application is configured to use the same content database but set with windows authentication.

Anonymous users are allowed to post to a few Lists. I am trying to create an alert for an authenticated user (either FBA or Windows). I receive the "You have successfully created an alert" email, but no emails are sent when new items are added. This is the case for all new list items whether they are added by an authenitcated user or an anonymous one.

I am sure the site config is set correctly (but I will double-check). Is there any reason for the behaviour I am experiencing? I'm not at the latest patch level (we are using the June 2009 CU), so perhaps this was an issue that has been resolved in a later patch/update that I ought to apply?

Would appreciate any gems of information anyone might have on the subject before I go away and write my own event handler to send an email!!!


WCF Service with anonymous means Internet Facing site


Hi Guys,

I have Web application with NTLM and this webapplication extended to Internet zone with anonymous for public facing site.

Now i have developed WCF service to get data from sharepoint calendar list which will be consume by silverlight application.

This works fine on Intranet Zone with Windows authentication but on public facing site it Prompt for Credentials and if i cancel it doesnt get data.


Please advise how can i make it work for Internet facing site.


Thanks Ron

Enable anonymous access to sharepoint 2010 site

Enable Anonymous access to SharePoint 2010 site
This video shows how you can enable anonymous access to a SharePoint 2010 site. Anonymous access is usually turned on when you wish your site to be accessible through the internet without anyone having to enter login credentials to enter. Keep in mind that before doing steps in this video, your IT department needs to turn on anonymous access at the IIS level and also need to open up the appropriate communication ports for exposing your portal on the internet.

Changing the graphics on the home page of a SharePoint site

When you create a site in Microsoft Windows SharePoint Services by using the default Team Site template, the home page includes two default graphics. A Windows SharePoint Services graphic appears in the body of the page, and a picture of a house in a circle appears near the site title. You can change these graphics to customize your site. Changing the smaller graphic requires a Windows SharePoint Services compatible Web page editor

Take a tour of your SharePoint site

What is a SharePoint site for?
A SharePoint site is a Web site that provides a central storage and collaboration space for documents, information, and ideas. A SharePoint site is a tool for collaboration, just like a telephone is a tool for communication, or a meeting is a tool for decision making. A SharePoint site helps groups of people (whether work teams or social groups) share information and work together. For example, a SharePoint site can help you:

Coordinate projects, calendars, and schedules.
Discuss ideas and review documents or proposals.
Share information and keep in touch with other people.

Six easy ways to customize your site using Web Parts in SharePoint

Becoming familiar with Web Part customization techniques gives you a range of page-customization choices. For example, you can customize your site's home page so that it displays the specific information that your team needs. You can rearrange the list items on the home page, add lists, and even change the images on the home page. As you become more familiar with Web Part Page customization techniques, you can build interactive Web Part Pages that makes the data in lists more dynamic and useful, and you can add new Web Parts that provide access to external data and Web services.
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