Solved

Vb.net Web Ref

Posted on 2011-03-24
2
277 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Text in tooltip bound field bridview 3 30
Vb.Net Menu 1 22
Word Template Mail merge with vb.net 4 40
VB.NET HttpWebRequest 12 34
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

747 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

13 Experts available now in Live!

Get 1:1 Help Now