API Questions on Kentico API.
Version 5.x > API > How to open document using WebRequest class. View modes: 
User avatar
Member
Member
anshuman.shandilya-aonhewitt - 4/12/2012 7:14:09 AM
   
How to open document using WebRequest class.
I am tring to get MemoryStream by creating WebRequest object using a document url.
I have taken this url from cmsdesk. But instead of getting the document stream, I am getting a stream which creates a login page. Reason could be that new WebRequest object is not authenticated on kentico CMS. Is there a way to pass current kentico context/credentials with my own WebRequest object.

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 4/13/2012 3:31:44 AM
   
RE:How to open document using WebRequest class.
Hello,

Could you please let me know what you are trying to achieve? Isn't possible to achieve the same functionality with our REST module?

Best regards,
Boris Pocatko