473,397 Members | 2,077 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,397 software developers and data experts.

System.Type.GUID inter computer consistency (???)

Hi,

I am using the System.Type.GUID to identify similar types on different
computers, one computer send the GUID through a socket while the other
resolve the GUID and identify the type, when working on a single computer
everything works fine, BUT, when working on two different computers the GUID
extracted from one type is different from the GUID extracted from the same
type on the other computer. why is that happening? shouldn't a guid
representing one type on one computer be similar to the guid of the same type
on the other computer?????
Is there any other consistent identifier ( of a constant size ) that can be
extracted from a type? in the unmanaged reflection API I could use the
TokenId of the type BUT, I didn't find a way to get this ID through managed
code...
--
Nadav
http://www.ddevel.com
Nov 16 '05 #1
2 3879
qty

On 12-Sep-2004, "=?Utf-8?B?TmFkYXY=?=" <Na***@discussions.microsoft.com>
wrote:
shouldn't a guid
representing one type on one computer be similar to the guid of the same
type
on the other computer?????


Definitely not. A GUID is GLOBALLY unique, that's what the G stands for
Nov 16 '05 #2
Nadav wrote:
I am using the System.Type.GUID to identify similar types on different
computers, one computer send the GUID through a socket while the other
resolve the GUID and identify the type, when working on a single computer
everything works fine, BUT, when working on two different computers the GUID
extracted from one type is different from the GUID extracted from the same
type on the other computer. why is that happening? shouldn't a guid
representing one type on one computer be similar to the guid of the same type
on the other computer?????
Are you defining your *own* Guids with the
System.Runtime.InteropServices.GuidAttribute?
If not, you're looking for trouble, because
the Guids are automatically generated at compile
time.
Is there any other consistent identifier ( of a constant size ) that can be
extracted from a type? in the unmanaged reflection API I could use the
TokenId of the type BUT, I didn't find a way to get this ID through managed
code...


The most consistent indentifier is the type itself,
so try to send a serialized type over the wire.
This implies, that all computers have the save
type version, so you have to build an assemby
from that "remoted" types and keep it in sync
on all computers.

If you don't care about the type versioning,
then you may send the type name, but you're still
looking for trouble, because you may exchange
soma data between computers having different
versions of that type.

Finally, why on earth aren't you using remoting??

bye
Rob
Nov 16 '05 #3

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

Similar topics

1
by: Thomas Born | last post by:
Hi; I use following code in an ASP page to generate a GUID: <% dim obj Set obj = Server.CreateObject("Scriptlet.TypeLib") Response.Write(obj.guid) Set obj = nothing %>
7
by: headware | last post by:
Is the GUID generated by the .NET System.Guid.NewGuid() function compatible with Access' Replication ID field type? Dave
10
by: www.dir | last post by:
Hi, The following is from MSDN. "A GUID is a 128-bit integer (16 bytes) that can be used across all computers and networks wherever a unique identifier is required. Such an identifier has a...
2
by: Lee Crabtree | last post by:
I've been wrapping an unmanaged class, and everything has gone well. That is...until now. I've hit a wall while trying to marshal the System::Guid type down into the unmanaged GUID structure...
5
by: rcolby | last post by:
Evening, Wondering if someone can point me in the right direction, on how I would compare a system.guid with a system.byte. system.guid (pulled from sql server table with a data type of...
5
by: Michael Primeaux | last post by:
I have a simple .NET 2.0 web service created with VS.NET 2005 with a single web method with the following signature: void HelloWorld(Guid parameter1); When calling this method I receive the...
1
by: Jeff | last post by:
ASP.NET 2.0 In the code below, the reader has a column named "Id". The MsgInfo class needs that value sent into its constructor. But MsgInfo need it as a System.Guid datatype. How do I convert...
2
by: Jeff | last post by:
ASP.NET 2.0 I have a GridView on my webpage. As one of its columns I've put a HiddenField into a TemplateField. The porpose of this HiddenField is to hold the ID of the row. Each row in the...
2
by: Jeff | last post by:
ASP.NET 2.0 I'm wondering how to convert a string into a System.Guid! I have this code where I want to use the convert: Message.DeleteMessage(hidden.Value);. Here DeleteMessage wants an...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.