views:

171

answers:

2

I am developing a master page which includes the user control that generates a menu from the list with a specific logic. Before including the control into master page I successfully configured anonymous access to the site. After including the control and deploying - site prompts for user name and password.

I allowed the anonymous access to the list. Oh yes ... It worked on SHarepoint 2010 beta, but the problem happens when deploying to the Sharepoint 2010 final release.

Additional data: I am using Sharepoint Server 2010 with Standard features, standalone instalation on Windows Server 2008 R2 for deployment, and Visual Studio 2010 Ultimate for development of masterpage and user control.

A: 

I'm not a Sharepoint expert, however I work a lot with web forms. I would look at the web.config first and make sure there is a location entry for the control.

<location path="Controls/MySharepointControl">
    <system.web>
        <authorization>
            <allow users="*"/>
        </authorization>
    </system.web>
</location>
TheGeekYouNeed
A: 

Ok ... this was the problem ... Inside of the controls I was using SPMetal generated classes (LINQ to SHarepoint) and SPMetal generated classes DO NOT SUPPORT ANONYMOUS ACCESS. So you can use Server Object Model for access, or Client Object Model.

(client object model example) http://www.zimmergren.net/archive/2009/11/30/sp-2010-getting-started-with-the-client-object-model-in-sharepoint-2010.aspx

There are hacks to make it work but they are not tested very well. http://jcapka.blogspot.com/2010/05/making-linq-to-sharepoint-work-for.html

Senad Uka