I am trying to install a third party application that requires a SQL server.
I am using SQL 2000 in an SBS Premium environment. It appears that my
install of SQL server has some issues. To test I tried creating a new ODBC
connector to my SQL server. Using the ODBC Data Source admin tool, from the
"User DSN" tab I select "Add". From the Create a New Data Source window I
select "SQL Server". I give it a Name, Description and select my SQL server
from the drop down menu. The next window "How should SQL server verify the
authenticity of the login ID?" I choose "With SQL Server authentication
using a login ID and password entered by the user". I enter my ID and
password and get an error.
"Connection Failed:
SQL State: '28000'
SQL Server Error: 18456
[Microsoft][ODBC SQL Server Driver][SQL Server] Login failed for sqladmin.
Note: This sqladmin ID is a member of the Domain Admins group and has DBO in
SQL server.
Did you activate Mixed mode authentication on the server ?
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"AllenM" <allen@.majaro.com> schrieb im Newsbeitrag
news:u1jJQCYVFHA.2128@.TK2MSFTNGP14.phx.gbl...
>I am trying to install a third party application that requires a SQL
>server. I am using SQL 2000 in an SBS Premium environment. It appears that
>my install of SQL server has some issues. To test I tried creating a new
>ODBC connector to my SQL server. Using the ODBC Data Source admin tool,
>from the "User DSN" tab I select "Add". From the Create a New Data Source
>window I select "SQL Server". I give it a Name, Description and select my
>SQL server from the drop down menu. The next window "How should SQL server
>verify the authenticity of the login ID?" I choose "With SQL Server
>authentication using a login ID and password entered by the user". I enter
>my ID and password and get an error.
> "Connection Failed:
> SQL State: '28000'
> SQL Server Error: 18456
> [Microsoft][ODBC SQL Server Driver][SQL Server] Login failed for sqladmin.
> Note: This sqladmin ID is a member of the Domain Admins group and has DBO
> in SQL server.
>
Showing posts with label requires. Show all posts
Showing posts with label requires. Show all posts
Thursday, March 8, 2012
Cannot create a new ODBC connector to my SQL server
I am trying to install a third party application that requires a SQL server.
I am using SQL 2000 in an SBS Premium environment. It appears that my
install of SQL server has some issues. To test I tried creating a new ODBC
connector to my SQL server. Using the ODBC Data Source admin tool, from the
"User DSN" tab I select "Add". From the Create a New Data Source window I
select "SQL Server". I give it a Name, Description and select my SQL server
from the drop down menu. The next window "How should SQL server verify the
authenticity of the login ID?" I choose "With SQL Server authentication
using a login ID and password entered by the user". I enter my ID and
password and get an error.
"Connection Failed:
SQL State: '28000'
SQL Server Error: 18456
[Microsoft][ODBC SQL Server Driver][SQL Server] Login failed for sqladmin.
Note: This sqladmin ID is a member of the Domain Admins group and has DBO in
SQL server.Did you activate Mixed mode authentication on the server ?
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--
"AllenM" <allen@.majaro.com> schrieb im Newsbeitrag
news:u1jJQCYVFHA.2128@.TK2MSFTNGP14.phx.gbl...
>I am trying to install a third party application that requires a SQL
>server. I am using SQL 2000 in an SBS Premium environment. It appears that
>my install of SQL server has some issues. To test I tried creating a new
>ODBC connector to my SQL server. Using the ODBC Data Source admin tool,
>from the "User DSN" tab I select "Add". From the Create a New Data Source
>window I select "SQL Server". I give it a Name, Description and select my
>SQL server from the drop down menu. The next window "How should SQL server
>verify the authenticity of the login ID?" I choose "With SQL Server
>authentication using a login ID and password entered by the user". I enter
>my ID and password and get an error.
> "Connection Failed:
> SQL State: '28000'
> SQL Server Error: 18456
> [Microsoft][ODBC SQL Server Driver][SQL Server] Login failed for sqladmin.
> Note: This sqladmin ID is a member of the Domain Admins group and has DBO
> in SQL server.
>
I am using SQL 2000 in an SBS Premium environment. It appears that my
install of SQL server has some issues. To test I tried creating a new ODBC
connector to my SQL server. Using the ODBC Data Source admin tool, from the
"User DSN" tab I select "Add". From the Create a New Data Source window I
select "SQL Server". I give it a Name, Description and select my SQL server
from the drop down menu. The next window "How should SQL server verify the
authenticity of the login ID?" I choose "With SQL Server authentication
using a login ID and password entered by the user". I enter my ID and
password and get an error.
"Connection Failed:
SQL State: '28000'
SQL Server Error: 18456
[Microsoft][ODBC SQL Server Driver][SQL Server] Login failed for sqladmin.
Note: This sqladmin ID is a member of the Domain Admins group and has DBO in
SQL server.Did you activate Mixed mode authentication on the server ?
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--
"AllenM" <allen@.majaro.com> schrieb im Newsbeitrag
news:u1jJQCYVFHA.2128@.TK2MSFTNGP14.phx.gbl...
>I am trying to install a third party application that requires a SQL
>server. I am using SQL 2000 in an SBS Premium environment. It appears that
>my install of SQL server has some issues. To test I tried creating a new
>ODBC connector to my SQL server. Using the ODBC Data Source admin tool,
>from the "User DSN" tab I select "Add". From the Create a New Data Source
>window I select "SQL Server". I give it a Name, Description and select my
>SQL server from the drop down menu. The next window "How should SQL server
>verify the authenticity of the login ID?" I choose "With SQL Server
>authentication using a login ID and password entered by the user". I enter
>my ID and password and get an error.
> "Connection Failed:
> SQL State: '28000'
> SQL Server Error: 18456
> [Microsoft][ODBC SQL Server Driver][SQL Server] Login failed for sqladmin.
> Note: This sqladmin ID is a member of the Domain Admins group and has DBO
> in SQL server.
>
Cannot create a new ODBC connector to my SQL server
I am trying to install a third party application that requires a SQL server.
I am using SQL 2000 in an SBS Premium environment. It appears that my
install of SQL server has some issues. To test I tried creating a new ODBC
connector to my SQL server. Using the ODBC Data Source admin tool, from the
"User DSN" tab I select "Add". From the Create a New Data Source window I
select "SQL Server". I give it a Name, Description and select my SQL server
from the drop down menu. The next window "How should SQL server verify the
authenticity of the login ID?" I choose "With SQL Server authentication
using a login ID and password entered by the user". I enter my ID and
password and get an error.
"Connection Failed:
SQL State: '28000'
SQL Server Error: 18456
[Microsoft][ODBC SQL Server Driver][SQL Server] Login failed for
sqladmin.
Note: This sqladmin ID is a member of the Domain Admins group and has DBO in
SQL server.Did you activate Mixed mode authentication on the server ?
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"AllenM" <allen@.majaro.com> schrieb im Newsbeitrag
news:u1jJQCYVFHA.2128@.TK2MSFTNGP14.phx.gbl...
>I am trying to install a third party application that requires a SQL
>server. I am using SQL 2000 in an SBS Premium environment. It appears that
>my install of SQL server has some issues. To test I tried creating a new
>ODBC connector to my SQL server. Using the ODBC Data Source admin tool,
>from the "User DSN" tab I select "Add". From the Create a New Data Source
>window I select "SQL Server". I give it a Name, Description and select my
>SQL server from the drop down menu. The next window "How should SQL server
>verify the authenticity of the login ID?" I choose "With SQL Server
>authentication using a login ID and password entered by the user". I enter
>my ID and password and get an error.
> "Connection Failed:
> SQL State: '28000'
> SQL Server Error: 18456
> [Microsoft][ODBC SQL Server Driver][SQL Server] Login failed f
or sqladmin.
> Note: This sqladmin ID is a member of the Domain Admins group and has DBO
> in SQL server.
>
I am using SQL 2000 in an SBS Premium environment. It appears that my
install of SQL server has some issues. To test I tried creating a new ODBC
connector to my SQL server. Using the ODBC Data Source admin tool, from the
"User DSN" tab I select "Add". From the Create a New Data Source window I
select "SQL Server". I give it a Name, Description and select my SQL server
from the drop down menu. The next window "How should SQL server verify the
authenticity of the login ID?" I choose "With SQL Server authentication
using a login ID and password entered by the user". I enter my ID and
password and get an error.
"Connection Failed:
SQL State: '28000'
SQL Server Error: 18456
[Microsoft][ODBC SQL Server Driver][SQL Server] Login failed for
sqladmin.
Note: This sqladmin ID is a member of the Domain Admins group and has DBO in
SQL server.Did you activate Mixed mode authentication on the server ?
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"AllenM" <allen@.majaro.com> schrieb im Newsbeitrag
news:u1jJQCYVFHA.2128@.TK2MSFTNGP14.phx.gbl...
>I am trying to install a third party application that requires a SQL
>server. I am using SQL 2000 in an SBS Premium environment. It appears that
>my install of SQL server has some issues. To test I tried creating a new
>ODBC connector to my SQL server. Using the ODBC Data Source admin tool,
>from the "User DSN" tab I select "Add". From the Create a New Data Source
>window I select "SQL Server". I give it a Name, Description and select my
>SQL server from the drop down menu. The next window "How should SQL server
>verify the authenticity of the login ID?" I choose "With SQL Server
>authentication using a login ID and password entered by the user". I enter
>my ID and password and get an error.
> "Connection Failed:
> SQL State: '28000'
> SQL Server Error: 18456
> [Microsoft][ODBC SQL Server Driver][SQL Server] Login failed f
or sqladmin.
> Note: This sqladmin ID is a member of the Domain Admins group and has DBO
> in SQL server.
>
Saturday, February 25, 2012
Cannot connect via Web Application...
I am using SQLServer 2000, Visual Studio 2003, C#.
I am writing a web part which requires me to connect to a local sql
database.
I wrote a class which handles the connection and reading of the table.
When I try to call .Open on the connection, it fails, the exception is
something to do with permission.
I used the same class to connect with a console application and a
windows application, and it works fine. I am able to connect and read
the table.
Can anyone shed some light on what is the difference between
connecting/accessing to a database via Web Application as opposed to a
Non-Web App.
TIAI think your problem has something to do with permission as the error
indicates. If you are writing an ASP.Net web page then your web application
is running as the ASPUSER Windows user and chances are this use does not
have permissions to connect to the database. When you run as a Windows
application you run as you and you probably have admin permissions on the
box which gives you SA permissions in the database so you can do whatever
you want. Confirm that you are running as ASPUSER and then create a login
and user for it in SQL Server.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"IV" <Imtiaz.Vohra@.vtechsr.com> wrote in message
news:1168476873.734347.313800@.k58g2000hse.googlegroups.com...
>I am using SQLServer 2000, Visual Studio 2003, C#.
> I am writing a web part which requires me to connect to a local sql
> database.
> I wrote a class which handles the connection and reading of the table.
> When I try to call .Open on the connection, it fails, the exception is
> something to do with permission.
> I used the same class to connect with a console application and a
> windows application, and it works fine. I am able to connect and read
> the table.
> Can anyone shed some light on what is the difference between
> connecting/accessing to a database via Web Application as opposed to a
> Non-Web App.
> TIA
>|||Roger,
Thanks for the reply.
I ran SQL Server Enterprise Manager and for that database, I checked
the Users.
there are two, dbo and guest, both having full permissions.
How would I confirm tthat I am running as ASPUSER and create a login
for it?
Thanks,
IV
Roger Wolter[MSFT] wrote:[vbcol=seagreen]
> I think your problem has something to do with permission as the error
> indicates. If you are writing an ASP.Net web page then your web applicati
on
> is running as the ASPUSER Windows user and chances are this use does not
> have permissions to connect to the database. When you run as a Windows
> application you run as you and you probably have admin permissions on the
> box which gives you SA permissions in the database so you can do whatever
> you want. Confirm that you are running as ASPUSER and then create a login
> and user for it in SQL Server.
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "IV" <Imtiaz.Vohra@.vtechsr.com> wrote in message
> news:1168476873.734347.313800@.k58g2000hse.googlegroups.com...|||Log in as an admin. USE the database where your tables are and execute
these commands (substituting the name of you machine for servername)
CREATE LOGIN [servername\ASPNET] FROM WINDOWS
CREATE USER [servername\ASPNET] FROM LOGIN [servername\ASPNET]
http://msdn2.microsoft.com/en-us/library/ms189751.aspx
http://msdn2.microsoft.com/en-us/library/ms173463.aspx
You will then have to grant this user access to the objects it needs to
access for your application
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"IV" <Imtiaz.Vohra@.vtechsr.com> wrote in message
news:1168487427.667116.147270@.p59g2000hsd.googlegroups.com...
> Roger,
> Thanks for the reply.
> I ran SQL Server Enterprise Manager and for that database, I checked
> the Users.
> there are two, dbo and guest, both having full permissions.
> How would I confirm tthat I am running as ASPUSER and create a login
> for it?
> Thanks,
> IV
> Roger Wolter[MSFT] wrote:
>|||Roger,
I appreciate you taking the time to help me out.
I tried what you said and am still failing with the same exception.
Imtiaz
Roger Wolter[MSFT] wrote:[vbcol=seagreen]
> Log in as an admin. USE the database where your tables are and execute
> these commands (substituting the name of you machine for servername)
> CREATE LOGIN [servername\ASPNET] FROM WINDOWS
> CREATE USER [servername\ASPNET] FROM LOGIN [servername\ASPNET]
> http://msdn2.microsoft.com/en-us/library/ms189751.aspx
> http://msdn2.microsoft.com/en-us/library/ms173463.aspx
> You will then have to grant this user access to the objects it needs to
> access for your application
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "IV" <Imtiaz.Vohra@.vtechsr.com> wrote in message
> news:1168487427.667116.147270@.p59g2000hsd.googlegroups.com...
I am writing a web part which requires me to connect to a local sql
database.
I wrote a class which handles the connection and reading of the table.
When I try to call .Open on the connection, it fails, the exception is
something to do with permission.
I used the same class to connect with a console application and a
windows application, and it works fine. I am able to connect and read
the table.
Can anyone shed some light on what is the difference between
connecting/accessing to a database via Web Application as opposed to a
Non-Web App.
TIAI think your problem has something to do with permission as the error
indicates. If you are writing an ASP.Net web page then your web application
is running as the ASPUSER Windows user and chances are this use does not
have permissions to connect to the database. When you run as a Windows
application you run as you and you probably have admin permissions on the
box which gives you SA permissions in the database so you can do whatever
you want. Confirm that you are running as ASPUSER and then create a login
and user for it in SQL Server.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"IV" <Imtiaz.Vohra@.vtechsr.com> wrote in message
news:1168476873.734347.313800@.k58g2000hse.googlegroups.com...
>I am using SQLServer 2000, Visual Studio 2003, C#.
> I am writing a web part which requires me to connect to a local sql
> database.
> I wrote a class which handles the connection and reading of the table.
> When I try to call .Open on the connection, it fails, the exception is
> something to do with permission.
> I used the same class to connect with a console application and a
> windows application, and it works fine. I am able to connect and read
> the table.
> Can anyone shed some light on what is the difference between
> connecting/accessing to a database via Web Application as opposed to a
> Non-Web App.
> TIA
>|||Roger,
Thanks for the reply.
I ran SQL Server Enterprise Manager and for that database, I checked
the Users.
there are two, dbo and guest, both having full permissions.
How would I confirm tthat I am running as ASPUSER and create a login
for it?
Thanks,
IV
Roger Wolter[MSFT] wrote:[vbcol=seagreen]
> I think your problem has something to do with permission as the error
> indicates. If you are writing an ASP.Net web page then your web applicati
on
> is running as the ASPUSER Windows user and chances are this use does not
> have permissions to connect to the database. When you run as a Windows
> application you run as you and you probably have admin permissions on the
> box which gives you SA permissions in the database so you can do whatever
> you want. Confirm that you are running as ASPUSER and then create a login
> and user for it in SQL Server.
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "IV" <Imtiaz.Vohra@.vtechsr.com> wrote in message
> news:1168476873.734347.313800@.k58g2000hse.googlegroups.com...|||Log in as an admin. USE the database where your tables are and execute
these commands (substituting the name of you machine for servername)
CREATE LOGIN [servername\ASPNET] FROM WINDOWS
CREATE USER [servername\ASPNET] FROM LOGIN [servername\ASPNET]
http://msdn2.microsoft.com/en-us/library/ms189751.aspx
http://msdn2.microsoft.com/en-us/library/ms173463.aspx
You will then have to grant this user access to the objects it needs to
access for your application
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"IV" <Imtiaz.Vohra@.vtechsr.com> wrote in message
news:1168487427.667116.147270@.p59g2000hsd.googlegroups.com...
> Roger,
> Thanks for the reply.
> I ran SQL Server Enterprise Manager and for that database, I checked
> the Users.
> there are two, dbo and guest, both having full permissions.
> How would I confirm tthat I am running as ASPUSER and create a login
> for it?
> Thanks,
> IV
> Roger Wolter[MSFT] wrote:
>|||Roger,
I appreciate you taking the time to help me out.
I tried what you said and am still failing with the same exception.
Imtiaz
Roger Wolter[MSFT] wrote:[vbcol=seagreen]
> Log in as an admin. USE the database where your tables are and execute
> these commands (substituting the name of you machine for servername)
> CREATE LOGIN [servername\ASPNET] FROM WINDOWS
> CREATE USER [servername\ASPNET] FROM LOGIN [servername\ASPNET]
> http://msdn2.microsoft.com/en-us/library/ms189751.aspx
> http://msdn2.microsoft.com/en-us/library/ms173463.aspx
> You will then have to grant this user access to the objects it needs to
> access for your application
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "IV" <Imtiaz.Vohra@.vtechsr.com> wrote in message
> news:1168487427.667116.147270@.p59g2000hsd.googlegroups.com...
Cannot connect via Web Application...
I am using SQLServer 2000, Visual Studio 2003, C#.
I am writing a web part which requires me to connect to a local sql
database.
I wrote a class which handles the connection and reading of the table.
When I try to call .Open on the connection, it fails, the exception is
something to do with permission.
I used the same class to connect with a console application and a
windows application, and it works fine. I am able to connect and read
the table.
Can anyone shed some light on what is the difference between
connecting/accessing to a database via Web Application as opposed to a
Non-Web App.
TIA
I think your problem has something to do with permission as the error
indicates. If you are writing an ASP.Net web page then your web application
is running as the ASPUSER Windows user and chances are this use does not
have permissions to connect to the database. When you run as a Windows
application you run as you and you probably have admin permissions on the
box which gives you SA permissions in the database so you can do whatever
you want. Confirm that you are running as ASPUSER and then create a login
and user for it in SQL Server.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"IV" <Imtiaz.Vohra@.vtechsr.com> wrote in message
news:1168476873.734347.313800@.k58g2000hse.googlegr oups.com...
>I am using SQLServer 2000, Visual Studio 2003, C#.
> I am writing a web part which requires me to connect to a local sql
> database.
> I wrote a class which handles the connection and reading of the table.
> When I try to call .Open on the connection, it fails, the exception is
> something to do with permission.
> I used the same class to connect with a console application and a
> windows application, and it works fine. I am able to connect and read
> the table.
> Can anyone shed some light on what is the difference between
> connecting/accessing to a database via Web Application as opposed to a
> Non-Web App.
> TIA
>
|||Roger,
Thanks for the reply.
I ran SQL Server Enterprise Manager and for that database, I checked
the Users.
there are two, dbo and guest, both having full permissions.
How would I confirm tthat I am running as ASPUSER and create a login
for it?
Thanks,
IV
Roger Wolter[MSFT] wrote:[vbcol=seagreen]
> I think your problem has something to do with permission as the error
> indicates. If you are writing an ASP.Net web page then your web application
> is running as the ASPUSER Windows user and chances are this use does not
> have permissions to connect to the database. When you run as a Windows
> application you run as you and you probably have admin permissions on the
> box which gives you SA permissions in the database so you can do whatever
> you want. Confirm that you are running as ASPUSER and then create a login
> and user for it in SQL Server.
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "IV" <Imtiaz.Vohra@.vtechsr.com> wrote in message
> news:1168476873.734347.313800@.k58g2000hse.googlegr oups.com...
|||Log in as an admin. USE the database where your tables are and execute
these commands (substituting the name of you machine for servername)
CREATE LOGIN [servername\ASPNET] FROM WINDOWS
CREATE USER [servername\ASPNET] FROM LOGIN [servername\ASPNET]
http://msdn2.microsoft.com/en-us/library/ms189751.aspx
http://msdn2.microsoft.com/en-us/library/ms173463.aspx
You will then have to grant this user access to the objects it needs to
access for your application
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"IV" <Imtiaz.Vohra@.vtechsr.com> wrote in message
news:1168487427.667116.147270@.p59g2000hsd.googlegr oups.com...
> Roger,
> Thanks for the reply.
> I ran SQL Server Enterprise Manager and for that database, I checked
> the Users.
> there are two, dbo and guest, both having full permissions.
> How would I confirm tthat I am running as ASPUSER and create a login
> for it?
> Thanks,
> IV
> Roger Wolter[MSFT] wrote:
>
|||Roger,
I appreciate you taking the time to help me out.
I tried what you said and am still failing with the same exception.
Imtiaz
Roger Wolter[MSFT] wrote:[vbcol=seagreen]
> Log in as an admin. USE the database where your tables are and execute
> these commands (substituting the name of you machine for servername)
> CREATE LOGIN [servername\ASPNET] FROM WINDOWS
> CREATE USER [servername\ASPNET] FROM LOGIN [servername\ASPNET]
> http://msdn2.microsoft.com/en-us/library/ms189751.aspx
> http://msdn2.microsoft.com/en-us/library/ms173463.aspx
> You will then have to grant this user access to the objects it needs to
> access for your application
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "IV" <Imtiaz.Vohra@.vtechsr.com> wrote in message
> news:1168487427.667116.147270@.p59g2000hsd.googlegr oups.com...
I am writing a web part which requires me to connect to a local sql
database.
I wrote a class which handles the connection and reading of the table.
When I try to call .Open on the connection, it fails, the exception is
something to do with permission.
I used the same class to connect with a console application and a
windows application, and it works fine. I am able to connect and read
the table.
Can anyone shed some light on what is the difference between
connecting/accessing to a database via Web Application as opposed to a
Non-Web App.
TIA
I think your problem has something to do with permission as the error
indicates. If you are writing an ASP.Net web page then your web application
is running as the ASPUSER Windows user and chances are this use does not
have permissions to connect to the database. When you run as a Windows
application you run as you and you probably have admin permissions on the
box which gives you SA permissions in the database so you can do whatever
you want. Confirm that you are running as ASPUSER and then create a login
and user for it in SQL Server.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"IV" <Imtiaz.Vohra@.vtechsr.com> wrote in message
news:1168476873.734347.313800@.k58g2000hse.googlegr oups.com...
>I am using SQLServer 2000, Visual Studio 2003, C#.
> I am writing a web part which requires me to connect to a local sql
> database.
> I wrote a class which handles the connection and reading of the table.
> When I try to call .Open on the connection, it fails, the exception is
> something to do with permission.
> I used the same class to connect with a console application and a
> windows application, and it works fine. I am able to connect and read
> the table.
> Can anyone shed some light on what is the difference between
> connecting/accessing to a database via Web Application as opposed to a
> Non-Web App.
> TIA
>
|||Roger,
Thanks for the reply.
I ran SQL Server Enterprise Manager and for that database, I checked
the Users.
there are two, dbo and guest, both having full permissions.
How would I confirm tthat I am running as ASPUSER and create a login
for it?
Thanks,
IV
Roger Wolter[MSFT] wrote:[vbcol=seagreen]
> I think your problem has something to do with permission as the error
> indicates. If you are writing an ASP.Net web page then your web application
> is running as the ASPUSER Windows user and chances are this use does not
> have permissions to connect to the database. When you run as a Windows
> application you run as you and you probably have admin permissions on the
> box which gives you SA permissions in the database so you can do whatever
> you want. Confirm that you are running as ASPUSER and then create a login
> and user for it in SQL Server.
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "IV" <Imtiaz.Vohra@.vtechsr.com> wrote in message
> news:1168476873.734347.313800@.k58g2000hse.googlegr oups.com...
|||Log in as an admin. USE the database where your tables are and execute
these commands (substituting the name of you machine for servername)
CREATE LOGIN [servername\ASPNET] FROM WINDOWS
CREATE USER [servername\ASPNET] FROM LOGIN [servername\ASPNET]
http://msdn2.microsoft.com/en-us/library/ms189751.aspx
http://msdn2.microsoft.com/en-us/library/ms173463.aspx
You will then have to grant this user access to the objects it needs to
access for your application
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"IV" <Imtiaz.Vohra@.vtechsr.com> wrote in message
news:1168487427.667116.147270@.p59g2000hsd.googlegr oups.com...
> Roger,
> Thanks for the reply.
> I ran SQL Server Enterprise Manager and for that database, I checked
> the Users.
> there are two, dbo and guest, both having full permissions.
> How would I confirm tthat I am running as ASPUSER and create a login
> for it?
> Thanks,
> IV
> Roger Wolter[MSFT] wrote:
>
|||Roger,
I appreciate you taking the time to help me out.
I tried what you said and am still failing with the same exception.
Imtiaz
Roger Wolter[MSFT] wrote:[vbcol=seagreen]
> Log in as an admin. USE the database where your tables are and execute
> these commands (substituting the name of you machine for servername)
> CREATE LOGIN [servername\ASPNET] FROM WINDOWS
> CREATE USER [servername\ASPNET] FROM LOGIN [servername\ASPNET]
> http://msdn2.microsoft.com/en-us/library/ms189751.aspx
> http://msdn2.microsoft.com/en-us/library/ms173463.aspx
> You will then have to grant this user access to the objects it needs to
> access for your application
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "IV" <Imtiaz.Vohra@.vtechsr.com> wrote in message
> news:1168487427.667116.147270@.p59g2000hsd.googlegr oups.com...
Subscribe to:
Posts (Atom)