I have a web application in which i can create word, excel and ppt files and store. Everything works on visual studio 2008. When I deploy this on IIS, nothing works. Then I searched that Microsoft does not support server side automation. Then I was looking
for third party API's. then found Aspose.Words for creating word documents. My code is given below.
using Aspose.Words;
public partial class Default5 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
slm3003
Member
133 Points
166 Posts
Opening a word document on IIS
Feb 25, 2012 11:36 AM|LINK
Hello All,
I have a web application in which i can create word, excel and ppt files and store. Everything works on visual studio 2008. When I deploy this on IIS, nothing works. Then I searched that Microsoft does not support server side automation. Then I was looking for third party API's. then found Aspose.Words for creating word documents. My code is given below.
using Aspose.Words;
public partial class Default5 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
doc.Save(@"C:\inetpub\wwwroot\List\Data\" + TextBox1.Text + ".docx" );
string paths = @"C:\inetpub\wwwroot\List\Data\" + TextBox1.Text + ".docx" ;
Process prc = new Process();
prc.StartInfo.FileName = paths;
prc.Start();
}
This code also works on VS 2008 but not on IIS. It is creating the file in IIS but not opening the file. What is the mistake I have done?