Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 GrayedFox · Sep 30, 2014 at 11:33 AM · linkhttpwebrequeststripping

Using HttpWebRequest when Stripping Assemblies

Hi,

I have a problem similar to this one: http://answers.unity3d.com/answers/612479/post.html.

While stripping assemblies (first level of stripping) our app cannot successfully complete purchases and returns this:

WebException: Error: ConnectFailure

System.Net.HttpWebRequest.EndGetRequestStream (IAsyncResult asyncResult) System.Net.HttpWebRequest.GetRequestStream() OurScript+c__Iterator53.MoveNext()

The important part is the stream stuff. Here is our link file:

 <linker>   
   <assembly fullname="System">
     <type fullname="System.Net.HttpRequestCreator" preserve="all" />
     <type fullname="System.IAsyncResult" preserve="all" />
     <type fullname="System.ComponentModel.StringConverter" preserve="all" />
     <type fullname="System.ComponentModel.SingleConverter" preserve="all" />
     <type fullname="System.ComponentModel.BooleanConverter" preserve="all" />
     <type fullname="System.ComponentModel.DecimalConverter" preserve="all" />
     <type fullname="System.ComponentModel.DoubleConverter" preserve="all" />
     <type fullname="System.ComponentModel.ArrayConverter" preserve="all" />
     <type fullname="System.ComponentModel.CollectionConverter" preserve="all" />
     <type fullname="System.ComponentModel.EnumConverter" preserve="all" />
     <type fullname="System.ComponentModel.Int32Converter" preserve="all" />
     <type fullname="System.ComponentModel.Int64Converter" preserve="all" />   
   </assembly>   
   <assembly fullname="mscorlib">
     <namespace fullname="System.Security.Cryptography" preserve="all" />
     <type fullname="System.Net.WebResponse" preserve="all" />
     <type fullname="System.Net.HttpWebResponse" preserve="all" />   
   </assembly> 
 </linker>


I cannot track down the right namespace / type for GetRequestStream or EndGetRequestStream for the life of me. MSDN provides some information, but as you can see from the link file, I've already put what I thought would allow this System.Net.Http functionality.

My question is, for you .NET guru's and Link.xml extraordinaires, what the hell kind of type / namespace am I suppose to stop from being stripped if not HttpWebResponse!

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
3

Answer by sungiant · Oct 08, 2014 at 05:14 PM

I found that the key was to include a few things from Mono.Security. Now I have System.Net.HttpWebRequest with HTTPS working on device (iOS).

Here's my link.xml:

 <linker>
   <assembly fullname="System">
     <namespace fullname="System.Net" preserve="all"/>
     <namespace fullname="System.Net.Configuration" preserve="all"/>
     <namespace fullname="System.ComponentModel" preserve="all"/>
     <namespace fullname="System.Runtime.ConstrainedExecution" preserve="all"/>
     <namespace fullname="System.Runtime.InteropServices" preserve="all"/>
     <namespace fullname="System.Runtime.Serialization" preserve="all"/>
     <namespace fullname="System.Configuration" preserve="all"/>
   </assembly>
   <assembly fullname="mscorlib">
     <namespace fullname="System.Security.Cryptography" preserve="all"/>
   </assembly>
   <assembly fullname="Mono.Security">
     <namespace fullname="Mono.Security.Protocol.Tls" preserve="all"/>
     <namespace fullname="Mono.Security.X509" preserve="all"/>
   </assembly>
 </linker>
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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

HTTP WebRequest with iOS Stripping 1 Answer

link.xml for a monobehaviour? 1 Answer

Can't seem to get link.xml working with AWS SDK 4 Answers

Can I place a link (such as ) into the GUI.Label? 4 Answers

html links in strings or GUI components possible? 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