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

B

Brad

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.ApplicationPath)
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.ApplicationPath)

crReportDocument.Load(Path.Combine(reportPath, "Report1.rpt"))
crReportDocument.ExportToHttpResponse(ExportFormatType.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
 
W

WenYuan Wang

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
 
B

Brad

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


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
 
W

WenYuan Wang

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,701
Latest member
XavierQ83

Latest Threads

Top