Solved

Vb.net Web Ref

Posted on 2011-03-24
2
279 Views
Last Modified: 2012-06-21
HI All

I'm trying to connect to a web services which requires you to get a token first.

Example code it gives:

Dim tokens = getToken(operatorId, soapUsername, soapHashedPassword, 60000)

Open in new window


The 3 variable need to be full first.

So I type them in as string "".

I get : "Reference to a non-shared member requires an object reference "

I've have now tried tons of different way to fill them, but the same error message!!

I've tried function

Function Token(ByVal operatorId, ByVal soapUsername, ByVal soapHashedPassword)
        Dim tokens = getToken(operatorId, soapUsername, soapHashedPassword, 60000)
    End Function

Open in new window


Anyone got any idea why this is happening? and what  Reference to a non-shared member requires an object reference mean?
0
Comment
Question by:Matb396
2 Comments
 
LVL 13

Accepted Solution

by:
gamarrojgq earned 500 total points
ID: 35210999
Hi,

Reference to a non-Shared member requieres an object reference means that you ar calling a METHOD from a class that IS NOT marked as shared, so you will need an instance of that class to call it, so if you have a class named ClassYouTryingToGet with a method named SomeMethod

'So this will work
Dim objClass as New ClassYouTryingToGet
ObjClass.SomeMethod()

'But this does not
ClassYouTryingToGet.SomeMethod

0
 

Author Closing Comment

by:Matb396
ID: 35211076
Thanks :)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Word Template Mail merge with vb.net 4 58
Form design in vb.net 7 34
Hide Tab Page 3 34
POWERSHELL: do / until, should continue even when there is an error 4 53
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now