Free Support Forum -

Problems with document save on production server

I'm using Aspose Words and it works on my local machine and my development server.

But, when I do a doc.Save on the production server, instead of trying to download my document, it asks if I want to save "default_aspx" and then gives a "Cannot download that document" error message.

This message was posted using Aspose.Live 2 Forum


Thanks for your inquiry. Please provide me your code.

Try using this method.

doc.Save("Report.doc", SaveFormat.Doc, SaveType.OpenInWord, Response);

Also please check your permissions on production server.

Best regards.

My event handler follows. I know it's finding the license and merge document and making it to the doc.Save line. As you can see, I'm already using the form of the Save method you suggested.

Now, the part about permissions is more interesting. I have given full read/write permissions for my entire website to the "Network Services" user. Anything else I need?

BTW: The production server uses SSL.

Private Sub cmdReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdReport.Click

Dim oReportsCont As New ReportsController


Dim oReportsInfo As ReportsInfo = oReportsCont.ReportsGet(CInt(cboReportType.SelectedValue))

Dim sRptPath As String = DotNetNuke.Common.Globals.ApplicationPath + REPORT_ROOT

Dim license As license = New license

license.SetLicense(Server.MapPath(sRptPath + "Aspose.Words.lic"))

Dim doc As Document = New Document(Server.MapPath(sRptPath + oReportsInfo.ReportLocation))

Dim builder As DocumentBuilder = New DocumentBuilder(doc)

Dim bookmarks As bookmarks = doc.Range.Bookmarks

Dim bookmark As bookmark

Dim iFacultyID As Integer = 0

If cboFaculty.Visible Then

iFacultyID = CInt(cboFaculty.SelectedValue)

End If

For Each bookmark In bookmarks


'builder.Font.Bold = True

'builder.Font.Color = System.Drawing.Color.Red


Select Case bookmark.Name

Case "FacultyName"


builder.Font.Bold = True


' Faculty Review Bookmarks

Case "FacultyInfo"

AddFacultyInfo(builder, iFacultyID)

Case "StudySections"

AddStudySectionInfo(builder, iFacultyID)

Case "Grants"

AddGrantInfo(builder, iFacultyID)

Case "ClinicalActivities"

AddClinicalActivitiesInfo(builder, iFacultyID)

Case "Students"

AddStudentInfo(builder, iFacultyID)

Case "Recruits"

AddRecruitInfo(builder, iFacultyID)

Case "Departures"

AddDepartureInfo(builder, iFacultyID)

Case "Collaborations"

AddCollaborationInfo(builder, iFacultyID)

Case "Relationships"

AddRelationshipInfo(builder, iFacultyID)

Case "Editorships"

AddEditorshipInfo(builder, iFacultyID)

Case "Honors"

AddHonorInfo(builder, iFacultyID)

Case "Lectureships"

AddLectureshipInfo(builder, iFacultyID)

Case "Affiliations"

AddAffiliationInfo(builder, iFacultyID)

Case "Committees"

AddCommitteeInfo(builder, iFacultyID)

Case "Teachings"

AddTeachingInfo(builder, iFacultyID)

Case "Residents"

AddResidentInfo(builder, iFacultyID)

Case "ClinicalFellows"

AddClinicalFellowInfo(builder, iFacultyID)

Case "PostdoctoralFellows"

AddPostdoctoralFellowInfo(builder, iFacultyID)

Case "Presentations"

AddPresentationInfo(builder, iFacultyID)

Case "Publications"

AddPublicationInfo(builder, iFacultyID)

Case "Books"

AddBookInfo(builder, iFacultyID)

'Annual Report Bookmarks

Case "FacultyResearchInterests"


Case "StudySectionsList"


Case "PublicHealthServiceGrantList", "FederalGrantList", "LocalGrantList", "SocietyGrantList", "IndustryGrantList", "VAMCGrantList"

AddGrantsList(builder, bookmark.Name)

Case "GraduateResearchersList"

AddGraduateStudentsList(builder, True)

Case "NewRecruitsList"


Case "IntramuralCollaborationsList", "ExtramuralCollaborationsList"

AddCollaborationsList(builder, bookmark.Name)

Case "RelationshipsList"


Case "EditorshipsHonorsEtcList"


Case "TeachingHonorsList"


Case "UPMCResidentsList"

AddResidentsList(builder, False)

Case "OtherResidentsList"

AddResidentsList(builder, True)

Case "ClinicalFellowsList"


Case "PostdoctoralFellowsList"


Case "GraduateStudentsList"

AddGraduateStudentsList(builder, False)

Case "FacultyTeachingList"


Case "InvitedPresentations"


Case "ResearchFacultyList"

AddFacultyList(builder, True)

Case "ClinicalFacultyList"

AddFacultyList(builder, False)

Case "FacultyPublications"


Case "FacultyChapters"


End Select


doc.Save(oReportsInfo.ReportLocation, SaveFormat.Doc, SaveType.OpenInWord, Response)

Catch Ex As Exception

ProcessModuleLoadException(Me, Ex)

End Try

End Sub


Thanks for additional information. I found this article. Maybe this could be useful in your case.

Hope this helps.

Best regards.

Found the answer!

After reading this thread on another forum:

I changed my save call to:



doc.Save(oReportsInfo.ReportLocation, SaveFormat.Doc, SaveType.OpenInWord, Response)


and it works now. You may wish to update your code.