need some help

M

Mike

I have a aspx page that is accessing a WSDL web service creating in VB6.
When I run the page i'm getting the following error:


Object reference not set to an instance of an object

here is my code snippet thats failing

public function GetService as as WebReference1.WebServiceName
dim configreader as new Config.File
dim service as new WebReference.WebServiceName

servername = configreader.getvalue("Server", "WebServiceWSDLAddress")

end function

Function Remove() As object
dim service as WebReference.WebServiceName = GetService()
service.url = servername ' this is the line that is giving me the error
message

service.removeItems()

end function

any help is appreciated
 
D

Dhaval Naik

Change you code to as shown and then try again.

dim service as WebReference.WebServiceName = GetService()
dim service as New WebReference.WebServiceName = GetService()
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top