By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,709 Members | 2,157 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,709 IT Pros & Developers. It's quick & easy.

Vista IIS7 worker process crashing from crystal reports export in asp.net

P: n/a
In a Vista/IIS7 asp.net app, a coded crystal report export is crashing
IIS7....but it works just fine in visual studio's cassini web server. And
if I create a web form and use the crystal reports web viewer, view the
report and then export from the viewer it also works fine (IIS7 and
cassini). And I should note this all works fine in IIS6 on win2003 or in
xp. So my thought with all this is that something is going on with IIS7,
so I've cross posted this to the iis forum too....just in case.

If I use either of the two asp.net methods listed below in a web page I end
up with the following errors:

IIS Worker process stopped working and was closed. A problem caused the
application to stop working correctly...
followed by
IIS Worker Process was closed. To help protect your computer, Data
Execution Prevention has closed IIS Worker Process...

Here's the code:

Public Shared Sub Export()

'Have Crystal export a report to disk, then we post to the client
'Although this is extra steps compared to Crystal ExportToHTTPResponse
' (see method ExportStream later) it is much faster...plus we can do this in
an
' intermediate page with a nice Wait message then stream the output on
another page
' when done

Dim crReportDocument As New ReportDocument
Dim reportPath As String =
Current.Server.MapPath(Current.Request.Application Path)
Dim crExportOptions As ExportOptions
Dim crDiskFileDestinationOptions As DiskFileDestinationOptions
Dim exportFileName As String = Path.Combine(reportPath, "123.pdf")

'Typically crashes after this next statement
crReportDocument.Load(Path.Combine(reportPath, "Report1.rpt"))
crExportOptions = crReportDocument.ExportOptions
crExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat
crDiskFileDestinationOptions = New DiskFileDestinationOptions
crDiskFileDestinationOptions.DiskFileName = exportFileName
crExportOptions.DestinationOptions = crDiskFileDestinationOptions
crExportOptions.ExportDestinationType = ExportDestinationType.DiskFile

crReportDocument.Export()
crReportDocument.Close()
crReportDocument.Dispose()
crReportDocument = Nothing

End Sub

Public Overloads Sub ExportStream()

' This used Crystal method which streams a report to the client browser
after it is exported
' Works but is MUCH slower than exported it on our own then streaming to
client
Dim crReportDocument As New ReportDocument
Dim reportPath As String =
Current.Server.MapPath(Current.Request.Application Path)

crReportDocument.Load(Path.Combine(reportPath, "Report1.rpt"))
crReportDocument.ExportToHttpResponse(ExportFormat Type.PortableDocFormat,
Current.Response, False, "")
crReportDocument.Close()
crReportDocument.Dispose()
crReportDocument = Nothing
'Typically crashes after above is all finished...also always seem to get a
401.1 yet the report displays

End Sub

Dec 15 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi Brad,

According to your description, I understand that you encountered some issue
when using Crystal Report in IIS7/Vistal.
If I misunderstood anything here, please don't hesitate to correct me.

Just pass some information from a community member in IIS forum:
"Try changing the application pool to use 'Classic Mode' vs. Integrated
mode. Make sure asp.net is enabled and able to handle asp.net webpages.
I'm assuming you have tried a basic asp.net webpage to see if it writes out
the date for example.
Hope that helps."

We would like to suggest you can try this way to check whether it can
resolve your issue.
I will send mail to our IIS product team to check whether this is a know
issue or there is somebody can give us some idea.

Have a good weekend!
Sincerely,
WenYuan

Dec 15 '06 #2

P: n/a
Thanks for the suggestion, but I am already using "Classic Mode" for all web
applications, asp.net it enabled....I had to go through all this and other
things just to get visualstudio to properly work with IIS.

Brad
"WenYuan Wang" <v-******@online.microsoft.comwrote in message
news:8k**************@TK2MSFTNGHUB02.phx.gbl...
Hi Brad,

According to your description, I understand that you encountered some issue
when using Crystal Report in IIS7/Vistal.
If I misunderstood anything here, please don't hesitate to correct me.

Just pass some information from a community member in IIS forum:
"Try changing the application pool to use 'Classic Mode' vs. Integrated
mode. Make sure asp.net is enabled and able to handle asp.net webpages.
I'm assuming you have tried a basic asp.net webpage to see if it writes out
the date for example.
Hope that helps."

We would like to suggest you can try this way to check whether it can
resolve your issue.
I will send mail to our IIS product team to check whether this is a know
issue or there is somebody can give us some idea.

Have a good weekend!
Sincerely,
WenYuan

Dec 15 '06 #3

P: n/a
Hi Brad,
Thanks for your reply.

I have discussed this issue with our product team members.
Unfortunately, according to my research, I'm afraid this is not a known
issue.
After our discussion, we think this is a special case and related to
Crystal Reports.

Due to Newsgroup limitation, we would like to suggest you contact Microsoft
CSS directly for urgent issues.
If the problem is confirmed to be a product bug, the case charge will be
free.
You can get the regional support phone numbers at
http://support.microsoft.com.

If there is something I can help with, please feel free to reply me here
and we will follow up.
Sincerely,
Wen Yuan

Dec 18 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.