Sql server connection problem - even with VS.Net designer

I have a problem connecting my application written in c# (asp.net webform code behind) to my SQL server 2000 database. My authentication mechanism is windows-intergrated authentication, my connection string is  "Data Source =(local);Initial Catalog = database; Integrated security = SSPI". I tried different connection string (even copy and paste the connection string property of the database link in visual studio .net) but without success. I even tried to create the connection string in VS.net designer (which was success in C# windows form) but I still received the message: "SQL Server does not exist or access denied."

I need this desparately. I would appreciate very much your helps.
0
longnd
12/30/2003 10:48:09 PM
asp.net.object-datasource 16182 articles. 0 followers. Follow

6 Replies
522 Views

Similar Articles

[PageSpeed] 16

Did you add the user - ASPNet or Network Service (depending on your environment) - to your database?
Jamie Kindred, CGA, MCSD
0
NetProfit
12/30/2003 11:00:23 PM
I'm using Microsoft Windows XP on my local machine, Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573 

Why do I need to add such users? I've just added an user: long/ASPNet but I still couldn't login. I received the message:
'LONG\IUSR_LONG' where LONG is my computer name and I don't know who's IUSR_LONG
0
longnd
12/30/2003 11:07:58 PM


If you are using integrated authentication to connect to your database, the user under which the current process is running must be granted access to the database.
It looks like you might be impersonating the IIS user. Do you have the following in your web.config?

<identity impersonate="true" />

Is your application in IIS set up for Anonymous authentication?
Are you specifying a particular type of authentication in your web.config (Windows, Forms, ...)?


If you want to allow anonymous users to access your website, try the following:
1 - Do not use impersonation in web.config
2 - Allow Anonymous authentication only in IIS for you website
3 - Specify Windows authentication in web.config

Please let me know if this works.

Jamie Kindred, CGA, MCSD
0
NetProfit
12/30/2003 11:28:25 PM
PS: IUSR_LONG is the user under which the IIS process runs.
Jamie Kindred, CGA, MCSD
0
NetProfit
12/30/2003 11:30:02 PM
I have the following configuration in web config 

<authentication mode="Windows" />
<identity impersonate="true"/>
(I followed the instruction from ADO.Net cookbook)
I have allowed anonymous access in IIS and also choosen windows authentication in IIS for that site.
By the way, I have 2 IIS version on my administrative tools (IIS and IIS6 manager). Which one should I use?
0
longnd
12/30/2003 11:38:08 PM
Thank you very much. I change impersonate to false and it succeeded. I shall continue with my application now. 

Happy new year.
0
longnd
12/30/2003 11:43:27 PM
Reply:

Similar Artilces:

problems with connections to access via ADO.NET in VS.NET
For anyone familiar with this book, I am having trouble with some code in Chris Payne's "SAMS Teach Yourself ASP.NET in 21 Days", which calls for me to use ADO.NET to connect to an Access database I had to create for the "In Review" project after the second week. The code goes like this (within the first subroutine): dim Conn as new OleDbConnection("Provider= Microsoft.Jet.4.0; Data Source=C:\Inetpub\wwwroot\TYASPNET\banking.mdb") Now I've tried this, along with setting up a connection through the server explorer in Visual Studio.NET. When I go to run the page, I...

problems connecting to my SQL server database in .NET
I am able to connect and display data in classic asp just fine, but I cannot connect to my database using ASP.NET. I have tried 2 tutorials on here and neither has worked. They both give me the same error: "Login failed for user 'NASHIE\ASPNET'." I am currently working on this tutorial: http://asp.net/webmatrix/tour/section3/binddatagrid.aspx "Display Data with MxDataGrid" [wmx:SqlDataSourceControl id="SqlDataSourceControl1" runat="server" UpdateCommand="" SelectCommand="SELECT * FROM [Orders]" ConnectionString="...

SQL Server Reporting Services for SQL SERVER 2000 AND Visual Studio.NET 2005 .NET 2.0
Hi, Which version of SQl Server Reporting Services will work with SQL SERVER 2000 in pararrel with ASP.NET 2.0 (.NET 2.0 framework)?  Thanks, Azam HighOnCodingWanna get high! Hi, Okay I got the answer. Yes, we can use the SQL SERVER 2005 Reporting Services with SQL SERVER 2000. HighOnCodingWanna get high! ...

ADO.Net connection problems with SQL Server 2005
Hi. Im try to use ADO.Net for connection to SQL Server 2005. In my developer workstation connection work fine, but in the clients, don�t connect. .Net 2.0 is installed, SQL Client for sql server 2005 is installed Help me please. Hi, In general, if you have registered the following 2 DLLs,ADO will work Sybase.PowerBuilder.Db.dll Sybase.PowerBuilder.DbExt.dll they are located under the folder Disk:\Program Files\Sybase\powerbuilder 11 You can get the folder from registry HKEY_LOCAL_MACHINE\SOFTWARE\Sybase\PowerBuilder\11.0->Location &quo...

IIS server works with vs.net but not vs.net 2003 ?
Trying to program in asp.net 1.1 via visual studio and running IIS 5.1. After getting asp.net to work, i am getting the dreaded '...Internal Server Error 500..." if I try to start a new Solution in VS.Net 2003. However, VS.Net will allow me to start a web application with no problems. Truth is stranger than fiction, but nothing is stranger than visual studio.... Any help would be appreciated. Thanks....

vb.net vs c#.net vs j#.net
just out of curiousity which looks, acts most like java? i'm still learning trying to used to vb.net but it seems that it was easier to do some stuff with java. C# is Java++ in my opinion. If you have done C or Jave you will prefer C#.Mike Schellenberger - MCAD If you are looking for language similar to java go for J#. However most code samples you find on the net will be in VB.NET and C#....

HOWTO: Connect to SQL Server in VS.NET 2003 via the Internet
Hi, At work -- using our LAN -- I'm able to connect to our SQL Server (2000) within the VS.NET IDE and create tables, stored procs, etc. Due to some family emergencies, I was not able to go to the office last week. Although, I can connect to our ASP.NET applications using VS.NET via the Internet, I can't see our SQL Server. I assume, we need to publish SQL Server through our firewall. I would really appreciate some help so that we do this without compromising security.Thanks,Sam A search at MSDN for "sql server firewall ports" returned 2 that would seem to fit the bill: ...

.net 1 .. connection string problem with sql server 2005 SP2
Hi All,  I have a prpblem that drivnig me mad... I have some old projects in .net 1 that I am having to move the databases. At the moment the webistes and database are on the same server. I have now moved the database but the connectionn string in the webconfig no longer works. I am using the following connection string.  <add key="ConnectionString"  value="  Server=xx.xx.xx.xx; Network=DBMSSOCN; Database=xxxxxxx; Uid=xx; Pwd=xxxxxxxx;"/>  When the website resides on the same server the connection string works but when they are on d...

pb 10.0-sql server 2000-ado.net connect problem
Hi, I am using Powerbuilder 10.0 , XP SP2 , Microsoft SQL Server 2000 and the Net Framework is installed. I am having problem connecting to Microsoft SQLSERVER 2000 using ADO.NET My connection is // Profile sqlado SQLCA.DBMS = "TRACE ADO.Net" SQLCA.LogPass = "123" SQLCA.LogId = "sa" SQLCA.AutoCommit = True SQLCA.DBParm="Namespace='System.Data.OleDb',DATASOURCE='internetpc' ,Database='db1',Provider='SQLOLEDB',PROVIDERSTRING='database=db1' ,DelimitIdentifier='Yes',PBCatalogOwner='dbo',Default...

A .NET Framework error occurred during execution of user-defined routine or aggregate -While creating a SQL SERVER 2005 Stored prodecure in VS.NET 2005
 Running [dbo].[insertlogin] ( @log = hiten, @pas = hiten ).A .NET Framework error occurred during execution of user-defined routine or aggregate "insertlogin": System.Data.SqlClient.SqlException: Must declare the scalar variable "@Log".System.Data.SqlClient.SqlException:    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)   at System.Data.SqlClient.SqlInternalConnectionSmi.EventSink.Pro...

How to design SQL Server 2005 Reporting Services Reports in VS.NET 2005 web applications
Hi,   Can we design SQL Server 2005 Reporting Services Reports in VS.NET 2005 web applications. If so how they can be designed. Plz help me if any one know the solution. Thanx in advance, Vidya     Are you asking if you can use VS.Net 2005 to design reports, yes, both client and server reports are built using VS.Net. If you are asking if you can use a web application to build a report, well yes you could, but you would have you design it.  All sql server reports are is an xml file, so if you can build a front end that will generate the xml in the proper ...

In Vs.Net 2005, grid does not come up in designer like in VS.net 2003
Hi, I am using VS.Net 2005. Previously I used VS.Net 2003. In 2003, whenever i add a new file it used to display the page in grids that helps me moving the controls and aligning it. But in 2005, i could not come up with an option that can show the grid with dots in the designer. Am i missing any setting here?   Regards, Jagadeesh   Turn on first checkbox for Absolute Positioning on the options page Tools | Options, HTML Designer, CSS Positioning.  From that point on controls dragged to the page will be absolutely positioned.-DanThis posting is provided "AS I...

How to mannually connect, and perform CRUD (Create,retrieve, insert, update, delete), SQL Server, and VS.NET C#
I am a beginner, and am searching for articles that will teach manual connection, insert, update and delete syntax in VWD, (C# and Sql Server).  Please refer to an article that you know of.  I would highly appreciate if the article uses a sample database and walkthoughs the whole page development where the page can insert, update and delete data, with no form views or details views etc. used. Need help urgently  Thanks!  Friend, here is the simplest way of inserting, editing and deleting in the asp.net http://www.codeproject.com/KB/database/simpledbreadwrite.aspx ...

Can't Connect .Net application from Windows Server 2003 to Database Server (SQL Server 2000)
Hi, I am having a problem connecting my .net applications from the application server to the database server. When I run the application from my windows xp (sp2) box it works fine. When I try to connect via SQL Management Studio to the database server from the application server I get the same error. Here is the error: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider...

VS.NET 2005 vs VS.NET 2003
I have used VS.NET 2003 extensively and exploited all features like drag and drop functions for creating components, drag and drop data access components...For example VS.NET 2003 allows creating sqldataadapter for table mapping , stored proc parameters mappings etc..We can drag pretty much any object on component designer....Not it seems like all that gone...VS.NET 2005, there is no way we can drag the typed dataset, sqldata adapter, sqlcommand on forms designer . There is no concept of component. There is no component designer any more....Biggest flaw i found is sqldatasource and...

Web resources about - Sql server connection problem - even with VS.Net designer - asp.net.object-datasource

Connection - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

iMedia Connection: Interactive Marketing News, Features, Podcasts and Video - iMediaConnection.com
High-quality data, if not used properly, can still lead marketers to make bad decisions. Consider these common ways that numbers are used to ...

HTTP persistent connection - Wikipedia, the free encyclopedia
... tacked on to an existing protocol. If the browser supports keep-alive, it adds an additional header to the request: Following this, the connection ...

CareerSonar Turns Facebook Friends Into Job Connections
Looking for a job ? Among your Facebook friends lies the potential for employment. CareerSonar , a new service, brings together a person’s connections ...

Kings Cross identities arrested in connection with murder
Two Kings Cross identities&nbsp;have been arrested in connection with the murder of a man at Sydney hotel.

Governor declares state of emergency in connection with California methane leak
... of Emergency Services) On Wednesday evening, California Governor Jerry Brown declared a state of emergency in Los Angeles County in connection ...

Tons Of Methane Are Spewing Out Of California, And There’s A Connection To The Governor
The out of control leak has forced thousands of residents to flee their homes. Gov. Brown's sister is a paid board member at the company that ...

Report: Man arrested in connection with Ashley Olsen's murder
Italian media agency reports that a non-EU male has been arrested in the murder of the 35-year-old American

Toyota and Kymeta rely on satellites to power this Mirai's data connection
They're hoping to achieve gigabit wireless speeds within the next few years.

Test Claims To Show T-Mobile’s YouTube “Optimization” Is Just Connection Throttling
... on the same network, and at the same time of day. They tested video streaming against three other kinds of downloads and measured the connection ...

Resources last updated: 1/15/2016 10:42:08 AM