System.TypeException: You are already logged in - salesforce

I am trying to create portal user by using:
Site.createPortalUser(u, account.Id,'Sep#2012',true); method.
But i am getting the type exception:
"System.TypeException: You are already logged in".
I am testing with system admin profile.
Could any one please suggest what to do to resolve the issue.

This is because you are testing the community by Admin profile.
Solution is you should open the community page on an incognito browser so that you are accessing the page as a real Guest user.

Related

Unable to login to Azure Portal

I'm unable to login to my own subscription. When I try to login the page shows next error: "Your account has been locked. Contact your support person to unlock it, then try again.". The URL of this page looks like https://login.microsoftonline.com/[ANOTHERORG].onmicrosoft.com/oauth2/..., but I do not work in ANOTHERORG anymore and I want to login into my own subscription.
The ID of my own subscription should be f77b7b54-c38f-44e0-a471-95a4914cf742. I tried to login multiple times from incognito windows of different browsers and for some reason it tries to login into ANOTHERORG instead of my own. BTW, I used the same email address to login into ANOTHERORG and my own so I do not understand what the problem is, I think Azure should suggest to select which subscription I want to login to. How can the problem could be solved? How can I login into f77b7b54-c38f-44e0-a471-95a4914cf742 ?
Also I'm unable to create issue using https://azure.microsoft.com/en-us/support/create-ticket/ because of the same problem: it tries to login to ANOTHERORG which I do not have access anymore
I hope people from Microsoft are read questions on stackoverflow and will help to solve my problem
Finally I was able to find solution: I opened link https://portal.azure.com/#blade/Microsoft_Azure_Billing/SubscriptionsBlade which was mentioned in https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/troubleshoot-sign-in-issue. From here I was able to change my default directory (Switch Directory -> Set your default directory dropdown). Now when I open portal.azure.com it opens my own subscription without an issue.

Every user is logged in as the admin user whatever the user role/username

I have a serious login problem with my new (and first ever) Drupal 7 site.
I have two different users so far, which of one is the admin which was created while installing Drupal. If, I log in with the other user's username and password, still, the hovering admin menu will and the menu shows the username of the admin user. This happens, if I log in to both accounts from the same computer, but now I tested the non-admin account from a computer that have never been used to log in the particular site before, and the problem
I am using the current 7.34 core of Drupal 7. The login module is the built-in one of the core.
How is this possible and what can be done about it?
Remove cookies from your browser for this site
Make sure your second user has not admin role.

Drupal user redirected to MoneyScript checkout page after registration

We are registering users in our Drupal system via REST services call from 3rd party system.
What happens is that the user is redirected to "ms/checkout" after successful registration and gets a 403-Forbidden message. Any thoughts on why this might be happening and how to fix this?
May be its issue of permission. Go to Permissions page and allow annonymous user to access Cart, Checkout page.

Unable to set Read-Write permission for twitter app

I'm stuck in a weird issue while creating a twitter app.
Here i'm supposed to build an app with read-write permission through Twitter's Application Management service ( ridiculous service actually :/ ).
So i've created an app so far. But the problem is that, When i'm trying to set the "Read and Write" permission through Permission tab, It's throwing an error saying,
"You must add your mobile phone to your Twitter profile before granting your application write capabilities. Please read https://support.twitter.com/articles/110250-adding-your-mobile-number-to-your-account-via-web for more information"
Then if try i to add a mobile number through my twitter profile,
Again it's throwing an error saying,
"Sorry, we don't have a connection to your carrier yet!"
P.S. I've tried all the major carriers e.g., Idea, Vodafone, BSNL, DOCOMO.
so, plz help me get rid of this issue by any way.
There is workaround for this problem.
Install Twitter android app in your mobile
Login to your account
Under the options menu, select Settings and then select your account
Now select Security, this will prompt you to add phone number, then click OK.
You will be redirected to a browser page, enter your mobile number there and save.
Now you can go back to your account in normal desktop browser and change the access level settings to read and write.
Cheers!
Thanks for your great efforts guys.
But, It's already fixed by the twitter's own development team for me.

SharePoint 2013 Unauthorized exception for provider-hosted Apps

I receive "Unauthorized" exception on the host side for a provider-hosted App for SharePoint 2013.
Uri hostWeb = new Uri(Request.QueryString["SPHostUrl"]);
using (var clientContext = TokenHelper.GetS2SClientContextWithWindowsIdentity(hostWeb, Request.LogonUserIdentity))
{
clientContext.Load(clientContext.Web, web => web.Title);
clientContext.ExecuteQuery();
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}
Certificates were installed, Anonymos access was disabled. I can't understand the reason of this problem.
I have ran into the exact same problem before... i resolved it by implementing OAuth and have it redirect to the app main page with "write" permission.
Response.Redirect(TokenHelper.GetAuthorizationUrl("mysharepoint.com", "Web.Write", "myapp.com/default.aspx"));
Basically what this does is that it'll authentication the login user with your sharepoint site, once it's authenticated, it'll redirect (with write permission) to your app site.
Here is how to implement OAuth: http://msdn.microsoft.com/en-us/library/office/jj687470(v=office.15).aspx
Looks like this is High Trust App. If you have exhausted the tips at http://msdn.microsoft.com/en-us/library/fp179932.aspx, then there is an illformed SPTrustedSecurityTokenIssuer. You can find out all of them using the below PS. Ideally it should be IssuerId#Realm. If there is one which is not, then remove that. But remember not to remove first one which is for workflows
Get-SPTrustedSecurityTokenIssuer | select Name,RegisteredIssuerName
First you have to Check user in 'Request.LogonUserIdentity'. actually this happens when your user does not have access to your site in IIS.
so to set the correct user in 'Request.LogonUserIdentity' follow the below steps:
open your IIS --> Authentication -->Anonymous Authentication --> edit--> Specific user [ User which you get in 'Request.LogonUserIdentity']. --> iisreset
now user have permission to access your IIS site.

Resources