M
MisterEd
I am a new developer in an academic environment working on a project for
graduation. I appreciate any help anyone can give me!
I have tried to use good programming techniques and split up my application
into different tiers: Win (windows client), WS (web service), DAL (data
access layer), and Common (where i store all of my common classes and data
sets).
I have a class in my Common tier that is called User. It has some members
and also has two functions in it.
I have a web method called GetUser() and it returns a value of type
Common.User.
In my Win application I want to consume the web service and return a user of
the Common.User type such as this example:
Dim CurrentUser as new Common.User
CurrentUser = CType(UsersWS.GetUser(), Common.User)
My problem comes because I am getting an error in the conversion: [Value of
type 'UsersWS.User' cannot be converted to 'Common.User']. This is really
frustrating because if I make the CurrentUser variable of type UsersWS.User,
then I can't use the functions that I have built into the Users class, only
the data members.
I have thought of everything and even changed my declaration of the class
User in my Common Tier to:
<Serializable()> Public Class User : Inherits System.MashalByRefObject
so that an object of this type could cross application domains.
--I'm not sure what to do at this point but I would love for that conversion
to work. Maybe I am just missing something simple (hopefully!).
Anyhow, thanks for any help!
Ed
graduation. I appreciate any help anyone can give me!
I have tried to use good programming techniques and split up my application
into different tiers: Win (windows client), WS (web service), DAL (data
access layer), and Common (where i store all of my common classes and data
sets).
I have a class in my Common tier that is called User. It has some members
and also has two functions in it.
I have a web method called GetUser() and it returns a value of type
Common.User.
In my Win application I want to consume the web service and return a user of
the Common.User type such as this example:
Dim CurrentUser as new Common.User
CurrentUser = CType(UsersWS.GetUser(), Common.User)
My problem comes because I am getting an error in the conversion: [Value of
type 'UsersWS.User' cannot be converted to 'Common.User']. This is really
frustrating because if I make the CurrentUser variable of type UsersWS.User,
then I can't use the functions that I have built into the Users class, only
the data members.
I have thought of everything and even changed my declaration of the class
User in my Common Tier to:
<Serializable()> Public Class User : Inherits System.MashalByRefObject
so that an object of this type could cross application domains.
--I'm not sure what to do at this point but I would love for that conversion
to work. Maybe I am just missing something simple (hopefully!).
Anyhow, thanks for any help!
Ed