no i think its using the same connection string i used for other tables in the website. how would the syntax look?
Main Topics
Browse All TopicsI have a query i want to run via my asp webpage. It runs fine in SQL Server 2005. It's based on a linked server. However when I tried to throw this query up in ASP. I get the following error. I need someone to help me figure out what this means in plain engrish. I don't really know what to do...
The OLE DB provider "SQLNCLI" for linked server "IN-MMGE-CELLLAB" reported an error. Authentication failed.
Cannot initialize the data source object of OLE DB provider "SQLNCLI" for linked server "IN-MMGE-CELLLAB".
Stack Trace:
[SqlException (0x80131904): The OLE DB provider "SQLNCLI" for linked server "IN-MMGE-CELLLAB" reported an error. Authentication failed.
Cannot initialize the data source object of OLE DB provider "SQLNCLI" for linked server "IN-MMGE-CELLLAB".]
System.Data.SqlClient.SqlC
System.Data.SqlClient.SqlI
System.Data.SqlClient.TdsP
System.Data.SqlClient.TdsP
System.Data.SqlClient.SqlD
System.Data.SqlClient.SqlD
System.Data.SqlClient.SqlC
System.Data.SqlClient.SqlC
System.Data.SqlClient.SqlC
System.Data.SqlClient.SqlC
System.Data.SqlClient.SqlC
System.Data.SqlClient.SqlC
System.Data.Common.DbComma
System.Data.Common.DbDataA
System.Data.Common.DbDataA
System.Data.Common.DbDataA
System.Web.UI.WebControls.
System.Web.UI.DataSourceVi
System.Web.UI.WebControls.
System.Web.UI.WebControls.
System.Web.UI.WebControls.
System.Web.UI.WebControls.
System.Web.UI.WebControls.
System.Web.UI.Control.Ensu
System.Web.UI.Control.PreR
System.Web.UI.Control.PreR
System.Web.UI.Control.PreR
System.Web.UI.Page.Process
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
see if this thread helps:
http://www.progresstalk.co
>>you meanthe connection string from asp to the query right
yes, because if you're using sql2005 management studio, you're logging into the db servers with either your windows username/password (in which case the app is not using the same) or a username/password that exists in the db servers (which should be part of your app's conn string)...
>>but im using windows authentication so im logging into the app with my network password
That gets you into the application, but unless you are using impersonation, the app is still using the default account NETWORK SERVICE (IIS6), if lower version of IIS, it's using the account ASPNET.
So when the app communicates with other servers (like the DB server) it is using one of those accounts.
Usually what I do, is create a user on the DB server(s) called "webapps" and then any connection string a web app(s) uses, I use the username and password for the "webapps" db account.
What connectionstring do you have currently?
ok i actually am using impersonation actually. do u use windows authentication? or forms when you create your webapps person? cuz im using windows auth.
can u show me an example of the syntax u use for your conn string?
all i did for my connection string was use gridview and bind the query(view) using the same connection string i set for the rest of the tables and in the web config. of course these others are not using a linked server.
this is what my web config looks like
<connectionStrings>
<add name="TestADNIConnectionSt
providerName="System.Data.
</connectionStrings>
<system.web>
<roleManager enabled="false" />
<identity impersonate="true"/>
<customErrors mode="Off"/>
<compilation debug="true"/>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<authorization>
<allow roles="ADS\In-mmge-hd-admi
<allow roles="ADS\In-mmge-hd-user
<deny users="*"/>
</authorization>
ok i actually am using impersonation actually. do u use windows authentication? or forms when you create your webapps person? cuz im using windows auth.
can u show me an example of the syntax u use for your conn string?
all i did for my connection string was use gridview and bind the query(view) using the same connection string i set for the rest of the tables and in the web config. of course these others are not using a linked server.
this is what my web config looks like
<connectionStrings>
<add name="TestADNIConnectionSt
providerName="System.Data.
</connectionStrings>
<system.web>
<roleManager enabled="false" />
<identity impersonate="true"/>
<customErrors mode="Off"/>
<compilation debug="true"/>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<authorization>
<allow roles="ADS\In-mmge-hd-admi
<allow roles="ADS\In-mmge-hd-user
<deny users="*"/>
</authorization>
Business Accounts
Answer for Membership
by: samtran0331Posted on 2007-11-14 at 13:28:20ID: 20284044
I don't think the problem is because you're using a linked server, it's a problem with the connection string, does your connection string include a username/password with access to the db server?