asp.net and conecting to sql server2005

Discussion in 'ASP .Net' started by =?Utf-8?B?cGVsZWdrMQ==?=, Jul 7, 2007.

  1. i am trying to conenct oto sql server 2005
    when i do it i the VS2005 every is ok
    but when i run from the browser i get :
    The login failed. Login failed for user 'JUSTATHOME\ASPNET'.
    i read this :
    http://support.microsoft.com/kb/316989
    and i wanted the first option to use my own user name and password i did :
    <appSettings>
    <add value="Data Source=.\SQLEXPRESS;Initial Catalog=DB1;Integrated
    Security=True;user id=user1;password=user1;" key="conn"/>
    </appSettings>
    and tried to use
    <connectionStrings>
    <add name="localCon" connectionString="Data Source=.\SQLEXPRESS;Integrated
    Security=True;uid=user1;pwd=user1;database=DB1"
    providerName="System.Data.SqlClient" />

    and i still get the error message on the ASPNET user
    what can i do withought changing the sql the ASPNET user permissions
    thnaks i nadvance
    peleg
    <add name="BoCon" connectionString="Data Source=localhost;Integrated
    Security=True"
    providerName="System.Data.SqlClient" />
    </connectionStrings>
     
    =?Utf-8?B?cGVsZWdrMQ==?=, Jul 7, 2007
    #1
    1. Advertising

  2. 1. Change the way SQL Server Express 2005 authenticates from "Windows"
    to "Mixed Authentication", if you want to use SQL Server logins.

    2. Get rid of Integrated Security=True; :

    Instead of :
    <add value="Data Source=.\SQLEXPRESS;Initial Catalog=DB1;Integrated
    Security=True;user id=user1;password=user1;" key="conn"/>

    ....use :
    <add value="Data Source=.\SQLEXPRESS;Initial Catalog=DB1;user id=user1;password=user1;" key="conn"/>

    The same for your other connection string.

    If you use Integrated Security, you don't need to use a specific user.

    You could, also, get rid of "user id=user1;password=user1;",
    make sure SQL Express is using Windows authentication,
    and create a SQL login for JUSTATHOME\ASPNET.

    Your choice, depending on how you want to handle this.

    If you haven't downloaded SQL Management Studio Express, install it :
    http://www.microsoft.com/downloads/...AE-4BD1-4E3D-94B8-5A0F62BF7796&displaylang=en

    It makes managing SQL Server Express 2055 a whole lot easier.




    Juan T. Llibre, asp.net MVP
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en español : http://asp.net.do/foros/
    ======================================
    "pelegk1" <> wrote in message
    news:...
    >i am trying to conenct oto sql server 2005
    > when i do it i the VS2005 every is ok
    > but when i run from the browser i get :
    > The login failed. Login failed for user 'JUSTATHOME\ASPNET'.
    > i read this :
    > http://support.microsoft.com/kb/316989
    > and i wanted the first option to use my own user name and password i did :
    > <appSettings>
    > <add value="Data Source=.\SQLEXPRESS;Initial Catalog=DB1;Integrated
    > Security=True;user id=user1;password=user1;" key="conn"/>
    > </appSettings>
    > and tried to use
    > <connectionStrings>
    > <add name="localCon" connectionString="Data Source=.\SQLEXPRESS;Integrated
    > Security=True;uid=user1;pwd=user1;database=DB1"
    > providerName="System.Data.SqlClient" />
    >
    > and i still get the error message on the ASPNET user
    > what can i do withought changing the sql the ASPNET user permissions
    > thnaks i nadvance
    > peleg
    > <add name="BoCon" connectionString="Data Source=localhost;Integrated
    > Security=True"
    > providerName="System.Data.SqlClient" />
    > </connectionStrings>
     
    Juan T. Llibre, Jul 8, 2007
    #2
    1. Advertising

  3. Thanksalot
    i wil ltest it
    peleg

    "Juan T. Llibre" wrote:

    > 1. Change the way SQL Server Express 2005 authenticates from "Windows"
    > to "Mixed Authentication", if you want to use SQL Server logins.
    >
    > 2. Get rid of Integrated Security=True; :
    >
    > Instead of :
    > <add value="Data Source=.\SQLEXPRESS;Initial Catalog=DB1;Integrated
    > Security=True;user id=user1;password=user1;" key="conn"/>
    >
    > ....use :
    > <add value="Data Source=.\SQLEXPRESS;Initial Catalog=DB1;user id=user1;password=user1;" key="conn"/>
    >
    > The same for your other connection string.
    >
    > If you use Integrated Security, you don't need to use a specific user.
    >
    > You could, also, get rid of "user id=user1;password=user1;",
    > make sure SQL Express is using Windows authentication,
    > and create a SQL login for JUSTATHOME\ASPNET.
    >
    > Your choice, depending on how you want to handle this.
    >
    > If you haven't downloaded SQL Management Studio Express, install it :
    > http://www.microsoft.com/downloads/...AE-4BD1-4E3D-94B8-5A0F62BF7796&displaylang=en
    >
    > It makes managing SQL Server Express 2055 a whole lot easier.
    >
    >
    >
    >
    > Juan T. Llibre, asp.net MVP
    > asp.net faq : http://asp.net.do/faq/
    > foros de asp.net, en español : http://asp.net.do/foros/
    > ======================================
    > "pelegk1" <> wrote in message
    > news:...
    > >i am trying to conenct oto sql server 2005
    > > when i do it i the VS2005 every is ok
    > > but when i run from the browser i get :
    > > The login failed. Login failed for user 'JUSTATHOME\ASPNET'.
    > > i read this :
    > > http://support.microsoft.com/kb/316989
    > > and i wanted the first option to use my own user name and password i did :
    > > <appSettings>
    > > <add value="Data Source=.\SQLEXPRESS;Initial Catalog=DB1;Integrated
    > > Security=True;user id=user1;password=user1;" key="conn"/>
    > > </appSettings>
    > > and tried to use
    > > <connectionStrings>
    > > <add name="localCon" connectionString="Data Source=.\SQLEXPRESS;Integrated
    > > Security=True;uid=user1;pwd=user1;database=DB1"
    > > providerName="System.Data.SqlClient" />
    > >
    > > and i still get the error message on the ASPNET user
    > > what can i do withought changing the sql the ASPNET user permissions
    > > thnaks i nadvance
    > > peleg
    > > <add name="BoCon" connectionString="Data Source=localhost;Integrated
    > > Security=True"
    > > providerName="System.Data.SqlClient" />
    > > </connectionStrings>

    >
    >
    >
     
    =?Utf-8?B?cGVsZWdrMQ==?=, Jul 8, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?c2NvdHRybQ==?=

    sql session state for .net v1.1/.net v2.0 and sql server 2005

    =?Utf-8?B?c2NvdHRybQ==?=, Feb 13, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    2,809
    Steven Cheng[MSFT]
    Feb 16, 2006
  2. Otuatail

    Conecting to Access via DSN

    Otuatail, Dec 5, 2003, in forum: HTML
    Replies:
    3
    Views:
    422
    Whitecrest
    Dec 6, 2003
  3. luis
    Replies:
    9
    Views:
    712
    Tim Chase
    Jul 3, 2006
  4. ecoolone
    Replies:
    0
    Views:
    783
    ecoolone
    Jan 3, 2008
  5. Bigadds

    Conecting web buttons to a web service

    Bigadds, Jul 12, 2007, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    98
    Manish Bafna
    Jul 13, 2007
Loading...

Share This Page