Re: Accessing Remote SQL 2000 with a proxy account
From: Arild Bakken (arildb_@hotmail.com)
Date: 06/28/02
- Next message: Marina Gofman: "Re: Accessing Remote SQL 2000 with a proxy account"
- Previous message: David Stephen: "Web Form/Control Security"
- In reply to: Marina Gofman: "Accessing Remote SQL 2000 with a proxy account"
- Next in thread: Marina Gofman: "Re: Accessing Remote SQL 2000 with a proxy account"
- Reply: Marina Gofman: "Re: Accessing Remote SQL 2000 with a proxy account"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Arild Bakken" <arildb_@hotmail.com> Date: Fri, 28 Jun 2002 08:22:32 +0200
Hi,
I've hade much the same problem. The thing is that even if you are using
impersonation, the webserver cannot delegate your security token to another
computer. It supposed to be possible to turn on delegation, but I've never
got it to work.
Arild
"Marina Gofman" <marinagofman@hotmail.com> wrote in message
news:eRa050iHCHA.2272@tkmsftngp09...
> Hello,
> I am just starting with .NET and here is my problem:
> I have Windows 2000 (IIS 5) and .NET app on one box.
> I am trying to run a simple select query on a remote SQL 2000 server with
> Windows security.
>
> So far I cannot connect and get the error: Login failed for user
> 'domain\username' - (I am using a proxy account)
>
> Any suggestions on how to resolve it would be greatly appreciated.
>
> I changed <processModel > in machine.config : userName=system.
> I also changed web.config to include the impersonation tag with the userID
> and a password that have reading rights in the DB
> (checked it out with the different app)
>
> Another thing that I reset was the security on the app in IS manager to
> integrated in order to debug.
>
> Here are the related code snippets:
>
> private void Button1_Click(object sender, System.EventArgs e)
>
> {
>
> SqlConnection myConnection = new
> SqlConnection("server=abc;database=mmm;Trusted_Connection=yes");
>
> SqlDataAdapter myCommand = new SqlDataAdapter("select * from
tLocation_Dim",
> myConnection);
>
>
> DataSet ds = new DataSet();
>
> myCommand.Fill(ds);
>
> DataGrid1.DataSource = ds.Tables[0].DefaultView;
>
> DataGrid1.DataBind();
>
> }
>
> private void Button2_Click(object sender, System.EventArgs e)
>
> {
>
>
> SqlConnection oConnection = null;
>
> System.String gsConnectionString;
>
> gsConnectionString = "server=abc;database=mmm;Trusted_Connection=yes";
>
> oConnection = new SqlConnection(gsConnectionString);
>
> oConnection.Open();
>
>
>
> System.String sSQL;
>
> sSQL = "select * from tLocation_Dim";
>
> SqlCommand oCommand = new SqlCommand(sSQL, oConnection);
>
> oCommand.CommandType = CommandType.Text;
>
>
> SqlDataAdapter oDa = new SqlDataAdapter();
>
> DataSet oDs = new DataSet();
>
> oDa.SelectCommand = oCommand;
>
> try
>
> {
>
>
>
> oDa.Fill(oDs, "DataSet");
>
> }
>
> catch (Exception ee)
>
> {
>
> throw new Exception("An exception occured in Button2_click", ee);
>
> }
>
> finally
>
> {
>
> // Update Output Parameters
>
>
> }
>
>
> }
>
>
>
>
>
>
>
>
>
- Next message: Marina Gofman: "Re: Accessing Remote SQL 2000 with a proxy account"
- Previous message: David Stephen: "Web Form/Control Security"
- In reply to: Marina Gofman: "Accessing Remote SQL 2000 with a proxy account"
- Next in thread: Marina Gofman: "Re: Accessing Remote SQL 2000 with a proxy account"
- Reply: Marina Gofman: "Re: Accessing Remote SQL 2000 with a proxy account"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]