Azure Service Bus DNX Core support - azure

UPDATE: DNX does not exist anymore. Please ignore this question.
Current WindowsAzure.ServiceBus (3.0.4) nuget package (http://nuget-preprod-0-v2gallery.cloudapp.net/packages/WindowsAzure.ServiceBus/) requires .NET Framework 4.5 Full Profile and it is not usable with an application build specifically to use DNX Core.
As I understand, the only way to build such application at this moment is to use REST API.
What is the recommended way to include authentication information to requests? Do we have any open source nuget to handle it or should the SAS token creation be implemented by each developer? Links to the REST API authentication samples are broken.
While the Service Bus nuget package is not open sourced, do we have any active channels to reach the developers to find out if they have any plans to support DNX Core and we should not use REST API because the library update is coming soon?

The REST URL to publish a message on Queue/Topic will be like,
http{s}://{serviceNamespace}.servicebus.windows.net/{queuePath|topicPath}/messages
The authorization SAS Token has to be part of the request header
For further read, REST Run-Time APIs

It's also possible by using the AMQP protocol. I recently used AMQP to communicate with an Azure IoTHubClient, all in a DNXCore5.0 project. I used the AMQPNetLite Library to do so, it also has Service Bus Examples!

(Reposting as my prior answer was erroneously deleted by the moderators.)
Microsoft now provides a .NET core version of this library. I am shipping a .NET Core app on Linux that calls it.
https://github.com/azure/azure-service-bus-dotnet
Announcement post:
https://blogs.msdn.microsoft.com/servicebus/2016/12/20/service-bus-net-standard-and-open-source/

Related

How to use RedisTimeSeries module in Azure Cache for Redis?

I would like to use RedisTimeSeries module (latest feature) in Redis from .net core client in Azure.
I created Azure Cache for Redis (from RedisLabs) (https://azure.microsoft.com/en-us/services/cache/) standard resource in the Azure portal.
Downloaded the .net redis samples code from https://github.com/rustd/RedisSamples.
When I compiled samples code, it downloaded the nuget package called StackExchange.Redis (among other libraries).
Played with samples to understand how redis works from .net client.
It appears that raw REDIS commands where wrapped by StackExchange.Redis library.
Next, I wanted to play with RedisTimeSeries (as described at https://github.com/RedisTimeSeries/RedisTimeSeries).
The StackExchange.Redis .net library does not seem to provide any API to invoke RedisTimeSeries module related commands such as TS.CREATE, TS.ADD etc.
Here are my questions:
Is RedisTimeSeries module supported in Azure Cache for Redis (from RedisLabs)?
If supported, how do I invoke TS related commands from my .net core client?
If not supported, is there any other .net library that lets me do this?
Is RedisTimeSeries module supported in Azure Cache for Redis (from RedisLabs)?
Azure Cache for Redis, is not from RedisLabs but from MS, the only Redis vendor who currently supports Modules deployments is RedisLabs Cloud Pro (see: https://redislabs.com/redis-enterprise/deployments/ and https://redislabs.com/partner/microsoft/)
If supported, how do I invoke TS related commands from my .net core client?
DbSync.Execute("MyCommand", args)
It is coming soon on Azure Redis, see redis enterprise features on azure cache for redis coming soon
Enterprise tier will support RedisTimeSeries
RedisTimeSeries has been GA in Azure Cache for Redis, Enterprise Tier, since March 2021.
NRedisTimeSeries the recommended .Net client for RedisTimeSeries

Was BlobEncryptionPolicy removed for azure storage?

I'm trying to use client side encryption for azure to securely upload files to blob storage in .NET,
However it seems that BlobEncryptionPolicy is not available and I have not seen any documentation specifying alternative solutions from microsoft.
Even their documentation still uses BlobEncryptionPolicy:
Client-Side Encryption and Azure Key Vault for Microsoft Azure Storage
Specifically i'm inside of a xamarin project using the latest .net version.
If i create a sample console app, I can reference BlobEncryptionPolicy without any issues. However the same nuget package inside a xamarin shared project can not resolve the reference to BlobEncryptionPolicy under the Microsoft.WindowsAzure.Storage.Blob namespace.
Does anyone know what is going on here?
There are some differences between Microsoft.WindowsAzure.Storage package depending on .net core and the one depending on .net framework.
You may have developed your Xamarin project based on .net core, where BlobEncryptionPolicy is not supported(this method doesn't exist in the dll).
As when you create a console app(.net framework), you can use the encryption. If you build a console app(.net core), you will find no such method as well.
An open issue on github about this, saying the encryption for .net core is coming soon.
You can change your targetframework to use it if .net core is not necessary for your development.

Failed to install Microsoft.Azure.Mobile.Server.Authentication into Xamarin Forms

I'm trying to add / install Microsoft.Azure.Mobile.Server.Authentication into my PCL project but there is an error says
Could not install package 'Microsoft.Azure.Mobile.Server 2.0.0'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile49', but the package does not contain any assembly references or content files that are compatible with that framework.
I've tried installing the previous version, but the exact same error appeared. I've also tried to changing Framework version to .NET 4.6, but other errors come up.
I want to use GetAppServiceIdentityAsync() method which only supported by that namespace. Is there any other way to add that reference into my PCL project?
As I known, GetAppServiceIdentityAsync is used to retrieve the Identity (ProviderCredentials) for the specific provider in your server-side code. For your mobile client, I assumed that you could leverage MobileServiceClient.InvokeApiAsync<List<AppServiceIdentity>>("/.auth/me"); to retrieve the identities and filter them with the specific provider, them you could get Provider, UserId and UserClaims properties as you expected. For more details, you could refer to Obtaining User Claims.
Azure Mobile Apps has two versions - one that runs on the server and the other runs on the client. You are trying to use the server version and that requires ASP.NET and .NET Framework 4.5+ (4.6 at the moment). It won't work in your client.
If you are using Azure Mobile Apps on the server, then you have already added a referenced to Microsoft.Azure.Mobile.Client and created a mobile client reference to your Azure App Service. You have also already configured your Azure Mobile Apps Server and linked your auth provider using Azure App Service Authentication. If you haven't, check out the book http://aka.ms/zumobook - this will give you the right instruction on this.
If you are still with me, you then need to do a HTTPS connection to your Azure App Service URL + /.auth/me - this returns a JSON blob which contains the provider information that Azure App Service Authentication knows about. One of the things that the service knows about is the auth token used to authenticate. You can then use this auth token to get additional information about the user if it isn't in the JSON blob.
A great way to get that information is to use the client.InvokeApiAsync<>() method as Bruce mentioned. This is covered in the book as well.
Have you tried to set the Android API Level to a higher level? I had this error by installing Moq and I could solve this problem with changing the Android API Level to the highest API level. Please try to use Android 7.1 (Nougat) with API-Level 25, also at the minimum SDK.
You can change it with: Right click on the project -> Options -> Build -> General -> Android Application
Under General you can also try to change the target version for the app to a higher level.

Can I build an azure service bus client and server app using .NET 3.5?

My application must be .net 3.5. I would like to use the azure service bus relay to facilitate machine to machine communication. All examples that i find require .NET 4.0 (NuGet Package). Does anyone know for sure if i can use .net 3.5 or am i wasting my time evaluating azure?
You can also use the REST API and simply use the WebClient class to interact with the service bus. Note that not all features are supported by the REST API.
We do have a Service Bus client SDK targeting .NET 35: http://www.microsoft.com/en-us/download/details.aspx?id=19925
You can install the SDK MSI and then use the Microsoft.ServiceBus.dll included there. Do note that this msi will modify some settings in your machine.config etc.

Using Windows Azure Service Bus From Silverlight

Is it possible to call services hosted on the Service Bus from a Silverlight application? I tried googling around but none of the results helped.
Looking at the samples (EchoService) they are using a specific microsoft DLL to setup the authentication for the service. I cannot seem to add this DLL to my project (duh it is for the full CLR) and am not sure how to replicate its behaviour while on the client side.
Thank you for your help.
You can use it. You have to host a cross access policy file service on the service bus (a service that serves this file) An example of a service that does this is given on Clemens Vaster's blog. (just google it, it's on the msdn site) It is included with the reverse web proxy.
You have to use queued the rest APIs. Refer to the Http queue example included with the SDK.
Note that with Silverlight, you'll have to make use of the async libraries.
I've looked at the November 2008 CTP code and getting the EchoService client to work from Silverlight is highly unlikely due to the dependancy on the NetTcpRelayBinding and Silverlight's limited TCP support.
I suggest getting your Silverlight client to call a back-end service that you control and proxy the requests to the Azure platform. Not an ideal solution, but a workaround for now.
Update: The Azure Service Bus is now accessible from Silverlight using REST API calls. See http://msdn.microsoft.com/en-us/library/ff797957.aspx for more information.

Resources