SQL Server does not exist or access denied

G

Guest

Hello,
I was just puting an application on the web server but it did not work as
usual...
- I do develop on my notebook and move released applications to the Web server
- both have Sql Server 2000
- In this particular application I have a form login based on
Username/Password from a database table
- the start page of the application has a datagrid, both pages are accessing
ONE database but an other table
- It seems that the username and password are checked and validated against
the db (otherwise it would not try to load the next page) but for any reason
the SQL connection for any following page can not be established
- Some pages come up with "SQL Server does not exist or access denied " BUT
other have"tem.Data.SqlClient.SqlException: Could not find stored procedure
'xxxxSelectCommand'

Did anybody have something like this?
Thank you very much in advance.

Cheers Oli
 
G

Guest

Hi,
Thanks for the reply. The strange thig is that I do access the SQL server
for the login but not from any other page ....

Any ideas?

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 268:
Line 269: Sub bindgrid()
Line 270: SqlDataAdapter1.Fill(Me.DataSet11, variable1)
Line 271: SqlDataAdapter2.Fill(DataSet11, variable2)
Line 272: DataGrid1.DataSource =
Me.DataSet11.Tables(variable2).DefaultView


Source File: C:\Inetpub\wwwroot\itprofiling\company.aspx.vb Line: 270

Stack Trace:


[SqlException: SQL Server does not exist or access denied.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean&
isInTransaction) +484

System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection,
ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
itprofiling.company.bindgrid() in
C:\Inetpub\wwwroot\testapp\company.aspx.vb:270
itprofiling.company.Page_Load(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\testapp\company.aspx.vb:257
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
 
H

http://www.visual-basic-data-mining.net/forum

You could catch the exception where it is being thrown and output the error
message, that way you will be clearer on which part of your code is throwing
the exception and what the error message is saying
 
G

Guest

Hi,
I've just solved the problem:
- I changed (!!!) the SQLCONN in the designermode to the settings in the
web.config
- but the code behind was not changed
- thats why it went wrong when moving to the server
- There was/is something wrong in VS.net

Thanks a lot!
Oli

olivogt said:
Hi,
Thanks for the reply. The strange thig is that I do access the SQL server
for the login but not from any other page ....

Any ideas?

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 268:
Line 269: Sub bindgrid()
Line 270: SqlDataAdapter1.Fill(Me.DataSet11, variable1)
Line 271: SqlDataAdapter2.Fill(DataSet11, variable2)
Line 272: DataGrid1.DataSource =
Me.DataSet11.Tables(variable2).DefaultView


Source File: C:\Inetpub\wwwroot\itprofiling\company.aspx.vb Line: 270

Stack Trace:


[SqlException: SQL Server does not exist or access denied.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean&
isInTransaction) +484

System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection,
ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
itprofiling.company.bindgrid() in
C:\Inetpub\wwwroot\testapp\company.aspx.vb:270
itprofiling.company.Page_Load(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\testapp\company.aspx.vb:257
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

http://www.visual-basic-data-mining.net/ said:
You could catch the exception where it is being thrown and output the error
message, that way you will be clearer on which part of your code is throwing
the exception and what the error message is saying
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,148
Latest member
ElizbethDa
Top