On 9/2/2013 12:54 PM, Balarka DSRK wrote: > I am using .net application. We have WebClient class which is > equivalent to URLConnection. But the website from which we need to get > the image is using Forms Authentication. So even when i provide the > credentials to webclient class its throwing an error remote server > returned an error 403 forbidden. > > Kindly suggest me another approach. If you can't get the image bytes programmatically, then how do you expect iText to be able to do that? iText also needs to use program code, there's no iText employee that manually fills out the form for you whenever you post such a request, is there?
Please take another look at your problem: it's not related to iTextSharp whatsover. You need to write some code using a class that is equivalent to URLConnection. I have no idea what you mean by "Forms Authentication". Are you saying that an HTML form is presented and that you need to POST a username and password? In that case, you need to create a POST connection (that's feasible with URLConnection in Java). If you mean to say something else when you mention "Forms Authentication", then you're asking the wrong person. In any case: I fail to see how this question is related to iText(Sharp). It's off-topic here. All you need to do, is to get image bytes from a protected site. Please explain why you think this involves iTextSharp. ------------------------------------------------------------------------------ Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php