Calling a .NET COM+ component from an ASP page.

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Calling a .NET COM+ component from an ASP page.

    I created a COM+ component (ServicedComponent) in .NET. The component has a
    single method Connect() which returns a reference to a SqlConnection object.
    This component works fine when the world is centered around .NET. Now I
    want this component to work when called from inside an ASP page.

    I know that I can do this because I created a test component with a method
    that returns a string (strings are simple to marshal). When I called the
    Connect method, I get an internal server error from IIS. I was wondering if
    this problem has to do with some marshalling issues or something else.
    Since SqlConnect is a .NET class, would there be any problem with using it
    in an ASP page? What might be causing my problem?


    Peter Rilling Guest

  2. Similar Questions and Discussions

    1. Way to know what component is calling a function
      Hi, all. I seem to remember seeing a way to know which component is calling a function. For example, lets say I have two datagrids, each with a...
    2. Calling COM+ component from webservice
      I'm a newbie with ASP.NET and webservices. I have a webservice that is calling a C# dll. This dll then calls methods in a VB COM+ component. The...
    3. Calling a COM component via C#(ASP .net)
      Hi All I am accessing a COM component using C#. When i access it through the standalone c# application it works fine.But when i call it using ASP...
    4. Access denied when calling COM component.
      Hello, I try to convert a VB6 application to an ASP Web application. This application uses a COM component to access data on a remote server. ...
    5. Calling a html page from an asp page then returning to the next statement on the original asp page
      Hi! I have an ASP page that calls excel to create a report. This works fine. Now I need to call a html calendar page to filter what rows are...
  3. #2

    Default Re: Calling a .NET COM+ component from an ASP page.

    I am a little further along but still having problems.

    Since I am using ASP and VBScript, there is concept of "types". I use the
    CreateObject method to create an instance of the COM+ component. That
    works. I run the following test and I get an "Object required" error.

    Response.Write(myObj.C().ConnectionString)

    What does the error mean. The following displays "false" so I know that I
    am getting back a SqlConnection (also this is a small test component with
    hardcoded values so as to rule our all other problems).

    Response.Write(myObj.C() is nothing)

    Now, I also have test methods A() and B() while return strings. Those work
    correctly.

    If I was in a strongly-typed language, I would say the problem is because
    the object would need to be casted. However, there is no casting in
    VBScript.

    Any thoughts?

    "Peter Rilling" <peter@nospam.rilling.net> wrote in message
    news:ecyFVmQXDHA.1832@TK2MSFTNGP09.phx.gbl...
    > I created a COM+ component (ServicedComponent) in .NET. The component has
    a
    > single method Connect() which returns a reference to a SqlConnection
    object.
    > This component works fine when the world is centered around .NET. Now I
    > want this component to work when called from inside an ASP page.
    >
    > I know that I can do this because I created a test component with a method
    > that returns a string (strings are simple to marshal). When I called the
    > Connect method, I get an internal server error from IIS. I was wondering
    if
    > this problem has to do with some marshalling issues or something else.
    > Since SqlConnect is a .NET class, would there be any problem with using it
    > in an ASP page? What might be causing my problem?
    >
    >

    Peter Rilling Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139