Missing method ParseQueryString in assembly

Hi,

I'm trying to use the Mono AzureStorageClient and I'm getting on pretty well.. However when I call:

CloudBlobContainer container = _cloudBlobClient.GetContainerReference(containerName);

I get this:

Missing method ParseQueryString in assembly /Users/r_s_adams/Library/Application Support/iPhone Simulator/6.1/Applications/913C2D4F-66B8-416C-B402-23700175D9DB/TellatiOS.app/Microsoft.WindowsAzure.StorageClient.dll, type System.Web.HttpUtility

To be fair I have no idea where to start so any help would be great.

Thanks.

Posts

  • PierceBogganPierceBoggan USForum Administrator, Xamarin Team, Developer Group Leader Xamurai
    edited July 2013

    Hi @RichardAdams,

    Could you please provide your general version information (Xamarin Studio -> About Xamarin Studio -> Show Details -> Copy Information), as well as the version of the Azure client (not sure if you are using from the Github repository or the component), and some more code to wrap around this for a repo (a small test case would be great)!

    Once I get this information, I'll try to reproduce, and if I can, we can get a bug filed!

  • RichardAdamsRichardAdams USMember

    Hi Pierce,

    I've got closer to the problem. I built the Azure Storage Client from GitHub using a standard Xamarin project, then imported the DLL in to an Xamarin iOS project.

    It seems the problem is Mono's iOS .NET libraries not having a full implementation of System.Web, specifically in this case HTTP.ParseQueryString(). The exception comes when the Storage Client DLL calls anything missing from the iOS assemblies.

    When I attempt to build the Storage Client against the iOS .NET implementation (which looks like the Silverlight sub-set?) I'm missing a host of required references so no joy I'm afraid.

    Hopefully Xamarin or Microsoft will port the code-base at some stage in the future?

    Rich

  • ZacharyGramanaZacharyGramana USMember Xamurai

    @richardadams, It sounds like you're working on your own port of the Azure SDK. I have a personal fork of the Azure SDK for .NET that adds Xamarin.iOS support for the Storage library. This is just a quick-n-dirty port for now, until I have some time to release it as a proper component. This should at least get you up and running.

  • RichardAdamsRichardAdams USMember

    Hi Zack,

    Fantastic it's the only thing between me and a server-less mobile implementation.

    I'll download and take a look.

    Thanks!

  • LuisMarquesLuisMarques GBMember, University ✭✭

    Hi Zack @ZacharyGramana thank you so much for your blob storage Azure port. If it weren't for your DLL, I would have a really hard time trying to get it to work for iOS and Android as the default MS Nuget package doesn't work for those platforms. Regarding the usage of the DLL, when I call the blob.UploadFromStream(Stream) method I often get the error message "The number of bytes to be written is greater than the specified ContentLength" which most of the time is fine because the blob gets uploaded anyway. So currently I am suppressing this error. However, it would be nice to know why this is coming up as I have no way to specify any size parameter, I assume its calculated automatically inside the method...

    The biggest issue I have right now is that this DLL only works for iOS and Android. It doesn't work for Windows Phone. So What I will likely do is just try to follow the windows phone specific MS recipe (I'm sure it must be out there somewhere) and try to call it from the Xamarin Forms PCL code by using the same old technique - create an interfacein the PCL, inherit from it in the windows phone sub-project and then call that from the PCL when Device.OnPlatform = windows phone to access the windows phone specific solution. In other words, I can't use the same code that already works for android or iOS :-(

    Also strangely enough, the android upload only works 90% of the time... still need to determine why. I'll capture some traces and post here when I have them. iOS works 100% of the time, which is probably not surprising given that you ported the Microsoft SDK specifically for iOS. Would it be too much to ask if you can talk me through how to adapt your port to make it work flawlessly for Android and also Windows Phone? I don't suppose you already have an updated port ;-) ?
    This is so I can avoid adding more code only specific to windows phone.

    Thanks again for the great port - without it it, it would have taken me ages to upload blobs. Hope Microsoft delivers a blob PCL soon that can be used in Xamarin Forms projects.

    Regards,
    Luis.

Sign In or Register to comment.