Re: connection sql server with asp.net
From: Paul Ibison (Paul.Ibison_at_Pygmalion.Com)
Date: 04/24/04
- Next message: Analysis Services Service Pack 3a: "Unable to connect to analysis server after applying ASSP3a"
- Previous message: zalizan: "Re: connection sql server with asp.net"
- In reply to: zalizan: "Re: connection sql server with asp.net"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 24 Apr 2004 14:52:42 +0100
Zalizan,
if you open Administrative Tools, Internet Service Manager, open up your
website, right-click and go to properties. On directory security, click
edit, and the top check box will show if you have enabled anonymous. It is
enabled by default. As far as asp.net is concerned, unless you are using
impersonation (not on by default) you will be using a windows user called
ASPNET if your connectionstring selects trusted security. The "ASPNET" user
account is created in Windows by Microsoft .NET Framework. It is an
automatic machine account created to limit access rights of .NET
applications. In your case I believe this account should be added as a login
to SQL Server.
To be sure of using the correct connection string syntax, you could create a
UDL file. To get the udl file to open, create a blank textfile named as
xxx.udl. Then double click it to go through the wizard. Inside the udl file
(if you open using notepad) will be the connection string in the correct
format. The connection object is set using this string as follows:
SQL:
cn.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User
ID=name;Password=password;Initial Catalog=database;Data Source=servername"
Trusted:
cn.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist
Security Info=False;
Initial Catalog=database;Data Source=servername"
hope this helps,
Paul Ibison
- Next message: Analysis Services Service Pack 3a: "Unable to connect to analysis server after applying ASSP3a"
- Previous message: zalizan: "Re: connection sql server with asp.net"
- In reply to: zalizan: "Re: connection sql server with asp.net"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|