Xamarin.Android将GCM推送到Azure通知中心(Xamarin.Android push notifications GCM to Azure Notification Hub)
我有一个Xamarin.Android应用程序,我使用此Xamarin指南为GCM配置该应用程序能够以这种方式接收通知。 但是,当我将GCM API密钥放在通知集线器中,并通过Azure发送通知时,它未在应用程序中收到。
该应用程序向GCM注册。 我是否需要在Azure Notification Hub中注册? 如果有,怎么样?
I have a Xamarin.Android application that I've configured for GCM using this Xamarin guide The app is able to receive the notifications this way. BUT, when I put the GCM API key in notification Hub, and send the notification via Azure, its not received in the app.
The app registers with GCM. Do I need to register with Azure Notification Hub? If yes, how?
原文:https://stackoverflow.com/questions/32580359
最满意答案
原来这是一个网址冲突。
ajax调用正在访问一个url,我们称之为some.domain / stats
托管服务提供商提供受密码保护的免费统计页面。 它的网址也是some.domain / stats
当我的应用程序访问some.domain / stats,通过一些奇怪的路由我不明白,我被导向密码保护的。
当我更改url时,ajax调用正在访问类似some.domain / nameOtherThanStats的内容,然后一切正常。
不需要进行htaccess更改。
turns out this was a url conflict.
the ajax call was accessing a url, let's call it some.domain/stats
the hosting provider offers a free Statistics page that is password protected. its url is also some.domain/stats
when my app accessed some.domain/stats, thru some weird routing I don't understand, I was directed to the password protected one.
when i changed the url the ajax call was accessing to something like some.domain/nameOtherThanStats then everything worked fine.
no htaccess changes needed.
相关问答
更多-
常见的错误是使用默认(HTTPS)而不是SSH进行克隆。 您可以通过访问您的存储库来更正此问题,单击URL字段左侧的ssh按钮,并更新源远程站点的URL,如下所示: git remote set-url origin git@github.com:username/repo.git A common mistake is cloning using the default (HTTPS) instead of SSH. You can correct this by going to your repos ...
-
需要用户名和密码(require username and password)[2024-03-24]
您正在寻找的关键字是: htaccess , htpasswd , .htaccess 。 (假设你使用apache) 最终,您将.htaccess文件放在要保护的目录中,并让它使用您的htpasswd文件检查要求。 例如:在我的服务器上,我不希望人们看到我的private目录。 $ sudo htpasswd -c /etc/apache2/.htpasswd benjamin 请注意 ,上述命令中的benjamin是我们将用于登录的用户名。 我们希望我们的webfolder外部的.htpasswd文件 ... -
如何在Node.js中调用需要用户名和密码的API(How to call API that requires user name and password, in Node.js)[2023-01-08]
IBM Watson的Retrieve和Rank服务API使用基本身份验证。 方法有几种,其中之一 - 使用模块request : var url = "https://gateway.watsonplatform.net/retrieve-and-rank/api/v1/solr_clusters/sc1ca23733_faa8_49ce_b3b6_dc3e193264c6/solr/example_collection/select?q=what%20is%20the%20basic%20mechani ... -
如果您使用请求参数,则必须附加到URL $scope.formSubmit=function(){ alert("submitted") return $http({ url :'loginSubmit?username='+$scope.username+'&password='+$scope.password , method : "POST", }).success(function(data, stat ...
-
我不是安全专家,我没有做过任何年龄的.NET开发(因此信息可能已经过时),但这里有一些可能对您有所帮助的想法/建议。 将密码硬编码为类中的字符串 不要那样做。 您的源代码是版本控制(TFS,Git,无论如何),因此将是用户名/密码,从您签入代码的那一刻起,每个开发人员都可以看到...永远。 为了保护对用户名/密码的访问,您现在必须安全地访问源存储库。 我想所有开发人员都需要访问源代码,但并不是所有人都需要知道用户名/密码。 将密码存储在数据库中 根据您的个人资料,我假设您使用SQL服务器? 如果要继续该路径 ...
-
我不确定该网站上的授权是如何设置的,但通常,当您登录时,他们会将某种访问令牌作为cookie提供,您可以使用该访问权限访问该网站中的任何其他页面。 因此,使用curl使用用户名和密码登录登录页面,抓取cookie,然后再次卷曲到所需的页面。 同样,这一切都取决于您尝试访问的网站。 您必须进行一些挖掘以找出登录的位置以及它们如何进行身份验证/授权。 I'm not sure exactly how the authorization is set up on that site, but usually, w ...
-
如何连接到Angular 2需要用户名和密码的API(How to connect to an API that requires a username and password with Angular 2)[2023-10-07]
如果您的api使用基本身份验证,您可以将Authorization标头传递给请求,如下所示。 let username : string = 'myuser'; let password : string = 'mypass'; let headers = new Headers(); headers.append("Authorization", "Basic " + btoa(username + ":" + password)); head ... -
自从第19版以来,这似乎是 Chrome的故意行为。 游民。 This appears to be intentional behavior on Chrome's part since v19. Bummer.
-
原来这是一个网址冲突。 ajax调用正在访问一个url,我们称之为some.domain / stats 托管服务提供商提供受密码保护的免费统计页面。 它的网址也是some.domain / stats 当我的应用程序访问some.domain / stats,通过一些奇怪的路由我不明白,我被导向密码保护的。 当我更改url时,ajax调用正在访问类似some.domain / nameOtherThanStats的内容,然后一切正常。 不需要进行htaccess更改。 turns out this was ...
-
应用程序中的服务器localhost:3000需要用户名和密码(The server localhost:3000 at Application requires a username and password)[2023-04-15]
使用Devise gem将未经身份验证的用户重定向到登录操作时,我遇到了同样的问题。 仅从某些Internet Explorer用户报告此问题。 我相信IE会尝试自动显示对话框的身份验证。 解决方案是要求用户访问登录URL而不是应用程序URL。 例如,要求用户访问网址http://www.myapp.com/login ,而不是访问网址http://www.myapp.com/ 。 如果有帮助,请告诉我! It turns out the issue was caused by a security pat ...