guid

C#: Why isn't Guid.ToString("n") the same as a hex string generated from a byte array of the same guid?

Consider the following unit test: [TestMethod] public void TestByteToString() { var guid = new Guid("61772f3ae5de5f4a8577eb1003c5c054"); var guidString = guid.ToString("n"); var byteString = ToHexString(guid.ToByteArray()); Assert.AreEqual(guidString, byteString); } private String To...

Database Design Question: Treating GUID's around the place

Here's a simplified example. UserDetails (UserID INT UserGUID UNIQUEIDENTIFIER Name VARCHAR(50) Age INT) UserRatings (UserID INT Rating INT Date DATETIME) UserVotes (UserID INT Votes INT Date DATETIME) The UserGUID only exists in the main table. In the application layer only GUID's are parsed around, never INTS. This is to prevent ...

SIlverlight 4, FilterDescriptor and GUID as FilterOperator

Hey guys, as seen in this post, GUIDs are not supported by the FilterDescriptorts FilterOperator. Has anyone encountered this problem? Is there a workaround? Because, well it pretty much sucks (no filtering by foreign keys and so on... which is quite common). ...

Accessing Assembly Information GUID in a C# Form Application

I would like to use the GUID in the Assembly Information of my Microsoft Visual C# 2008 Express Edition project for use in a Mutex that is used to verify that only one instance of the application is running. How can the GUID be accessed? I only need to use it in the Program.Main(...) function. Thanks. ...

Current and archive table identifier scheme

I have a table that i use for current semesters (currentSemester) with an id that is an identity. I have a table I archive to called pastSemester with an id that is an identity and a legacyID column that carries the key to currentSemester when I archive. The problem is that I have to report on both current and past records simultaneousl...

Purpose of GUIDs in COM

What is the purpose of GUIDs in COM? Is it only to avoid name conflicts? ...

C# 4.0 Optional Parameters - How to Specify Optional Parameter of Type "Guid" ?

Hi Guys, Here's my method: public void SomeQuery(string email = "", Guid userId = Guid.Empty) { // do some query } userId is giving me an error as it must be a compile-time constant, which i understand. But even when i declare a const: private const emptyGuid = Guid.Empty; then change the method signature to: public void SomeQ...

Android application security when accessing a web service.

I'm building an Android application that needs to communicate with a MySQL database. The application isn't meant to be published, and I want the application to be the only thing allowed to interface with the web service I'll create for DB access. I've been thinking how I can secure the system, and this is the idea I've come up with. I'd...

What is the fastest way to convert all PK and FK GUID Columns and relationships to int?

I'm currently developing an ASP.NET MVC application with a ton of PK-FK relationships in the database. In the beginning of development, the team I WAS working with voted against my recommendation to use INTs for all PKs... they decided to use GUIDs. Long story long... the team has split ways, and now I have control to change things... ...

convert guid tostring in javascript .net

How do I convert guid to string in javascript. I am getting guid from the querystring, and m not able to process it as is. I have tried the following ways to do it but it doesnt seem to work. var guid = {<%=Request.QueryString["Guid"]%>}.toString(); var guid = <%=Request.QueryString["Guid"]%>.toString(); var guid = (string)<%=Request.Qu...

What is a good unique PC identifier?

I've been looking at the code in this tutorial, and I found that it uses My.Computer.Name to save settings that shouldn't roam between computers. It's entirely possible, however, for a user to have two identically named PCs. If they wanted to have the same username on each PC, for example, they may very well end up with two PCs named Use...

Do we have to use GUIDs in LinqToSql application to uniquely identify objects

I have inherited a LinqToSql application which is making use of GUID keys for objects. I'd rather use conventional identity fields - much easier for people to use, understand and communicate. However there is some business logic that requires the application to identify unique objects before they're persisted to the DB which is why GUID...

Sequential Guid and fragmentation

I'm trying to understand how sequential guid performs better than a regular guid. Is it because with regular guid, the index use the last byte of the guid to sort? Since it's random it will cause alot of fragmentation and page splits since it will often move data to another page to insert new data? Sequential guid sine it is sequentia...

Java: can I require a child class to define a property value?

I have an abstract base class that many classes extend. I'd like all these classes to define a unique value for a specific property that is originally defined in the base class (similar to the serialVersionUID property that causes a warning when not defined in classes that inherit from Serializable). Is there a way for me, within my ab...

Security wise how do i use GUID properly?

I read an answer about guid and it was fairly interesting. It seems that GUID is based on time and v1 uses a MAC address with v4 using a RNG. From the wiki Cryptanalysis of the WinAPI GUID generator shows that, since the sequence of V4 GUIDs is pseudo-random; given full knowledge of the internal state, it is possible to pre...

Get Blackberry UID or device specific info

Is there any way to get the UID of a Blackberry device using Javascript requests? ...

How to find program location in registry, if I know MSI GUID?

I have installed some MSI with GUID (0733556C-37E8-4123-A801-D3E6C5151617). The program registered in the registry: HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Uninstall \ () Value UninstallString = MsiExec.exe / I (0733556C-37E8-4123-A801-D3E6C5151617) My question is: how utility MsiExec.exe knows the name ...

C# Create an Auth Token from Guid combined with 40Char Hex string (UUID)

I am writing an asp.net MVC app that drives an IPhone application. I want the Iphone to send me its UUID looks like this: 2b6f0cc904d137be2e1730235f5664094b831186 On the server I want to generate a Guid: 466853EB-157D-4795-B4D4-32658D85A0E0 On both the Iphone and the Server I need a simple aglorithm to combine these 2 values ...

Locally unique identifier

Question: When you have a .NET GUID for inserting in a database, it's structure is like this: 60 bits of timestamp, 48 bits of computer identifier, 14 bits of uniquifier, and 6 bits are fixed, ---- 128 bits total Now I have problem with a GUID, because it's a 128 bit number, and some of the DBs I'm using only support 64 bit numbers...

Generating Order Numbers - Keep unique across multiple machines - Unique string seed

I'm attempting to create an order number for customers to use. I will have multiple machines that do not have access to the same database (so can't use primary keys and generate a unique ID). I will have a unique string that I could use for a seed for some algorithm that will generate a unique looking alphanumeric ID # for the order ...