Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ServiceStack error in Release build of Mondroid app

I have mnodroid app that works fine in debug mode but gives me the following error when I build and run in release mode:

UNHANDLED EXCEPTION: System.Net.WebException: Error: NameResolutionFailure
[MonoDroid]   at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0 
[MonoDroid]   at System.Net.HttpWebRequest.GetResponse () [0x00000] in <filename unknown>:0 
[MonoDroid]   at ServiceStack.ServiceClient.Web.ServiceClientBase.Send[ICollection`1] (System.String httpMethod, System.String relativeOrAbsoluteUrl, System.Object request) [0x00000] in <filename unknown>:0 
[mono] 

I've played around with linking all files on build as well as just sdk files to no avail. I'm using the latest Xamarin Studio. Any thoughts on why this error is happening?

like image 364
MonkeyBonkey Avatar asked Jan 24 '26 03:01

MonkeyBonkey


1 Answers

Added the Internet permission? Per default the Internet permission is added in the AssemblyInfo.cs file, however that is only for when using Debug.

So you have to generate an AndroidManifest.xml and in there add the Internet permission.

like image 93
Cheesebaron Avatar answered Jan 26 '26 17:01

Cheesebaron