Thanks both for replying.
So you both agree that the problem is that account ASPNET must get R/W =
permisions.
Russel:=20
---------
in the Sql server Management Studio Express, i go to Permissions of =
Server\SQlexpress level and there, i see a list like:
AgentSigningCertificate
SQLAuthentificationCertificate
....
Built-in user
Buit-in administrator
Servername\SQLServer2005MSSqluser$servername$sqlexpress
NT AUTHORITY \ System
public
I can't see account "ASPNET" as i can do when seeing the list in the =
Active Directory.
I think it is hidden in NT AUTHORITY \ System.
So i add it and give it "Connect SQL" grant.
Then i select database "test" but there i see only two types of users:
guest
public
and when i grant "connect sql" to Public, i get an error 4627.
William:
-----------
I work with Visual Web Developer: when making a sqldatasource, i can =
choose between:
microsoft SQL Server Database File (SqlClient) but then i 'm requested =
to choose an MDF file
or
microsoft SQL Server but i must take Provider: for Ole db. If i choose =
"microsoft SQL Server" and Provider for sql server, it switch back to =
microsoft SQL Server Database File (SqlClient).
"William (Bill) Vaughn" <billvaRemoveThis@betav.com> schreef in =
bericht news:OWjZNxKbHHA.704@TK2MSFTNGP04.phx.gbl...
First, check out the (free) article on connecting on my blog. It =
discusses a litany of issues on connecting.
Next, let's take this a step at a time.=20
a.. If you are building a .NET application as I expect you are, you =
should be using the SqlClient .NET provider--not OLE DB.=20
b.. If you are specifying SSPI integrated (trusted) security, you =
need to properly configure your database to accept connections on the =
ASP accounts as you seem to be attempting to do. These vary by name =
based on the version of IIS you have installed. These are either ASPNET =
or IUSR_<machinename>.=20
c.. Consider that an ASP application can connect either through =
these accounts (Integrated Security=3DSSPI) or through a named SQL =
Server login account. In the latter case you MUST reconfigure SQL Server =
Express to accept this type of security. If the former, there is no need =
to specify a UID or PWD--they are ignored. Either account must have been =
granted rights to the database you're trying to open. This is done =
through the SSMS tools as you have attempted. In SSMSe open a connection =
to the SQLEXPRESS instance, drill into Logins and right click on the =
appropriate account (like ASPNET). Choose properties. Choose User =
Mapping and check each database this account has rights to access and =
the role membership for each.=20
hth
--=20
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva www.betav.com Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no =
rights.
__________________________________
Visit
www.hitchhikerguides.net to get more information on my latest =
book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
=
-------------------------------------------------------------------------=
----------------------------------------------
[quoted text, click to view] "Bart" <baa@qsd.dfv> wrote in message =
news:OA3UE9JbHHA.1296@TK2MSFTNGP02.phx.gbl...
> Hi,
>=20
>=20
> I try to make a connection with the database "test" contained in sql =
server=20
> express 2005.
>=20
> This is the connection string in the aspx file:
> <asp:SqlDataSource ID=3D"SqlDataSource1" runat=3D"server"=20
> ConnectionString=3D"Provider=3DSQLOLEDB;Data
>=20
> Source=3Dlaptop\sqlexpress;Integrated Security=3DSSPI;Initial =
Catalog=3Dtest"
> ProviderName=3D"System.Data.OleDb" SelectCommand=3D"SELECT * FROM=20
> [mytable]"></asp:SqlDataSource>
>=20
> Sql server express is installed with Windows authentification.
>=20
> When runing the aspx page, i get: "Cannot open database "test" =
requested by=20
> the login. The login failed"
>=20
> I suppose the account ASPNET (machine account used for asp.net =
pages) has=20
> not the right permissions.
> So i started my "Sql server Management Studio Express", selected the =
> database "test" and went to the property "permissions".
> There, i tried to add a user by clicking on button ADD: in the =
following=20
> window, i can introduce the new user, but it refused all
>=20
> of them (ASPNET, ASP.NET Machine account ...), even my administrator =
account=20
> "Bart" is not recognized.
>=20
>=20
> So i have two questions:
>=20
> 1)is the error due not enough permissions (of account ASPNET)?
> 2) if yes, how to give it the right permissions (write)?
>=20
> Thanks for help
> Bart
>=20
>=20
>=20
Hi, i found it finally... thanks
"William (Bill) Vaughn" <billvaRemoveThis@betav.com> schreef in =
bericht news:OWjZNxKbHHA.704@TK2MSFTNGP04.phx.gbl...
First, check out the (free) article on connecting on my blog. It =
discusses a litany of issues on connecting.
Next, let's take this a step at a time.=20
a.. If you are building a .NET application as I expect you are, you =
should be using the SqlClient .NET provider--not OLE DB.=20
b.. If you are specifying SSPI integrated (trusted) security, you =
need to properly configure your database to accept connections on the =
ASP accounts as you seem to be attempting to do. These vary by name =
based on the version of IIS you have installed. These are either ASPNET =
or IUSR_<machinename>.=20
c.. Consider that an ASP application can connect either through =
these accounts (Integrated Security=3DSSPI) or through a named SQL =
Server login account. In the latter case you MUST reconfigure SQL Server =
Express to accept this type of security. If the former, there is no need =
to specify a UID or PWD--they are ignored. Either account must have been =
granted rights to the database you're trying to open. This is done =
through the SSMS tools as you have attempted. In SSMSe open a connection =
to the SQLEXPRESS instance, drill into Logins and right click on the =
appropriate account (like ASPNET). Choose properties. Choose User =
Mapping and check each database this account has rights to access and =
the role membership for each.=20
hth
--=20
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva www.betav.com Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no =
rights.
__________________________________
Visit
www.hitchhikerguides.net to get more information on my latest =
book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
=
-------------------------------------------------------------------------=
----------------------------------------------
[quoted text, click to view] "Bart" <baa@qsd.dfv> wrote in message =
news:OA3UE9JbHHA.1296@TK2MSFTNGP02.phx.gbl...
> Hi,
>=20
>=20
> I try to make a connection with the database "test" contained in sql =
server=20
> express 2005.
>=20
> This is the connection string in the aspx file:
> <asp:SqlDataSource ID=3D"SqlDataSource1" runat=3D"server"=20
> ConnectionString=3D"Provider=3DSQLOLEDB;Data
>=20
> Source=3Dlaptop\sqlexpress;Integrated Security=3DSSPI;Initial =
Catalog=3Dtest"
> ProviderName=3D"System.Data.OleDb" SelectCommand=3D"SELECT * FROM=20
> [mytable]"></asp:SqlDataSource>
>=20
> Sql server express is installed with Windows authentification.
>=20
> When runing the aspx page, i get: "Cannot open database "test" =
requested by=20
> the login. The login failed"
>=20
> I suppose the account ASPNET (machine account used for asp.net =
pages) has=20
> not the right permissions.
> So i started my "Sql server Management Studio Express", selected the =
> database "test" and went to the property "permissions".
> There, i tried to add a user by clicking on button ADD: in the =
following=20
> window, i can introduce the new user, but it refused all
>=20
> of them (ASPNET, ASP.NET Machine account ...), even my administrator =
account=20
> "Bart" is not recognized.
>=20
>=20
> So i have two questions:
>=20
> 1)is the error due not enough permissions (of account ASPNET)?
> 2) if yes, how to give it the right permissions (write)?
>=20
> Thanks for help
> Bart
>=20
>=20
>=20
Don't see what you're looking for? Try a search.