I written this below code
string url = ConfigurationManager.AppSettings["ApplicationRoot"].ToString() + "/ASPX/PreviewToWord.aspx?ProjectInventoryID=48&ProjectID=30";
//Prepare the web page we will be asking for
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "GET";
request.ContentType = "application/msword";
request.UserAgent = "Mozilla/4.0+(compatible;+MSIE+5.01;+Windows+NT+5.0";
//Execute the request
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
//We will read data via the response stream
Stream resStream = response.GetResponseStream();
//Write content into the MemoryStream
BinaryReader resReader = new BinaryReader(resStream);
MemoryStream docStream = new MemoryStream(resReader.ReadBytes((int)response.ContentLength));
Document doc = new Document(docStream );
Here I am getting two errors one is : The current HttpRequest is unauthorised ...
In application I am using windows authontication if any body access url they shold give username password .
But here how can i get page streeam ?
And I tried one more way
Document doc = new Document("test.html");
Here the word file is not asking save dialogue its saving some location directly . like file download dialogue box its not showing .
and this time i am getting one more error in saved word file
Evaluation Only. Created with Aspose.Words. Copyright 2003-2008 Aspose Pty Ltd.
This document was truncated here because it was created using Aspose.Words in Evaluation Mode