Showing posts with label virtual. Show all posts
Showing posts with label virtual. Show all posts

Sunday, February 19, 2012

Connecting from Management studio with *another* windows account

I'm trying to connect to a SQL Server at work from my virtual PC> The
virtual PC is not logged in under my domain account as it is not part of
the domain.
I need to be able to connect to the domain account using Windows
Authentication. For other services (sourcesafe, printing, shares etc) I
can use "net use \\servername /user:domain\password " to connect under
another account. Sql Server Management studio however does not recognise
this and still tries to log in with vpc\administrator instead.
I'm unable to start the program using runas either (fails with unknown
user or bad password).
Is there a way to connect using a different account without resorting to
SQL accounts?
Jesse"Jesse Houwing" <jesse.houwing@.nospam-sogeti.nl> wrote in message
news:OBtjE$exGHA.1224@.TK2MSFTNGP03.phx.gbl...
> I'm trying to connect to a SQL Server at work from my virtual PC> The
> virtual PC is not logged in under my domain account as it is not part of
> the domain.
> I need to be able to connect to the domain account using Windows
> Authentication. For other services (sourcesafe, printing, shares etc) I
> can use "net use \\servername /user:domain\password " to connect under
> another account. Sql Server Management studio however does not recognise
> this and still tries to log in with vpc\administrator instead.
> I'm unable to start the program using runas either (fails with unknown
> user or bad password).
> Is there a way to connect using a different account without resorting to
> SQL accounts?
>
Without joining your VPC to the domain, you can create local accounts
accounts on both your VPC and your SQL Server (not its domain). The
accounts must have the same password, and appropriate group memberships on
each box. Then Windows will use "workgroup authentication" and your local
user MyVPC\Fred will be able to access resources on the SQL Server as
MySQLServer\Fred.
This is a different mechanism from "net use", and works for all kinds of
authenticated traffic.
David|||* David Browne wrote, On 22-8-2006 16:14:
> "Jesse Houwing" <jesse.houwing@.nospam-sogeti.nl> wrote in message
> news:OBtjE$exGHA.1224@.TK2MSFTNGP03.phx.gbl...
>
> Without joining your VPC to the domain, you can create local accounts
> accounts on both your VPC and your SQL Server (not its domain). The
> accounts must have the same password, and appropriate group memberships on
> each box. Then Windows will use "workgroup authentication" and your local
> user MyVPC\Fred will be able to access resources on the SQL Server as
> MySQLServer\Fred.
> This is a different mechanism from "net use", and works for all kinds of
> authenticated traffic.
This is unfortunately no option
This would force the creation of many extra users for which passwords
need to be synchronised and such...
Jesse

Connecting from Management studio with *another* windows account

I'm trying to connect to a SQL Server at work from my virtual PC> The
virtual PC is not logged in under my domain account as it is not part of
the domain.
I need to be able to connect to the domain account using Windows
Authentication. For other services (sourcesafe, printing, shares etc) I
can use "net use \\servername /user:domain\password " to connect under
another account. Sql Server Management studio however does not recognise
this and still tries to log in with vpc\administrator instead.
I'm unable to start the program using runas either (fails with unknown
user or bad password).
Is there a way to connect using a different account without resorting to
SQL accounts?
Jesse"Jesse Houwing" <jesse.houwing@.nospam-sogeti.nl> wrote in message
news:OBtjE$exGHA.1224@.TK2MSFTNGP03.phx.gbl...
> I'm trying to connect to a SQL Server at work from my virtual PC> The
> virtual PC is not logged in under my domain account as it is not part of
> the domain.
> I need to be able to connect to the domain account using Windows
> Authentication. For other services (sourcesafe, printing, shares etc) I
> can use "net use \\servername /user:domain\password " to connect under
> another account. Sql Server Management studio however does not recognise
> this and still tries to log in with vpc\administrator instead.
> I'm unable to start the program using runas either (fails with unknown
> user or bad password).
> Is there a way to connect using a different account without resorting to
> SQL accounts?
>
Without joining your VPC to the domain, you can create local accounts
accounts on both your VPC and your SQL Server (not its domain). The
accounts must have the same password, and appropriate group memberships on
each box. Then Windows will use "workgroup authentication" and your local
user MyVPC\Fred will be able to access resources on the SQL Server as
MySQLServer\Fred.
This is a different mechanism from "net use", and works for all kinds of
authenticated traffic.
David|||* David Browne wrote, On 22-8-2006 16:14:
> "Jesse Houwing" <jesse.houwing@.nospam-sogeti.nl> wrote in message
> news:OBtjE$exGHA.1224@.TK2MSFTNGP03.phx.gbl...
>> I'm trying to connect to a SQL Server at work from my virtual PC> The
>> virtual PC is not logged in under my domain account as it is not part of
>> the domain.
>> I need to be able to connect to the domain account using Windows
>> Authentication. For other services (sourcesafe, printing, shares etc) I
>> can use "net use \\servername /user:domain\password " to connect under
>> another account. Sql Server Management studio however does not recognise
>> this and still tries to log in with vpc\administrator instead.
>> I'm unable to start the program using runas either (fails with unknown
>> user or bad password).
>> Is there a way to connect using a different account without resorting to
>> SQL accounts?
>
> Without joining your VPC to the domain, you can create local accounts
> accounts on both your VPC and your SQL Server (not its domain). The
> accounts must have the same password, and appropriate group memberships on
> each box. Then Windows will use "workgroup authentication" and your local
> user MyVPC\Fred will be able to access resources on the SQL Server as
> MySQLServer\Fred.
> This is a different mechanism from "net use", and works for all kinds of
> authenticated traffic.
This is unfortunately no option :(
This would force the creation of many extra users for which passwords
need to be synchronised and such...
Jesse

Friday, February 17, 2012

Connecting a web app to sql server

I have a web application running on Server A and need to connect to a SQL Server database on Server B.

In IIS on Server A, I have created a virtual directory called gdoc. For Directory Security I am using Integrated Windows Authentication. When I try to access the application, I get the following error:

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
/gdoc/properties/GDocProperty.asp, line 23


When I change IIS to allow anonymous access the error changes to:

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
/gdoc/properties/GDocProperty.asp, line 23

Line 23 corresponds to the connection string, which is coming from a .udl file. In the .udl the connection string looks like this: Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=GDoc;Data Source=TERRATAX

If I set up my web app on Server B then everything connects fine. It's running the web app on a different server that presents the problem.

This seems like it should be fairly routine, but I can't seem to figure out what I need to do.
The web app is NOT ASP.NET. It's classic .asp.

The reason for this is that the account you are using to connect to Server B(the one running SQL Server) is the IUSR_computernameServerA account (if this were ASP.NET, then the account is the ASPNET), which is the account used when you set IIS to anonymous access. In order to connect to SQL Server from Server A to Server B, you need to create an account named IUSR_computernameServerB on Server B and give this account permissions to access SQL Server. Or, better yet, use SQL authentication. Configure your SQL Server to use SQL authentication then create a SQL account and give that account permissions to the corresponding database. Then, in your connection string, use the credentials of the SQL account.

Hope this helps.|||I tried adding the account to SQL Server, but this is what I get this:

Windows NT User or Group '[domain name]/IUSR_TERRAGIS' not found.|||Have you tried SQL Authentication?