Need help with error on OPEN() in Silverlight

May 3, 2012 at 7:18 PM


Hi,

I tied to use follwing sample to open WebDav server:


            var uri1 = new Uri(@"http://wd..../IN", UriKind.Absolute);
            var config1 = new WebDavConfiguration(uri1);

            // Use GenericNetworkCredentials class for Box.Net.
            AppLimit.CloudComputing.SharpBox.StorageProvider.GenericNetworkCredentials cred = new       AppLimit.CloudComputing.SharpBox.StorageProvider.GenericNetworkCredentials();
            cred.Password = "p...";
            cred.UserName = "n...";

            CloudStorage storage = new CloudStorage();
            ICloudStorageAccessToken storageToken = storage.Open(config1, cred);


            // get the root entry of the cloud storage
            ICloudDirectoryEntry root = storage.GetRoot();
            if (root == null)
            {
                Console.WriteLine("No root object found");
            }
            else
            {
                foreach (ICloudFileSystemEntry fsentry in root)
                {
                    if (fsentry is ICloudDirectoryEntry)
                    {
                        Console.WriteLine("Found Directory: {0}", fsentry.Name);
                    }
                    else
                    {
                        Console.WriteLine("Found File: {0}", fsentry.Name);
                    }
                }
            }

 

The .Net sample (SharpBox .NET-library) works fine, but when i try to use this in an Silverlight-Framework (with linked silverlight-lib) i'll receive at line
            ICloudStorageAccessToken storageToken = storage.Open(config1, cred);
this error:

{System.NotImplementedException: the Method or task is not implemented.
   bei System.Net.Browser.BrowserHttpWebRequest.set_AllowAutoRedirect(Boolean value)
   bei AppLimit.CloudComputing.SharpBox.Common.Net.Web.Http.HttpService.CreateBasicWebRequest(Uri uri, Boolean bAllowStreamBuffering)
   bei AppLimit.CloudComputing.SharpBox.Common.Net.Web.WebRequestService.CreateWebRequest(String url, String method, ICredentials credentials, Boolean bAllowStreamBuffering, Object context, CreateWebRequestPreparationCallback callback)
   bei AppLimit.CloudComputing.SharpBox.Common.Net.Web.Dav.DavService.CreateWebRequest(String url, String method, ICredentials credentials, Boolean bAllowStreamBuffering, Object context)
   bei AppLimit.CloudComputing.SharpBox.Common.Net.Web.WebRequestService.PerformSimpleWebCall(String url, String method, ICredentials credentials, Stream content, Object context, Int32& code, WebException& errorInfo)
   bei AppLimit.CloudComputing.SharpBox.Common.Net.Web.WebRequestService.PerformSimpleWebCall(String url, String method, ICredentials credentials, Object context, Int32& code, WebException& errorInfo)
   bei AppLimit.CloudComputing.SharpBox.StorageProvider.WebDav.Logic.WebDavStorageProviderService.CreateSession(ICloudStorageAccessToken token, ICloudStorageConfiguration configuration)
   bei AppLimit.CloudComputing.SharpBox.StorageProvider.GenericStorageProvider.Open(ICloudStorageConfiguration configuration, ICloudStorageAccessToken token)
   bei AppLimit.CloudComputing.SharpBox.CloudStorage.Open(ICloudStorageConfiguration configuration, ICloudStorageAccessToken token)
   bei LocalFileBrowser.MainPage.Image_MouseLeftButtonUp(Object sender, MouseButtonEventArgs e)}


Any code sample will be appreciated. Thanks in advance
Siegfried