locked
How to remove authentication for add item (with attachment) in custom NewForm.aspx RRS feed

  • Question

  • Hi,

    I'm using Sharepoint 2010, and I have set anonymous access for this sharepoint site to enable for list and library. I have one list and I set permission for this list to enable add and view for anonymous user. I have done a custom NewForm.aspx for this list. Now I can access to the custom NewForm.aspx (for this list) with no need to login. I also can add/insert new item using this custom NewForm.aspx page (without attachment). The big problem is when I try to attach a file during the adding item process, I got a login popup when I click save button. Please help.

    Thanks in advance...

    Wednesday, October 19, 2011 10:16 AM

Answers

  • By design anonymous users cannot upload files to SharePoint.  The problem is that file upload could be used to insert malitious code into a web site so it is prohibited for anyone who isn't authenticated. 

    The only workaround I've ever seen for this is to implement a forms based authentication system that simply authenticates all users as an "anonymous user".  The problem with this approach is that after you are authenticated as "anonymous" there is no way to re-authenticate as a regular user.


    Paul Stork SharePoint Server MVP Chief SharePoint
    Architect: Sharesquared Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.
    Wednesday, October 19, 2011 11:55 AM

All replies

  • By design anonymous users cannot upload files to SharePoint.  The problem is that file upload could be used to insert malitious code into a web site so it is prohibited for anyone who isn't authenticated. 

    The only workaround I've ever seen for this is to implement a forms based authentication system that simply authenticates all users as an "anonymous user".  The problem with this approach is that after you are authenticated as "anonymous" there is no way to re-authenticate as a regular user.


    Paul Stork SharePoint Server MVP Chief SharePoint
    Architect: Sharesquared Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.
    Wednesday, October 19, 2011 11:55 AM
  • Even there is a risk to allow anonymous to upload an attachment, is there a way to allow it?

    Thursday, October 20, 2011 1:49 AM
  • No, there's no way to get around the exclusion.  Anonymous users can't upload files in either SharePoint 2007 or 2010.  As I mentioned the only workaround I've seen is to authenticate even anonymous users in the background.
    Paul Stork SharePoint Server MVP Chief SharePoint
    Architect: Sharesquared Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.
    Thursday, October 20, 2011 11:32 AM
  • Hi Gabriells,

    Have you ever fixed a workaround for this problem?
    I've looked for hours for anonymous upload attachments, but i only gets to RunWithElevatedPrivileges and I don't know where to start...

    Kind Regards,

    StefanBreedveld

    Tuesday, September 25, 2012 12:36 PM