Re: SQL Server does not exist or access denied.
From: William Ryan eMVP (dotnetguru_at_comcast.nospam.net)
Date: 05/10/04
- Next message: Nicholas Paldino [.NET/C# MVP]: "Re: SQL Server does not exist or access denied."
- Previous message: Justin Rogers: "Re: How can I find out if the cursor is over Selected Text?"
- In reply to: Andy Gaskell: "Re: SQL Server does not exist or access denied."
- Next in thread: Nicholas Paldino [.NET/C# MVP]: "Re: SQL Server does not exist or access denied."
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 10 May 2004 09:47:21 -0400
This is the code from the properties window that he posted:
Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=temp;Data Source=sysdev\vsdotnet;Use
Procedure for Prepare=1;Auto Translate=True;Packet
Size=4096;Workstation ID=SYSDEV;Use Encryption for Data=False;Tag with
column collation when possible=False
He may be using another one but I can't tell that for sure. If he was using
SSPI, that would explain why the username is seen in the exception but not
he connection string.
HTH,
Bill
www.devbuzz.com
www.knowdotnet.com
"Andy Gaskell" <pubb AT hotmail DOT com> wrote in message
news:#$9eypkNEHA.1312@TK2MSFTNGP12.phx.gbl...
> If you look at the exception text he's not using SSPI, correct?
>
> "conPubs = new
>
SqlConnection("Server=sysdev\vsdotnet;uid=bob;pwd=isgood;database=temp" );"
>
>
> "William Ryan eMVP" <dotnetguru@comcast.nospam.net> wrote in message
> news:%23BdEhKkNEHA.3348@TK2MSFTNGP09.phx.gbl...
> > you're using SSPI so you need to use the asp_net account and make sure
it
> > has permissions. Otherwise, change the context and pass in a valid
> username
> > and password for the db. Verify the asp account has the permissions
> granted
> > too.
> >
> > HTH,
> >
> > Bill
> >
> > www.devbuzz.com
> > www.knowdotnet.com
> >
> > "Bob" <clarke@qualitythink.com> wrote in message
> > news:cfa521f2.0405091853.a1ae224@posting.google.com...
> > > Having trouble getting started.
> > >
> > > I created an instance of MSDE called VSDOTNET on a computer with the
> > > name of sysdev.
> > >
> > > Using MS SQL Web Adminstrator I created a database called temp with a
> > > table called customer.
> > >
> > > In Visual Studio .NET I can see and access the data in the table. The
> > > dataconnection is called sysdev\vsdotnet\temp.dbo
> > >
> > > The connection string in the properties window is:
> > > Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
> > > Info=False;Initial Catalog=temp;Data Source=sysdev\vsdotnet;Use
> > > Procedure for Prepare=1;Auto Translate=True;Packet
> > > Size=4096;Workstation ID=SYSDEV;Use Encryption for Data=False;Tag with
> > > column collation when possible=False
> > >
> > > However with an application (this case a webform, .aspx) I can not
> > > access the data. I keep getting the error message below.
> > >
> > > Any help with why this doesn't work?
> > >
> > >
> > > Server Error in '/' Application.
> >
>
> --------------------------------------------------------------------------
> > ------
> > >
> > > SQL Server does not exist or access denied.
> > > 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.Data.SqlClient.SqlException: SQL Server does
> > > not exist or access denied.
> > >
> > > Source Error:
> > >
> > >
> > > Line 10:
> > > Line 11: conPubs = new SqlConnection(
> > > "Server=sysdev\vsdotnet;uid=bob;pwd=isgood;database=temp" );
> > > Line 12: conPubs.Open();
> > > Line 13: cmdSelectAuthors = new SqlCommand( "Select fn From
> > > customer", conPubs );
> > > Line 14: dtrAuthors = cmdSelectAuthors.ExecuteReader();
> > >
> > >
> > > Source File: c:\inetpub\wwwroot\sqldatareader.aspx Line: 12
> > >
> > > Stack Trace:
> > >
> > >
> > > [SqlException: SQL Server does not exist or access denied.]
> > > System.Data.SqlClient.ConnectionPool.GetConnection(Boolean&
> > > isInTransaction)
> > >
> >
>
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnec
> > tionString
> > > options, Boolean& isInTransaction)
> > > System.Data.SqlClient.SqlConnection.Open()
> > > ASP.SqlDataReader_aspx.Page_Load(Object sender, EventArgs e) in
> > > c:\inetpub\wwwroot\sqldatareader.aspx:12
> > > System.Web.UI.Control.OnLoad(EventArgs e)
> > > System.Web.UI.Control.LoadRecursive()
> > > System.Web.UI.Page.ProcessRequestMain()
> >
> >
>
>
- Next message: Nicholas Paldino [.NET/C# MVP]: "Re: SQL Server does not exist or access denied."
- Previous message: Justin Rogers: "Re: How can I find out if the cursor is over Selected Text?"
- In reply to: Andy Gaskell: "Re: SQL Server does not exist or access denied."
- Next in thread: Nicholas Paldino [.NET/C# MVP]: "Re: SQL Server does not exist or access denied."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|