Webservice that create Crystal Reports (COM Component) generates SoapException?

R

Robert Pettersson

Hi,

I have written a websevice that calls a class in the same solution that
generates Crystal Reports, runs them and exports them to pdf.

If I test the class from a WinApp everything works fine. But if I call the
webservice instead, that in turn calls the class that generates the reports,
I get the error:

--------------
An unhandled exception of type 'System.Web.Services.Protocols.SoapException'
occurred in system.web.services.dll

Additional information: Server was unable to process request. --> Load
report failed.
--------------

And if I call it from a webpage I get the error:

--------------
An unhandled exception of type
'System.Runtime.Serialization.SerializationException' occurred in Unknown
Module.

Additional information: The type System.Web.Services.Protocols.SoapException
in Assembly System.Web.Services,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a is not
marked as serializable.
--------------

So the class works fine, but not if I run it through calling the webservice.
I can call the webservice that creates the class that creates crystal report
objects, but when I call the load method of the report I get the error.

In the error the webpage get, it complains abouit serialization, but I can´t
make that object serializable, since I haven´t written it.

Is it beacuse it is an old COM component that is called from a .Net
webservice?

If anyone have any suggestions on how to solve this problem I would be very
greatful!

/Robert
 
R

Robert Pettersson

Update:

Could it be a problem when I´m trying to access the local filesystem and
load my report through the webservice?
Since I get the error when I call the load("C:\cat\report.rpt") and not when
I create the object.

I have put this code in my Web.config:

<authentication mode="Windows" />
<identity impersonate="true" userName="administrator" password="password" />

With the username and password of an administrator on the mashine. I thought
that would give me access to the filesystem?

/Robert
 
D

Dilip Krishnan

Hello Robert,
Try giving the ASPNET user permissions to access c:\cat directory. Its
possible you dont have permissions. Or in your proxy you could set the credentials
of the client

WSProxy.Credentials = System.Net.CredentialCache.DefaultCredentials;

HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
 
R

Robert Pettersson

Thanks for your post Dilip!

That works, but can´t I impersonate a user when running a webservice?
So that I don´t have to give the ASP.Net user rights to my catalogs?

Again, thanks for your help!

/Robert
 

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,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top