Thursday, May 8, 2014

Resolved - The ‘IdentityAndAccessVSPackage’ package did not load correctly OR SetSite failed for package [IdentityAndAccessVSPackage]


Yesterday I was trying to configure my application for Azure ACS and I was not able to find the option “Identity and Access…” for my web role application.
To get this menu option enabled for a web site, web role project  you need to install Identity and AccessTool.

This tool can be installed for Visual Studio 2012 from the link or it can be installed as a part of Extension and Updates from visual studio 2012.


 
I installed it and restarted visual studio got below mentioned error –
The ‘IdentityAndAccessVSPackage’ package did not load correctly

When I went to the location mentioned in above screenshot found following specific error –
SetSite failed for package [IdentityAndAccessVSPackage]
Following are the steps to be taken to resolve the error –
1.     Uninstall IdentityAndAccessVSPackage if already installed. This can be uninstalled from Extension and Updates menu as shown below.



2.     Change the framework to 4.5 for web project. Currently 4 or 4.5.1 will not work.



3.     Install WIF SDK from the link –
Make sure to install 3.5 and 4 version of WIF SDK.




Once all of the above steps are performed you can see the option of “Identity and Access as shown below –


Hope this helps.
Cheers…
Happy Accessing!!!

Wednesday, May 7, 2014

Assign user to single database in Azure SQL Database


Security is vast topic in case of SQL Azure. In this post I will explain simple steps required to create user, assign db owner role to that user specific to single Azure SQL DB.

The advantage is, you don’t have to use admin credentials of Azure SQL DB server. Also the new use will not have any access to master database and hence accidental changes to other database are avoided.  

First login to Azure SQL management portal. Login to SQL Azure management portal using credentials of user which has access to master database. Such user can be server administrator for Azure SQL.

Then create a sample database. I will name it as “MyDB”. Now I need to create a user in such a way that it will have permission to perform any operation on MyDB only. So same user credentials can be used in applications connecting to SQL Azure.

Steps are as follows –


Create Login in master database query window.
Create Login kunal WITH PASSWORD = ‘yourPassword’ 

Create user in query window of MyDB database from above created login.
Create User kunalasuser FROM LOGIN kunal