Performance Question and .... Please assist

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

  1. #1

    Default Performance Question and .... Please assist

    Hello everyone,

    I have a couple of questions. Please jump in and provide
    your comments and views.

    First, does the webservice not behave as a normal
    webpage? Here is my reasoning:

    I have a webservice with a method that increments
    a session variable.

    <WebMethod(EnableSession:=True)>Public Function
    Increment() as Long
    Dim iRet as long
    iRet = clng(Session("MyNumber"))
    iRet = iRet + 1
    Session("MyNumber") = iRet
    Return iRet
    End Function

    I have two clients

    VB.Net Application that has a web reference to
    this webservice.

    Sub Button_Click(Object, Args)
    Dim iAnswer as Long
    Dim i as Long
    Dim WS as MyWebservice.ServiceName
    WS= New MyWebservice.ServiceName()
    WS.Url
    = "http://localhost/myservice/ServiceName.asmx"

    For i = 1 to 100
    iAnswer = ws.Increment()
    debug.write("The answer was:" &
    iAnswer.tostring())
    'This always returns 1
    Next i
    End Sub

    VB 6.0 Application using XML

    Function Test() as Long
    Dim iAnswer as Long
    On Error GoTo Test_Error

    Dim objXMLHeader As XMLDocument
    Dim objHTTP As MSXML2.XMLHTTP
    Dim strEnvelope As String

    Set objXMLHeader = New XMLDocument
    Set objHTTP = New MSXML2.XMLHTTP
    strEnvelope = "<?xml version='1.0' encoding='utf-
    8'?>"
    strEnvelope = strEnvelope & "<soap:Envelope
    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
    xmlns:xsd='http://www.w3.org/2001/XMLSchema'
    xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>"
    strEnvelope = strEnvelope & " <soap:Body>"
    strEnvelope = strEnvelope & " <Increment
    xmlns='http://cname.mydomain.com/'>"
    strEnvelope = strEnvelope & " </ Increment >"
    strEnvelope = strEnvelope & " </soap:Body>"
    strEnvelope = strEnvelope & "</soap:Envelope>"


    objHTTP.Open "POST", "http://localhost/myservice/s
    ervicename.asmx", False
    Call objHTTP.setRequestHeader("Content-
    Type", "text/xml")

    objHTTP.setRequestHeader "SOAPAction", "http://loc
    alhost/myservice/servicename.asmx/Increment"
    objHTTP.send strEnvelope


    'Do While Not objHTTP.readyState = 4
    'Sleep 1
    'Loop

    Dim x As MSXML2.DOMDocument
    Set x = New DOMDocument

    If x.loadXML(objHTTP.responseText) Then
    iAnswer = x.selectSingleNode
    ("soap:Envelope/soap:Body/IncrementResponse").nodeTypedVal
    ue
    End If
    Test = iAnswer
    'Always returns the next number
    Exit Function

    Test_Error:
    End Function

    Sub Button_Click()
    debug.print test 'Always the next number
    End Sub


    I would have expected that the vb.net application would
    have behave as expected and that the xml solution would
    have been a new session as each time a connection was
    created. I now expect that I have to tell the webservice
    that I am done with it from the vb 6.0 application so
    that it could call session.abandon. There goes a
    security model. Am I missing something?

    The second question is "Should I create a DCOM Component
    or Webservice?". I have a need to create a component
    that is accessable from vb 6.0 applications, vb.net
    applications, and asp.net websites. The component is
    required to cache information while instantiated to
    reduce redundant calls to the database. Security is
    managed internally with this component. All consumers of
    this component will be on the LAN but I do not want to
    have to manage dll's on each machine or the .Net security
    configuration. If the answer is DCOM, where can I get
    more information on building them in .Net?


    Thanks in advance

    Matthew Holton Guest

  2. Similar Questions and Discussions

    1. Performance Question
      "xixi" <dai_xi@yahoo.com> wrote in message news:c0f33a17.0306261139.5b0de317@posting.google.com... There will be an extra access to some of the...
    2. Question about performance
      Hay gang, I have a compound question about MovieClips (MC) in comparison to other classes in Flash. I am noticing a lot of solutions to people?s...
    3. ADO Performance Question
      Hey there, I connect to Access 2000 using ASP/ADO (surprise surprise). Currently, my connection string looks like this: Set DB =...
    4. performance question...
      I've done a few tests on code speed in lingo and I reckon there'd be negligible differences in speed either way, unless you're iterating the code a...
    5. A performance question
      you can easily test out the speed of a particular piece of code by including a timer eg tm=the timer repeat with ty=1 to 100000 th=random(22)...
  3. #2

    Default Ok, lets try this route.

    It seems that remoting is a better approach to take for
    robustness reasons, but it is less interoperable than a
    webservice. Or is it?

    Is it possible to access a service using SOAP and XML?
    Does remoting not support interaction from VB 6.0 or C++
    6.0.

    Is it possible to create a managed code wrapper for a
    remoted service for access via older platforms?


    I guess I am in a pickle and need to consider not
    using .Net webservices, but rather, traditional asp and
    xml. At least then I know rules to the game (SOAP 1.1)
    and I dont have to develop around sockets. Sheesh.

    Input is greatly appreciated


    Matthew Holton
    Matthew Holton Guest

  4. #3

    Default Re: Ok, lets try this route.

    > It seems that remoting is a better approach to take for
    > robustness reasons, but it is less interoperable than a
    > webservice. Or is it?
    Remoting is faster then Webservices.
    [url]http://www.ingorammer.com/Articles/REMOTINGVS.ASP.NETWEBSERV.html[/url]
    Remoting is for .NET only, Webservices are open.
    > Is it possible to access a service using SOAP and XML?
    What do you mean by "a service" a Windows service? A Webservice?
    > Does remoting not support interaction from VB 6.0 or C++
    > 6.0.
    Remoting is for .NET only, so you can't use it from VB 6. You can used it
    from managed C++ (VS.NET 2002/3).
    > Is it possible to create a managed code wrapper for a
    > remoted service for access via older platforms?
    I think so, what communications are you using? COM+?
    > I guess I am in a pickle and need to consider not
    > using .Net webservices, but rather, traditional asp and
    > xml. At least then I know rules to the game (SOAP 1.1)
    > and I dont have to develop around sockets. Sheesh.
    If you use SOAP 1.1 doesn't that imply that you use webservices?

    --
    Greetz

    Jan Tielens
    ________________________________
    Read my weblog: [url]http://weblogs.asp.net/jan[/url]


    "Matthew Holton" <mholton@americasdoctor.com> wrote in message
    news:012b01c3db85$7f991ce0$a101280a@phx.gbl...
    > It seems that remoting is a better approach to take for
    > robustness reasons, but it is less interoperable than a
    > webservice. Or is it?
    >
    > Is it possible to access a service using SOAP and XML?
    > Does remoting not support interaction from VB 6.0 or C++
    > 6.0.
    >
    > Is it possible to create a managed code wrapper for a
    > remoted service for access via older platforms?
    >
    >
    > I guess I am in a pickle and need to consider not
    > using .Net webservices, but rather, traditional asp and
    > xml. At least then I know rules to the game (SOAP 1.1)
    > and I dont have to develop around sockets. Sheesh.
    >
    > Input is greatly appreciated
    >
    >
    > Matthew Holton

    Jan Tielens Guest

  5. #4

    Default Re: Ok, lets try this route.

    Jan,

    Thank you for your reply. I thought I was just talking to myself. I reviewed the url you specified, thanks again, very informative. I was actually grasping, I need to develop this component. I just didn't want to use ASP.Net if I didn't have to. The component will perform encryption/decryption and manage the security for data in a SQL server. The company doesn't want to look into a product such as NetLib's encryptionizer. So now I am stuck with how to employ this functionality.

    Legacy Code: ActiveX scripts in DTS Packages, Access Queries and Reports
    New Code: ASP.Net applications, VB.Net Applications

    SQL Platform: SQL 2000
    Daily Inserts: ~20,000
    Daily Updates: ~45,000
    Daily Reads: ~400,000 x ~500ms = ~3333 minutes if each read returned one row. (2 days)

    My current version of this component in ASP.Net as a webservice consumes about 500ms to decrypt 14 columns from one row. 750 ms to encrypt and insert a new row, and 1 sec to encrypt and update a single row. Now, there may be some further optimizations to be perform, but that is still slow. DTS packages will never finish in a timely maner. Reports will just be unusable. HIPPA has tied the company's hands, and they tied mine by excluding packaged software.

    I was just looking for a faster way.

    ----- Jan Tielens wrote: -----
    > It seems that remoting is a better approach to take for
    > robustness reasons, but it is less interoperable than a
    > webservice. Or is it?
    Remoting is faster then Webservices.
    [url]http://www.ingorammer.com/Articles/REMOTINGVS.ASP.NETWEBSERV.html[/url]
    Remoting is for .NET only, Webservices are open.
    > Is it possible to access a service using SOAP and XML?
    What do you mean by "a service" a Windows service? A Webservice?
    > Does remoting not support interaction from VB 6.0 or C++
    > 6.0.
    Remoting is for .NET only, so you can't use it from VB 6. You can used it
    from managed C++ (VS.NET 2002/3).
    > Is it possible to create a managed code wrapper for a
    > remoted service for access via older platforms?
    I think so, what communications are you using? COM+?
    > I guess I am in a pickle and need to consider not
    > using .Net webservices, but rather, traditional asp and
    > xml. At least then I know rules to the game (SOAP 1.1)
    > and I dont have to develop around sockets. Sheesh.
    If you use SOAP 1.1 doesn't that imply that you use webservices?

    --
    Greetz

    Jan Tielens
    ________________________________
    Read my weblog: [url]http://weblogs.asp.net/jan[/url]


    "Matthew Holton" <mholton@americasdoctor.com> wrote in message
    news:012b01c3db85$7f991ce0$a101280a@phx.gbl...
    > It seems that remoting is a better approach to take for
    > robustness reasons, but it is less interoperable than a
    > webservice. Or is it?
    >> Is it possible to access a service using SOAP and XML?
    > Does remoting not support interaction from VB 6.0 or C++
    > 6.0.
    >> Is it possible to create a managed code wrapper for a
    > remoted service for access via older platforms?
    >>> I guess I am in a pickle and need to consider not
    > using .Net webservices, but rather, traditional asp and
    > xml. At least then I know rules to the game (SOAP 1.1)
    > and I dont have to develop around sockets. Sheesh.
    >> Input is greatly appreciated
    >>> Matthew Holton


    Matthew Holton 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