小编ste*_*tef的帖子

将 Azure 服务总线与 Android 连接

我编写了一个简单的 java 程序(jdk 1.7),它列出了我所有的服务总线主题并将每个主题的名称打印到标准输出:

         try {

         String namespace = "myservicebus"; // from azure portal
         String issuer = "owner";  // from azure portal
         String key = "asdjklasdjklasdjklasdjklasdjk";  // from azure portal

         Configuration config = ServiceBusConfiguration.configureWithWrapAuthentication(
                namespace, 
                issuer,
                key, 
                ".servicebus.windows.net", 
                "-sb.accesscontrol.windows.net/WRAPv0.9"); 

        ServiceBusContract service = ServiceBusService.create(config);
        ListTopicsResult result = service.listTopics();
        List<TopicInfo> infoList = result.getItems();
        for(TopicInfo info : infoList){
            System.out.println( info.getPath());
        }

    } catch (Exception e) {
        e.printStackTrace();
    }
Run Code Online (Sandbox Code Playgroud)

现在,我试图在一个简单的 android 项目(Android 4.2)中运行这个例子,但它不起作用。运行时总是抛出以下错误:

java.lang.RuntimeException: Service or property not registered:  com.microsoft.windowsazure.services.serviceBus.ServiceBusContract
Run Code Online (Sandbox Code Playgroud)

有没有人成功建立了从 android 设备(或模拟器)到 azure …

azure azure-java-sdk

5
推荐指数
1
解决办法
1576
查看次数

AzureB2C 身份提供商登录失败:AADB2C99002:用户不存在

我正在尝试 Azure AD B2C,并且我已通过 Azure 门户添加了 Google 和 Microsoft 身份提供商。

在此输入图像描述

当我尝试使用 Microsoft 或 Google IP 登录时,我总是在 OnAuthenticationFailed-Handler 中收到以下错误消息:

AADB2C99002: 用户不存在。请先注册,然后才能登录。

但是,当我使用 Azure B2C 提供的“本地帐户登录”时,一切正常。我的配置中是否缺少某些内容?

以下代码片段显示了我的 OWIN 配置。

   private void ConfigureAuthentication(IAppBuilder app)
    {
        app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType);

        app.UseCookieAuthentication(new CookieAuthenticationOptions());

        OpenIdConnectAuthenticationOptions options = new OpenIdConnectAuthenticationOptions
        {
            // These are standard OpenID Connect parameters, with values pulled from web.config
            ClientId = clientId,
            RedirectUri = redirectUri,
            PostLogoutRedirectUri = redirectUri,
            Notifications = new OpenIdConnectAuthenticationNotifications
            {
                AuthenticationFailed = OnAuthenticationFailed,
                RedirectToIdentityProvider = OnRedirectToIdentityProvider,
                AuthorizationCodeReceived = OnAuthorizationCodeReceived,
                SecurityTokenValidated = context => …
Run Code Online (Sandbox Code Playgroud)

c# azure azure-ad-b2c

2
推荐指数
1
解决办法
7767
查看次数

标签 统计

azure ×2

azure-ad-b2c ×1

azure-java-sdk ×1

c# ×1