Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by KanraLovesU · Jun 04, 2018 at 10:36 PM · wwwurlhttpwww classhttpwebrequest

UriFormatException: Invalid URI: Invalid port number for VirtualBox server using IPv6 Address

I've set up a server using a VirtualBox and determined that the address of that server is using IPv6. The address itself is http://[fe80::a00:27ff:fefe:70c5] and I can type that into a browser just fine and see my page. I've tried both of the following codes separately and received the same error both time:

 WWW www = new WWW(specURL +
             "api/v1/users/1/" + dest + "?access_token=" +
             accTok);
         yield return www;

 UnityWebRequest www = UnityWebRequest.Get(specURL +
             "api/v1/users/1/" + dest + "?access_token=" +
             accTok);
         yield return www.SendWebRequest();
 
         classList.text = www.downloadHandler.text;

where specURL is exactly http://[fe80::a00:27ff:fefe:70c5] and dest and accTok are things specific to the API of the server and shouldn't matter. I've also tried inputting http://[fe80::a00:27ff:fefe:70c5]:80 but that also returns the same error. The full error is this:

 UriFormatException: Invalid URI: Invalid port number
 System.Uri.Parse (UriKind kind, System.String uriString)
 System.Uri.ParseUri (UriKind kind)
 System.Uri..ctor (System.String uriString, Boolean dontEscape)
 System.Uri..ctor (System.String uriString)
 UnityEngineInternal.WebRequestUtils.MakeInitialUrl (System.String targetUrl, System.String localUrl) (at C:/buildslave/unity/build/Modules/UnityWebRequest/Public/WebRequestUtils.cs:527)
 UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
 CanvasHttpsRequest:LookForClasses() (at Assets/CanvasHttpsRequest.cs:72)
 UnityEngine.EventSystems.EventSystem:Update()

My assumption is that the formatting of my URI is incorrect, especially in regards to IPv6. Is there anything I'm missing?

Comment
Add comment
10 |3000 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
0

Answer by KanraLovesU · Jun 05, 2018 at 11:24 PM

Welp, turns out I missed a slash. Because we were just inputting http://[fe80::a00:27ff:fefe:70c5] I edited the string "api/v1/users/1/" to "/api/v1/users/1/" which would account for the slash between the IP and the API call.

For those wondering it does definitively recognize my server despite it being IPv6 and despite it being on a VirtualBox. I wouldn't expect anything less but good to make sure!

Comment
Add comment · Share
10 |3000 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.

Follow this Question

Answers Answers and Comments

84 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to upload a file from Android to my own website? 0 Answers

Unable to call external API (IBM Watson) via HTTP request? 1 Answer

Is HttpWebRequest supported for desktop and editor? 2 Answers

Is System.Net.HttpWebRequest supported on Android/iOS 1 Answer

WWW does not show Location in header response (302/Redirect) 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges