When starting a new project that required the use of membership providers I found that I could not connect to a remote database that contained the membership database.
Here is the solution:
step 1: Launch Visual Studio command prompt Type: aspnet_regsql Specify your server: if sqlexpress then server = hostname\sqlexpress ***********Use Windows Authentication
step 2: Copy this to web config.Dont specify username or password because ur connecting with windows authentication that’s why we have integrated security =true.
step 3 : Change security>Authentication type on web administration tool to "From the Internet".
Enjoy now.