.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Ophaned Logins after restore - Exec sp_change_users_login - The Login name is absent or invalid

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :


Did the restore. made sure I could access the new db with sa.. no

See some orphan logins that don't work (expected)..

did this to report them:


Exec sp_change_users_login 'REPORT'


two reported.


did this on one of them:


Exec sp_change_users_login 'Update_One', 'xxxx', 'xxxx'


But got error:

Msg 15291, Level 16, State 1, Procedure sp_change_users_login, Line
131 Terminating this procedure. The Login name 'xxxx' is absent or


Also, There are users that access the old DB with their Windows User
name or AD name. I don't see them in the user access list for the db
and can't seem to map them to some of the AD groups that have access.


Is there any way to report exactly with what AD group a user was able
to access a DB? There isn't any setting that would allow everybody in
a domain to access a db without an AD group right?


Thanks for any help or information.

View Complete Post

More Related Resource Links

Multiple Windows Authentication options on login after Web App restore

Hi I have a question regarding SharePoint Foundation 2010 and backup / restore jobs... I'm doing nightly farm backups using PowerShell: Add-PsSnapin Microsoft.SharePoint.PowerShell Set-location $home Backup-SPFarm -Directory \\same-server\***** -BackupMethod Differential This morning I decided to try and restore a single web application, just to make sure it works. In Central Administration I selected the latest farm backup and then selected the node for the Web Application and choose restore (using option: Same configuration) because it's the same server. Restore process went fine, no failure messages, and I can see that it has restored the content I deleted for testing. BUT when I enter the site. I'm presented with a Login page (that you would see if you have also configured Forms Authentication for the same zone, which I have not) and the drop down box show two options: "Windows Authentication" and "Windows Authentication". Both let me use windows credentials to login so basically the login page is pointless and it wasn't there before. I should note: The Web Application was and is configured to use Claims Based Authentication and for Windows Authentication: Kerberos. Nothing for forms. Default sign in page. And I was never presented with this redundant login page before the restore. Anyone knows why this could be happening and how to solve it?? Than

Backup tools fro granular restore - Symantec BAckup Exec Problem

Dear all, we are facing a problem here. Our sys admin set up everything to run the farm backups. He is using Symanteck Backup Exec 2010. In that farm we have 3 web applications which represents 3 content databases on a separate SQL back-end machine. When the backup is done, the report tells the backup succeed. It happens that when we try to recover from the backups, we can recover from an item level from 2 of those web applications, but not from 1. It created the whole site backup, but we cannot dig in to recover an item or a subsite. Did anyone had this problem before? (I gave farm admin levels to the account used by Backup Exec to double check the rights. That user could log on to the site and indeed he could go to all subsites and all item levels. So it is not access I believe). Any other expiriences with this tool? What about other tools? We are having a demo of AvePoint soon. Does anyone worked with that before? Thanks in advance for any help. Regards, GoncaloGonçalo

ASP.NET 5.0: Multiple logins and login types in default ASP.NET membership provider

What do you think about an ability of having multiple logins and login types to be attached to the same user? Let me explain this by showing how database schema can be re-factored to support this model:Remove [Password], [PasswordSalt] columns from [Users] database tableAdd [Logins] table with one-to-many relationship between [Users] and [Logins] tablesThis will allow one user to have multiple credentials attached to his or her account of different types such as Username&Password, Windows Live ID, Open ID from different providersYou will be able to restrict allowed login types and OpenID providers in web.config So.. do you think it is a good idea to add support of this model into ASP.NET 4.5/5.0 membership service?http://aspnet.codeplex.com/workitem/7149

Backup Exec 2010 -MOSS 07 GRT Restore troubles

I was just curious if anyone else had trouble restoring documents from Backup Exec 2010 SP1 ?  I'm at a client and whenever they try to restore a document library to their portal, only the folder is restored and none of the contents. Re-directed restores to file shares work fine.  Symantec support says to upgrade to R2 to fix it, but that this is not a 'known issue'.  Funny, because they didn't troubleshoot long and had a quick fix ready to manually re-link the document to the site!!  Seems a little shady. I'm just wondering if this client has a unique issue or if anyone else out there has experienced this problem as well?  I'd like to warn our other clients with the MOSS 2007/ BUE 2010 combo if this is common. 

Restore/ Login issues



We are ruuning Server 2003 with SQL 2008

We have a database stuck in Recovery, which is not recovering.  We decided to retore from a backup but get the following message when requesting the retore (right click, database restore)


Failed to connect to server BRANDMG-CFE685E. (Microsoft.SqlServer.ConnectionInfo)

Program Location:

   at Microsoft.SqlServer.Management.Common.ConnectionManager.Connect()
   at Microsoft.SqlServer.Management.Common.ConnectionManager.PoolConnect()
   at Microsoft.SqlServer.Management.Common.ConnectionManager.get_ServerVersion()
   at Microsoft.SqlServer.Management.Common.ServerConnection.get_FixedServerRoles()
   at Microsoft.SqlServer.Management.Common.ServerConnection.IsInFixedServerRole(FixedServerRoles fixedServerRole)
   at Microsoft.SqlServer.Management.SqlMgmt.AgentAccess.CanUserAccessAgent(Server server, Boolean& isUserSa, Boolean& isMemberOfAgentOperatorRole, Boolean& isMemberOfAgentReaderRole, Boolean& isMemberOfAgentUserRole)
   at Microsoft.SqlServer.Management.SqlMgmt.LaunchForm.HasAgentAccess()
   at Microsoft.SqlServer.Management.SqlMgmt.LaunchForm.EnableRunType(RunType runType, Bo

invalid login attempt


I am using sql sk8 express edition where I have renamed sa user name for security purpose. But there are thousand of event viewer generate per mintue in the server. Its obvious that someone trying to find way in the server.

Login failed for user 'sa'. Reason: Could not find a login matching the name provided. [CLIENT: 65.xxx.xxx.202]

How can I block the specific IP to avoid generating million of event viewer in server ?

---- Tahir Khan --- -Exchange Solution Provider- -http://hostautomate.com

SQL Server Backup and Restore (video)

Restore your full backup, then run a few queries before you keep restoring transaction logs. Brent shows how to use the Standby option for restores.

In this five minute video, Brent demonstrates how to do it by creating a database, populating data, and then showing what disaster recovery is like by doing RESTORE WITH STANDBY.

I thought this would be simple... Trying to create a login does an ajax check before submit


I have the standard .net login control that is working.  (Still learning .net after 15yrs of classic)

What I want to do is OnButtonClick run a javascript function (to do an ajax call to the db to check if login is valid or not) and if it returns true, then submit the form normally, else don't submit. The piece that I can't figure out, is how to correctly override the default click even to hit my JS routine and then submit the form properly afterwards.

Thanks ahead of time

How to modify the login control



I'd like to record more information than the default control allows as well as perform actions with the input when the form is submitted but I'm having trouble figuring out how.

So firstly, if I want to record the middlename for example, how would I do that, and by default, where would it go if anywhere?
When the form is submitted, I'd like to take specific input, such as just the middlename for example, and write some linq to sql code to specify when and how it's stored.
In what event would I put this code?


create user wizard login error message dont show in a message box?




i am using create user wizard and capturing other information within content template when a new user

registers. Some of the textboxes are binded to required field validators.


there is a validation control on the page and ShowMessage box is True.

If they dont complete some of the text boxes then the message box pops Up with the error message.

It does not however include information errors like "User already exists" or Email address already exists

from the create user wizard membership  UserName and Password Textboxes


is it possilbe to hook all of these up so I get one message box with all errors including membership ones?




Using network login



Is anyone have sample code to set up log in page using network login?

For example: User Name(same as Network Login)

                     Password(Same as Network Login)

Your help is highly appreciated.



Hi All

VS2005, .Net 2.5

i have been building a website and testing it in google chrome, which has been working fine.

i am now testing it in IE and firefox and the asp:login doesnt work, it doesnt even post back when i click the 'login' button.

anyone and idea what might be going on? im not sure where to start, as i mentioned above the login works fine using google chrome.


Visual Web Developer 2010 Express "Copy Web Site" using different login


I created a site and am trying to grant another pesron access to upload changes to it without giving them my super-user login.

I made a login for her but I can't test whether it works or not because no matter how much I "disconnect" in the Copy Web Site page of VWD 2010, reconnecting to the same site always logs in as my superuser account without prompting me for a login again.

How do I test is the account it set up correctly before having her try to upload to it?    I want to force the login to remote site dialog to pop up again to test her account.

Any ideas?

Invalid length for a Base-64 char array for my coding in ASP.net C#. How to solve it ?


Hi Friends ,

I have done encrypted password and decode but i got error  like  this  " Invalid length for a Base-64 char array" .

Pls help . Thanks


psswd = txtPassword.Text;

pwed = base64Decode(psswd);

public string base64Decode(string sData)
            System.Text.UTF8Encoding encoder = new System.Text.UTF8Encoding();
            System.Text.Decoder utf8Decode = encoder.GetDecoder();
            byte[] todecode_byte = Convert.FromBase64String(sData);
            int charCount = utf8Decode.GetCharCount(todecode_byte, 0, todecode_byte.Length);
            char[] decoded_char = new char[charCount];
            utf8Decode.GetChars(todecode_byte, 0, todecode_byte.Length, decoded_char, 0);
            string result = new String(decoded_char); return result;

Login Adpater


I am having problems getting the adpaters to work.  The Whitepaper references a vsi to install but the link to download does not contain the vsi - just source for the CSSFriendly kit.  The kit is missing the css/import.css file also.

Anyway, I fumbled around and was able to get the menu working but I cannot figure out how to specify the css class for the login control.  With the CSSFriendlyAdparters.browser file in my project, I lost all styles and most of the features of the login control.  The menu uses cssselectorclass but I tried that server tag on the <asp:login> and it did not work.  The original cssclass attribute does not seem to do anything either.

Can someone point to some documentation on how to use these tags and integrate with the CSSFriendly.dll adpaters.

Thank you,


Desktop Security: Create Custom Login Experiences With Credential Providers For Windows Vista


Why is a change to the Windows logon plug-in interface so exciting? Because with credential providers you can customize the logon experience for your users.

Dan Griffin

MSDN Magazine January 2007

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend