• Sign Up Login
  • Features
    • Game Services
    • Real-time Analytics
    • LiveOps
    • Add-ons
  • Game Services
  • Real-time Analytics
  • LiveOps
  • Add-ons
  • Games
  • Pricing
  • Blog
  • Support
    • Docs
    • Forums
    • Contact
  • Docs
  • Forums
  • Contact
  • Sign Up Login
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Ideas
    • Articles
    • Users
    • Badges
  • Home /
  • General Discussion /
avatar image
Question by Brent Batas · Nov 04 at 08:05 PM · Custom Game Servers

How to generate a ServerId GUID for testing purposes?

Context: I'm trying to test some systems which will depend on ServerIds from server v2.0. I'd like to generate some 'fake' ServerIds so I can test it locally first.

How do I generate GUIDs that look like this?

0595d58b096937ab3b3480f520a3468e39099daa7e646e294e79eab497c42a38

(64 length)

Currently my approach looks something like:

string fakeGuid = Guid.NewGuid().ToString();

which outputs:

51d783be-d5b0-43b6-873c-9f1b778cad00

which is not nearly long enough to match the ServerId format

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Sarah Zhang · Nov 05 at 05:11 AM

ServerId like 0595d58b096937ab3b3480f520a3468e39099daa7e646e294e79eab497c42a38 is not a GUID, it’s a random string. You can write a random string generator function by yourself to generate a string like it.

Comment
Brent Batas

People who like this

1 Show 0 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    3 People are following this question.

    avatar image avatar image avatar image

    Related Questions

    Are there any server in Asia? Any api for using wechat account to login? 1 Answer

    How to create a custom UE4 Game Server using PlayFab?,How to create a custom UE4 Server using PlayFab? 1 Answer

    How to handle winning and rewarding in a game? 1 Answer

    Syncing Database Across Many Dedicated Servers 1 Answer

    New account shows server hours exceed before I ever run any servers 2 Answers

    • PlayFab

      • Features
      • Games
      • Pricing
      • Blog
    • Engineers

      • Documentation
      • Quickstarts
      • API Reference
      • SDKs
      • Usage Limits
    • Support

      • Forums
      • Videos
      • Contact
      • Service Health
      • Terms of Service
    • Social

      • Facebook
      • Twitter
      • LinkedIn
      • YouTube
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • About Microsoft
    • Jobs
    • Accessibility
    • Diversity & inclusion
    • Security
    • Company news
    • © Microsoft 2019
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Post an idea
    • Create an article
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Ideas
    • Articles
    • Users
    • Badges