473,396 Members | 1,815 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,396 software developers and data experts.

Conversion error in web service

Hello,

I am working on a single sign on sollution for two different websites.
I am trying to make the methods in my customized(overriden) provider post to a web service and get the results from it so that the same login.

It works for most methods but there are ones that return System.We.Security sp3ecific objects that fail. For example

Expand|Select|Wrap|Line Numbers
  1. public override MembershipUser GetUser(object providerUserKey, bool userIsOnline)
  2.         {
  3.             System.Web.Security.MembershipUser mu = null;
  4.             iConnect.Core.iConnectWS.iConnect connect = new iConnect.Core.iConnectWS.iConnect();
  5.             mu = ((MembershipUser)connect.GetUser(providerUserKey, userIsOnline));
  6.             return mu;
  7.         }
  8.  
is in the provider
and it calls
Expand|Select|Wrap|Line Numbers
  1. [WebMethod(EnableSession = true)]
  2.     public object GetUser(object providerUserKey, bool userIsOnline)
  3.     {
  4.         return (object) System.Web.Security.Membership.GetUser(providerUserKey, userIsOnline);
  5.     }
  6.  
in the webservice
(the webservice uses the default asp.net provider System.Web.Security.SqlMembershipProvider)

My problem is that when I try to run this I get an error
Expand|Select|Wrap|Line Numbers
  1. Unable to cast object of type 'iConnect.Core.iConnectWS.MembershipUser' to type 'System.Web.Security.MembershipUser'
  2.  
If I don't make the web service return a object then I get this error at compilation.

The class is the web service and the one in the one in the provider is one and the same System.Web.Security.MembershipUser.

Can anyone help me?
thank you in advance
Sep 11 '09 #1
0 1414

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Symon R | last post by:
This is a bit of a weird one that I haven't yet been able to solve - I'm hoping someone out there can disprove my findings and tell me where I've gone wrong! I have designed a web service that...
2
by: Abhijit Bhadra | last post by:
Hi , I was trying to build my project in VC with latest Service Packs but got this error . C:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE\atlconv.h(125) : error C2440: 'return' :...
1
by: Curtis Justus | last post by:
Hi, We have a project that requires a .NET service to convert a Word document to a PDF document. Basically, a person would create a mail merge template in Word and through automation, we merge...
2
by: xmail123 | last post by:
In a web service I am using a SqlDataReader to retrieve the information to populate an ArrayList. public ArrayList ReadHistory(int ItemPK) { SDrdr = SDcmd.ExecuteReader(); ArrayList AL = new...
8
by: acb | last post by:
Hello, I am a beginner in ASP.NET and C# having programmed in VB (not the .NET flavour) in the past. I am looking for assistance in converting a functional VB.NET aspx page to C#. I am trying...
8
by: andyjgw | last post by:
Hi all, hope someone can help here, I'm really stuck. Reading and googling like mad, to no avail so far... Basically, my problem *seems* to boil down to type conversion: Here's a sample web...
1
by: Prashant | last post by:
We have an ATL COM server developed with VC++ 6.0 which acts a a server . Then we have VB6 modules Acting as clients and interfacing with the server . We want to migrate the ATL COM server...
3
by: iw3arv | last post by:
Hello, I've, probably, a simple problem but I'm not able to figure the solution!!! I've realized a web service method that reads an Excel sheet and convert the information in xml. This...
0
by: Lou Evart | last post by:
DOCUMENT CONVERSION SERVICES Softline International (SII) operates one of the industry's largest document and data conversion service bureaus. In the past year, SII converted over a million...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.