Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Vb.net Web Ref

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Convert datetime to time string 10 28
Help with opening combobox using VB.NET. 3 25
"Emulate" TAB key when press Enter Key 3 46
Passing data between Forms 3 20
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

840 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