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

Discussion in 'ASP .Net Web Services' started by Robert Pettersson, Jan 12, 2005.

  1. 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
    Robert Pettersson, Jan 12, 2005
    #1
    1. Advertising

  2. 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
    Robert Pettersson, Jan 12, 2005
    #2
    1. Advertising

  3. 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

    > 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
    >
    Dilip Krishnan, Jan 12, 2005
    #3
  4. 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

    "Dilip Krishnan" <> wrote in message
    news:...
    > 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
    >
    Robert Pettersson, Jan 12, 2005
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page