Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Could nt access sql server2000 in windows 2003 using C#

Status
Not open for further replies.

sweth

IS-IT--Management
Mar 2, 2002
98
IN
Dear Friends,

I have sql server 2000 Enterprise Server installed in Windows 2003 Server Standard Edition. When i was trying to connect with MSDE in workstation i could able to see northwind and other dbs and can import to local msde.

I was using DataGrid in C# webform using dataform wizard , and connected server and mapped customers.northwind when i run the program it says ACCESS DENIED LOGIN FAILED OR SERVER IS NOT RUNNING. Is it due to security reason normally
public user will be using anonymous account. Should I Grant
public access to IUSER/MACHINENAME. The program is running well if it is hosted in server.

Please advice me

Thanks and Regrs
Siva
 
If I remember correctly, in VB you have to create a connection to the database (be it access or SQL etc). In VB, the data-grid object does not generally access the database directly (although I think it is possible). Instead, I have always used ADO data-controls, & one of their properties is the connection string, at which point you can specify the authentication method (either SQL (mixed mode SQL server) or Windows authentication). Have you made sure the data-grid, & any connection objects are passing the required login credentials to the SQL server?

James Goodman MCP
 
hi,
In C# datagrid also have mixed mode authentication i could connect in design mode and see all db objects problem is while running it gives access denied error
 
hi,
After checking microsoft kb article I found that if u use named pipes as protocol aspnet default user for .net application wont have rights for db acess so u need to impersonate a domanin user who has authentication for db access if u use tcp/ip there wont be any problem.
regrs
siva
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top