1

I am trying to use Java to download a file from a form-based authentication sharepoint(as a .NET web application, but all requests are redirected to the login.aspx page. The following are the steps I use:

  1. Get the file url, and it will be redirected to login page.
  2. get all parameters from the page content;
  3. post to login.aspx page with the parameters and account & password;
  4. Then Get the file and write it into a file;

The steps 3 & 4 are redirected to the login.aspx page. Maybe the 3rd step failed?

PS,

1 Answer 1

1

It's resolved. The steps are right, but all parameters in the post action url and post data must be encoded.

See the code:http://wind6266.blog.163.com/blog/static/67109072011926114229917/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.