.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

Exception when login with sa in Object Explorer within MSSM Studio

Posted By:      Posted Date: August 28, 2010    Points: 0   Category :Sql Server
Has anyone got an idea what might have caused the following. I have been able to login using SQL Server Authentication using the sa account with no problems within the object explorer. Not sure why I get an error (see below) when I try and login today. I can use the sa account via VS2010 IDE to connect to SQL Server, I can use sa account going via Database Engine Query within MSSM Studio, which uses the same SQL Server Authentication dialog. But when trying to connect via Object Explorer I get the following error. TITLE: Connect to Server ------------------------------ Cannot connect to --------- ------------------------------ ADDITIONAL INFORMATION: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) ------------------------------ A severe error occurred on the current command.  The results, if any, should be discarded. A severe error occurred on the current command.  The results, if any, should be discarded. (Microsoft SQL Server, Error: 0) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=0&LinkId=20476 ------------------------------ BUTTONS: OK ------------------------------ The Event Log gives an error of: A user request from the session with SPID 51 generated a fatal exception. SQL Server is terminating this session. Contact Produc

View Complete Post

More Related Resource Links

Team System: Building a Visual Studio Team Explorer Extension


There's no magic behind how the TFS Power Tools were integrated with Team Explorer, and we'll show you how to expose your own custom features inside the Team Explorer window.

Brian A. Randell, Marcel de Vries

MSDN Magazine December 2009

Login database with visual studio 2010 asp website template


Has anyone deployed a website using the login database in the visual studio 2010 asp website template? I was wondering if I could look at someone's example to see how the integrated this into their website.

Null Reference Exception was not handled by user Object Reference not set to instance of an object

using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Security.Principal;using System.Data;using System.Data.SqlClient;using System.Windows;using System.Collections; public partial class Default2 : System.Web.UI.Page{    protected void Page_Load(object sender, EventArgs e)    {     }    private bool tableCopied = false;    private DataTable originalDataTable;     protected void GridView2_RowDataBound(object sender, GridViewRowEventArgs e)    {         if (e.Row.RowType == DataControlRowType.DataRow)        {            //string sValue = e.Row.Cells[3].Text;             if (!tableCopied)            {                originalDataTable = ((System.Data.DataRowView)e.Row.DataItem).Row.Table.Copy();                ViewState["originalDataTable"] = originalDataTable;      &nbs

Configuring SQL Express -- getting login failed exception

I have a machine with Windows XP Pro w/SP 2, IIS, SQL Server Express and Visual Studio 2005 installed.  When I attempt to open a database from an ASPX page, I'm getting an exception with the message: "Cannot open database "Tasks" requested by the login. The login failed.Login failed for user 'MYDEV\ASPNET'." I've searched the web and found a number of pages that talk about the "Login failed for MACHINE\ASPNET" issue, but I didn't find any with a solution.  For your information (in case it makes any difference), the computer is connected to a domain.  And the authentication methods for the virtual directory (in IIS) is configured for "Anonymous access" and "Integrated Windows authentication." Does anyone know how to configure SQL Server Express (or is it IIS?) so the web page can access the database? RichardR  

Login error - Object reference not set to an instance of an object.

Hi all,I've set up the login section as a user control. WheneverI log in I get a "Object reference not set to an instance of an object", with the code stopping on this line: if (Membership.ValidateUser(txtUserName.Text,txtPassword.Text))Can anyone tell me how to fix this please?protected void LoginButton_Click(object sender, EventArgs e) { TextBox txtUserName = loggedin.FindControl("UserName") as TextBox; TextBox txtPassword = loggedin.FindControl("Password") as TextBox; CheckBox ckbRememberMe = loggedin.FindControl("RememberMe") as CheckBox; if (Membership.ValidateUser(txtUserName.Text,txtPassword.Text)) { FormsAuthentication.RedirectFromLoginPage(txtUserName.Text, ckbRememberMe.Checked); } else { // Msg.Text = "Login failed. Please check your user name and password and try again."; } } <asp:LoginView ID="loggedin" runat="server"> <AnonymousTemplate> <asp:Login ID="Login1" runat="server"> <LayoutTemplate> <table id="mainbox" width="400"> <tr> <td width="150" class="label">

Installing SharePoint 2010 with SQL Server 2008 - SQL Exception - Login Failed

Hello I've been trying to install SharePoint 2010 with SQL Server 2008 in my Windows Server 2008 R2 box. I've got the same error all the times. System Specifications Windows Server 2008 R2 SQL Server 2008 with SP1 SharePoint 2010 Enterprise 6GB RAM, 320GB HDD Installation Steps I followed Installed Windows Server 2008 R2 and joined it to our domain Logged in as domain administrator Installed SQL Server 2008 Selected the Local Service account for all the SQL Server 2008 services during installation Selected Mixed mode authentication Selected 'Add Current User' in all the other installation screens Installed SQL Server 2008 SP1 Installed SharePoint 2010 Selected Farm option Selected Complete Installation Tried to run the configuration wizard and got sqlexception error - login failed But i checked that the current user (domain admin) is having all the permissions. Also added the domain admin as Security Admin and DB Creator in SQL Server instance. Any ideas?  Regards NLV Visit SharePoint User group - India

Server Explorer not showing up on Visual Studio

I tried to do the following : select View, Server Explorer from the menu but still it does not show up.  I also reset my settings, still no success.  Please suggest.  

Ignore exception made by COM object?

Hi, I have third party COM object that I reference into my project. My project was simple console application which source code similar like code below: static void Main(string[] args) { try{ object _comObject = new ComObject(); // do some stuff with _comObject. while (Marshal.ReleaseComObject(_comObject) > 0) { } _comObject = null; } catch { } } I have put try..catch wrap around my Main function and also release COM resources that lock by object. But still COM throw an exception of Invalid Window Handle and made my application to stuck until user click the OK button on error message. Now the problem was why the try..catch not function, if there any exception throw by COM object it should catch by try..catch block. So this point the COM error raised after the try..catch block which mean the exception raised after my application send closed signal to OS. And the bad news is the COM exception is under my application and it made my application stuck (not closed) until the error dialog is closed. I don't want the exception to show up (made my application stuck), that's why I wrap my Main function with try..catch. I just need my application closed. Is there any way to unload the referenced COM library just before application closed (like DllUnload on Native programming), so I can wrap it with try..catch to ignore exception message that made by COM objec

An exception occurred when trying to issue security token: The trusted login provider did not supply

We are facing the issue after got authenticated by OpenID and forwarded back to Sharepoint, it crashed at the /_trust/ page the error "Operation is not valid due to the current state of the object." and event log shows this:   "An exception occurred when trying to issue security token: The trusted login provider did not supply a token accepted by this farm... "    

SharePoint 2010 : Creating SPSite object throws exception FileNotFoundException

We are in a process of upgrading from SharePoint 2007 to SharePoint 2010. I had written a Service which runs under default web site on the SharePoint web server. This service's app pool account uses the farm admin account. The service was working with no issue on SharePoint 2007 x64bit server. When I installed and run the same service on SharePoint 2010 x64bit box. I get the FileNotFoundException on SPSite site = new SPSite(http://myserver/sites/projects/project01); I have given the pool account running this server following rights: The Farm Admin The Site Collection Admin The Database Sys Admin The Local Admin No Luck. Thank you in advance for your help.

Exception when access to sharepoint by Client Object Model


Hello ,

  - I have a windows Application .

  - In the  Form  load , I write the following code to aceess sharepoint site :

      ClientContext clientContext = new ClientContext("URL");

     Web site = clientContext.Web;



    MessageBox.Show("Title: {0}", site.Title);

  The following exception happened when execute query :

         "The re

Why is 2005 EM -- Object explorer, programmability, tables locksup?

Why is 2005 EM -- Object explorer, programmability, tables locks up while rebuild index job on that database running?

Exception Details: System.NullReferenceException: Object reference not set to an instance of an obje


Hi, i have a Problem, i made a ASP.NET Page with VS2010 and now i want to run it on a iis6 (windows server 2003) and i get the message:

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.


Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.


Source Error:


An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]

   Bestellung.Bestellung.ImageButton1_Click(Object sender, ImageClickEventArgs e) in D:\foo.aspx.cs:71

   System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +115

   System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +120

   System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10

   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13


Unable to login using Management Studio




I installed SQL Server 2005 Express Edition - not Surface Area manager or any other tool - and the default server ./SQLExpress is created but I am unable to login using my Windows domain account. The service is started using the local account.

This is the message.


Testing the registered server failed. Verify the server name, login credentials, and database, and then click Test again.

Additional information :

This version of Microsoft SQL Server Management Studio Express can only be used to connect to SQL Server 2000 and SQL Server 2005 servers.(Microsoft.SqlServer.Express.ConnectionDlg)



I am able to login using ‘sqlcmd –S./SQLEXPRESS’ command .


Original_login       Effective_login      Db_user

-------------------- -----------------

SSRS 2008 formatting issue - different in visual studio preview/pdf/excel vs. internet explorer


The formatting of the report is perfect when viewed in Visual studio and also after exporting it to pdf or excel. But when I deployed my solution and opened it on IE/Firefox there is a lot of problem in formatting. Specifically the row height is giving me a problem. I manually entered them to be 0.1in and made the CanGrow field as false to force that row height but some rows in the tablix expand ( to 0.15in, which is the height of my header). This is true for a matrix as well. Is there is a feature to lock the row height in IE o any other web browser?


Cannot create database diagrams for sqlexpress .mdf file in Visual studio server explorer



I've look around the forums but I can't get the solution for my problem. I've installed Visual studio 2010 with sqlexpress edition. Then I have renamed my computer. After renaming my computer I've deleted the directory C:\Users\uporabnik\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS. After restart, I have started VS2010, open Server explorer and I've added the connection to a new database. I've been able to add new tabels, bu when I've tried to add a diagram, it didn't work. In properties window od the database I saw, the the database owner was oldComputerName\username not newComputerName\userName. In sql server management studio I've reanmed the user oldComputerName\userName to newComputerName\userName. After attaching the database it worked fine.

I've returned to Visual studio 2010. When creating new database, the owner of new database is oldComputerName\userName. The next tip was renaming the  SQLServerMSSQLUser$ComputerName$SQLEXPRESS(and other names with sql...) in Local Users and gorups in Mange My computer. After restarting the compter I've got the same result. When creating new .mdf file in server explorer of visual studio, the database owner is oldComputerName\userName.<

Object Explorer/Server Explorer Error

I have just installed the released VS2005 as well as the released SQL2005.  When ever I try to browse my SQL Server with either the Object Explorer in MS SQL Server Management Studio or the Server Explorer in VS2005 I get the following error:

Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.VisualStudio.OLE.Interop.IServiceProvider'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{6D5140C1-7436-11CE-8034-00AA006009FA}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

Does any one have possible solutions for me? Any help would be greatly appreciated.


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