473,387 Members | 1,590 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Creating a library with my web services

I am trying to create a dll that I can call from my web pages. The problem
is that it doesn't work the same way as a web page that calls the web
services.

I created a Library Project and added a web reference: RemoteUser, just like
I do in my Web Page.

I have the following:

************************************************** ****************
using System;
using MyFunctions.RemoteUser;

namespace MyFunctions
{
/// <summary>
/// Summary description for Class1.
/// </summary>
public class NewHire
{
public static int AddNewHire()
{
RemoteUserServiceService remoteUserService = new
RemoteUserServiceService();
RemoteUserDataBean ruDataBean;
ruDataBean = remoteUserService.fetchRemoteUserInfo(
"st",
"sw",
"10.0.0.5",
"C", //Client (employer)
"150");

if (ruDataBean.errorCode == 0)
{
return 0;
}
else
{
return;
}
}
}
}
**************************************************

In my Web Page, I append the reference name with the Namespace
(MyFunctions.RemoteUser). In the Dll, this does not seem to be the case.

The error I get when I try to build is:

C:\VSProjects\ClassLibrary4\NewHire.cs(3): The type or namespace name
'RemoteUser' does not exist in the class or namespace 'MyFunctions' (are you
missing an assembly reference?)

What am I missing here?

This code comes directly from my Web Page.

Thanks,

Tom
Feb 27 '06 #1
1 822
I got it to work.

But I am confused as to why it works.

It seems I need to use the name the Project was originally named when I
created the Library. I had renamed the namespace and Classes, as you can
see. There is nothing in the Solutions explorer showing the original name,
which is ClassLibrary4.RemoteUser. This makes no sense to me and I only
found it by accident, when I was looking at Object Browser which shows under
newHire:

{}ClassLibrary4
{}ClassLilbrary4.RemoteUser
{}MyFunctions

Very strange.

Tom

using ClassLibrary4.RemoteUser;
"tshad" <ts**********@ftsolutions.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
I am trying to create a dll that I can call from my web pages. The problem
is that it doesn't work the same way as a web page that calls the web
services.

I created a Library Project and added a web reference: RemoteUser, just
like I do in my Web Page.

I have the following:

************************************************** ****************
using System;
using MyFunctions.RemoteUser;

namespace MyFunctions
{
/// <summary>
/// Summary description for Class1.
/// </summary>
public class NewHire
{
public static int AddNewHire()
{
RemoteUserServiceService remoteUserService = new
RemoteUserServiceService();
RemoteUserDataBean ruDataBean;
ruDataBean = remoteUserService.fetchRemoteUserInfo(
"st",
"sw",
"10.0.0.5",
"C", //Client (employer)
"150");

if (ruDataBean.errorCode == 0)
{
return 0;
}
else
{
return;
}
}
}
}
**************************************************

In my Web Page, I append the reference name with the Namespace
(MyFunctions.RemoteUser). In the Dll, this does not seem to be the case.

The error I get when I try to build is:

C:\VSProjects\ClassLibrary4\NewHire.cs(3): The type or namespace name
'RemoteUser' does not exist in the class or namespace 'MyFunctions' (are
you missing an assembly reference?)

What am I missing here?

This code comes directly from my Web Page.

Thanks,

Tom

Feb 27 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Robert | last post by:
I get these errors when creating a asp .net web application project in VS 2003 on a remote web server: "Microsoft Development Environment The Web was created successfully, but an error occurred...
19
by: Steve | last post by:
Can anyone point me to a primer for creating OCX controls in VB .net? In particular, I want to access a web service in a VB6 application (not an easy thing to do). So, if I can write an ActiveX...
1
by: ypul | last post by:
How to use properties in webservice ? if I want to create a webservice as my middle tier and want to create public properties so that the presentation layer can assign values to the property...
2
by: Val3 | last post by:
Hi all. I need to build dll(s) and windows services using VB .NET 2005 Express. When I make File/New project the windows contain only Windows application, Windows control library, Console...
9
by: Rotzooi | last post by:
Hi, I have a VB.NET Service application that's running fine under the Local System account. But for configuration purposes I don't want to be dependent on modifying the registry manually or...
3
by: clsmith66 | last post by:
I hope this is just something stupid I'm missing and someone can easily point out my error. I'm trying to do a few turorials on windows services, and the couple I found so far just create an event...
1
by: tshad | last post by:
I am trying to create a dll that I can call from my web pages. The problem is that it doesn't work the same way as a web page that calls the web services. I created a Library Project and added...
16
by: tshad | last post by:
This is a little complicated to explain but I have some web services on a machine that work great. The problem is that I have run into a situation where I need to set up my program to access one...
9
by: hazz | last post by:
I want to display 'n' records for a table-driven data entry page. The first column should be readonly and the 2nd column, a checkbox WRITABLE (NOT READONLY). I can't use the gridview because it...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.