Ask a Question related to ASP.NET Web Services, Design and Development.
-
Matthew Holton #1
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
-
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... -
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... -
ADO Performance Question
Hey there, I connect to Access 2000 using ASP/ADO (surprise surprise). Currently, my connection string looks like this: Set DB =... -
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... -
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)... -
Matthew Holton #2
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
-
Jan Tielens #3
Re: Ok, lets try this route.
> It seems that remoting is a better approach to take for
Remoting is faster then Webservices.> robustness reasons, but it is less interoperable than a
> webservice. Or is it?
[url]http://www.ingorammer.com/Articles/REMOTINGVS.ASP.NETWEBSERV.html[/url]
Remoting is for .NET only, Webservices are open.
What do you mean by "a service" a Windows service? A Webservice?> Is it possible to access a service using SOAP and XML?
Remoting is for .NET only, so you can't use it from VB 6. You can used it> Does remoting not support interaction from VB 6.0 or C++
> 6.0.
from managed C++ (VS.NET 2002/3).
I think so, what communications are you using? COM+?> Is it possible to create a managed code wrapper for a
> remoted service for access via older platforms?
If you use SOAP 1.1 doesn't that imply that you use webservices?> 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.
--
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
-
Matthew Holton #4
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: -----
Remoting is faster then Webservices.> It seems that remoting is a better approach to take for
> robustness reasons, but it is less interoperable than a
> webservice. Or is it?
[url]http://www.ingorammer.com/Articles/REMOTINGVS.ASP.NETWEBSERV.html[/url]
Remoting is for .NET only, Webservices are open.
What do you mean by "a service" a Windows service? A Webservice?> Is it possible to access a service using SOAP and XML?
Remoting is for .NET only, so you can't use it from VB 6. You can used it> Does remoting not support interaction from VB 6.0 or C++
> 6.0.
from managed C++ (VS.NET 2002/3).
I think so, what communications are you using? COM+?> Is it possible to create a managed code wrapper for a
> remoted service for access via older platforms?
If you use SOAP 1.1 doesn't that imply that you use webservices?> 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.
--
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?> Does remoting not support interaction from VB 6.0 or C++>> Is it possible to access a service using SOAP and XML?
> 6.0.> remoted service for access via older platforms?>> Is it possible to create a managed code wrapper for a> using .Net webservices, but rather, traditional asp and>>> I guess I am in a pickle and need to consider not
> 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



Reply With Quote

