Webservics problem
Hi,
I want to test a webservice from a webservice loadtest but get the following error:
"Object reference not set to an instance of an object".
The code I use is:
Dim serv as new MyService '<-- this goes wrong
I register the webservices via the web references button:
http://localhost/MyWebservice/MyWebService.asmx
I see in the list of current web references:
Localhost
I am able to use the webservice from a selfmade vb.net program.
I get the error for my own webservice but also for the tutorial webservice.
Any ideas about the problem?
Thanks.
Albert
I want to test a webservice from a webservice loadtest but get the following error:
"Object reference not set to an instance of an object".
The code I use is:
Dim serv as new MyService '<-- this goes wrong
I register the webservices via the web references button:
http://localhost/MyWebservice/MyWebService.asmx
I see in the list of current web references:
Localhost
I am able to use the webservice from a selfmade vb.net program.
I get the error for my own webservice but also for the tutorial webservice.
Any ideas about the problem?
Thanks.
Albert
Comments
Is the webservice using WSE/Authentication? That's all I can think of that would cause a problem.
the webservice was using WSE but that is removed. The authentication on the webservice is still integrated security. This is a requitement.
Is it possible to create an assembly wich references the webservice and use it in an ANTS Load script?
/Albert
I've discovered that you can get ANTS Load (version 1.7) to work with webservices that require Windows authentication. It's a bit of a workaround. You can read about it here:
http://www.red-gate.com/MessageBoard/vi ... php?p=6777
My web services have anonymous access turned on and I still get "Object reference not set to an instance of an object" when attempting to create the service web reference object.
This is happening with the tutorial webservices as well as my own.
I am on Windows 2003 on the .NET 1.1 framework, with no WSE set on the services. Any ideas?
The way I ended up working around all this was to create a DLL with its own web references to my WSE web services. I then placed this DLL in the ANTS Load program file dir and referenced it in my project. I was able to run 5 simultaneous clients and achieved the testing I wanted too.
But I am still interested to know a potential solution to this.
I am testing on a Win2k3 machine, with VS.NET 2003, with the 1.0/1.1/2.0 frameworks installed. All my web site are configured to run under the 1.1 framework.
I think there is an issue with webservices on Windows 2003 SP1. It appears to be broken. What should happen is ANTS takes the WSDL that it gets by running WSDL.exe (when you create a web reference), which becomes part of the ANTS project, and when you run the project as part of a test, this is compiled into the %TMP% folder. You will see a file like RedGate.ANTS.WebReferences1 (2, 3...) and that is the compiled web reference that is used in the test.
I still don't know why this is a problem on SP1. We're looking into it.
WSE is going to remain broken, though. ANTS Load just doesn't support Web Service Extensions, only bog-standard HttpSoapClient webservices.