I want to be able to use a simple HttpModule to catch visits to a sharepoint site that don't automaticly pass windows authentication and log them in as a default windows account.

I want it to be so that any browser that accesses the sharepoint site that doesn't right away pass windows auth it will goto this other windows account.

What I don't know how to do is the following:

  • Detect that the browser did not send windows authentication for the connection.
    • Get an event handler on that and send it to a login function
    • Then the authentication cycle would have to be redone
  • Login the user into sharepoint as a windows account with username and password

The scenario for this is because I haven't found the anonymous access in sharepoint to be the most supportive. I do alot of javascript stuff, and I ran into a road block trying to access the listdata.svc service when a user was anonymous. It seems like there has to be a simpler, possibly totaly unsupported way of doing things. A way that gives you total control over exactly what the default user can and cannot do.

  • The problem you are going to have is that the first time a browser connects it will access the site without passing any credentials. IIS will return 401 asking the browser to authenticate. – Simon Doy Sep 4 '12 at 19:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.