MSDE, ASP.NET, Visual Studio .NET, and connectionstrings

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nathan Sokalski

    #16
    Re: MSDE, ASP.NET, Visual Studio .NET, and connectionstrin gs

    When using that connectionstrin g I get the following error:

    Server Error in '/PAPresenters' Application.
    --------------------------------------------------------------------------------

    Login failed for user 'NJS\ASPNET'.
    Description: An unhandled exception occurred during the execution of the
    current web request. Please review the stack trace for more information
    about the error and where it originated in the code.

    Exception Details: System.Data.Sql Client.SqlExcep tion: Login failed for user
    'NJS\ASPNET'.

    Source Error:

    Line 32: cmdTesting.Comm andText = txtSQLStatement .Text
    Line 33: cmdTesting.Conn ection = myconnection
    Line 34: myconnection.Op en()
    Line 35: cmdTesting.Exec uteNonQuery()
    Line 36: myconnection.Cl ose()

    Source File: c:\inetpub\wwwr oot\PAPresenter s\DBtest.aspx.v b Line: 34

    Stack Trace:

    [SqlException: Login failed for user 'NJS\ASPNET'.]
    System.Data.Sql Client.Connecti onPool.GetConne ction(Boolean&
    isInTransaction ) +474
    System.Data.Sql Client.SqlConne ctionPoolManage r.GetPooledConn ection(SqlConne ctionString
    options, Boolean& isInTransaction ) +372
    System.Data.Sql Client.SqlConne ction.Open() +384
    PAPresenters.DB test.btnExecute _Click(Object sender, EventArgs e) in
    c:\inetpub\wwwr oot\PAPresenter s\DBtest.aspx.v b:34
    System.Web.UI.W ebControls.Butt on.OnClick(Even tArgs e) +108
    System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.RaiseP ostBackEvent(St ring
    eventArgument) +57
    System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
    sourceControl, String eventArgument) +18
    System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData) +33
    System.Web.UI.P age.ProcessRequ estMain() +1273



    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:1.1.432 2.2032; ASP.NET
    Version:1.1.432 2.2032


    I don't know of anything I could have done that I haven't told you that
    would be related in any way. If there were any more details I could give you
    (and there probably are, but I'm not sure how to get them or even what they
    would be) I would, but right now I'm pretty much pulling my hair out. I'm
    willing to try anything. Thank you for anything you can find.
    --
    Nathan Sokalski
    njsokalski@hotm ail.com
    有声小说网为广大读者提供热门小说在线免费阅读,本站收集的网络文学小说情节跌宕起伏,有声小说网是值得书友们收藏的小说在线阅读网。


    "Juan T. Llibre" <nomailreplies@ nowhere.com> wrote in message
    news:esZxrBReFH A.544@TK2MSFTNG P12.phx.gbl...[color=blue]
    > Did you try :
    >
    > "Server=NJS;Tru sted_Connection =True;Database= papresenters"
    >
    > ?
    >
    > On a box where both the web server and MSDE are running, that should
    > connect.
    > Is there anything else you're doing that you haven't told us ?
    >
    > Did you read
    > http://msdn.microsoft.com/library/de...2000webapp.asp
    >
    > ?
    >
    > There's code samples there which I *know* work.
    >
    >
    >
    > Juan T. Llibre
    > ASP.NET MVP
    > http://asp.net.do/foros/
    > Foros de ASP.NET en Español
    > Ven, y hablemos de ASP.NET...
    > =============== =======
    >
    > "Nathan Sokalski" <njsokalski@hot mail.com> wrote in message
    > news:O3GCZ%23Pe FHA.2556@TK2MSF TNGP10.phx.gbl. ..[color=green]
    >> Yes, I used the ones you suggested.
    >> --
    >> Nathan Sokalski
    >> njsokalski@hotm ail.com
    >> http://www.nathansokalski.com/
    >>
    >> "Juan T. Llibre" <nomailreplies@ nowhere.com> wrote in message
    >> news:%23pcIkDHe FHA.2700@tk2msf tngp13.phx.gbl. ..[color=darkred]
    >>> Did you try the connection strings I suggested,
    >>> or are you still using the other connection strings ?
    >>>
    >>>
    >>>
    >>> Juan T. Llibre
    >>> ASP.NET MVP
    >>> http://asp.net.do/foros/
    >>> Foros de ASP.NET en Español
    >>> Ven, y hablemos de ASP.NET...
    >>> =============== =======
    >>>
    >>> "Nathan Sokalski" <njsokalski@hot mail.com> wrote in message
    >>> news:esNBVAHeFH A.1920@tk2msftn gp13.phx.gbl...
    >>>>I eventually got past the Login Failed error by adding permissions for
    >>>>NJS\ASPNE T to the database file. However, I am now recieving the
    >>>>following error:
    >>>>
    >>>>
    >>>> Server Error in '/PAPresenters' Application.
    >>>> --------------------------------------------------------------------------------
    >>>>
    >>>> SQL Server does not exist or access denied.
    >>>> Description: An unhandled exception occurred during the execution of
    >>>> the current web request. Please review the stack trace for more
    >>>> information about the error and where it originated in the code.
    >>>>
    >>>> Exception Details: System.Data.Sql Client.SqlExcep tion: SQL Server does
    >>>> not exist or access denied.
    >>>>
    >>>> Source Error:
    >>>>
    >>>> Line 33: cmdTesting.Comm andText = txtSQLStatement .Text
    >>>> Line 34: cmdTesting.Conn ection = myconnection
    >>>> Line 35: myconnection.Op en()
    >>>> Line 36: cmdTesting.Exec uteNonQuery()
    >>>> Line 37: myconnection.Cl ose()
    >>>>
    >>>> Source File: c:\inetpub\wwwr oot\PAPresenter s\DBtest.aspx.v b Line: 35
    >>>>
    >>>> Stack Trace:
    >>>>
    >>>> [SqlException: SQL Server does not exist or access denied.]
    >>>> System.Data.Sql Client.Connecti onPool.GetConne ction(Boolean&
    >>>> isInTransaction ) +474
    >>>>
    >>>> System.Data.Sql Client.SqlConne ctionPoolManage r.GetPooledConn ection(SqlConne ctionString
    >>>> options, Boolean& isInTransaction ) +372
    >>>> System.Data.Sql Client.SqlConne ction.Open() +384
    >>>> PAPresenters.DB test.btnExecute _Click(Object sender, EventArgs e) in
    >>>> c:\inetpub\wwwr oot\PAPresenter s\DBtest.aspx.v b:35
    >>>> System.Web.UI.W ebControls.Butt on.OnClick(Even tArgs e) +108
    >>>>
    >>>> System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.RaiseP ostBackEvent(St ring
    >>>> eventArgument) +57
    >>>> System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
    >>>> sourceControl, String eventArgument) +18
    >>>> System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData)
    >>>> +33
    >>>> System.Web.UI.P age.ProcessRequ estMain() +1292
    >>>>
    >>>>
    >>>>
    >>>> --------------------------------------------------------------------------------
    >>>> Version Information: Microsoft .NET Framework Version:1.1.432 2.2032;
    >>>> ASP.NET Version:1.1.432 2.2032
    >>>>
    >>>>
    >>>> I have SQL Server Desktop Engine running (when I hover my cursor over
    >>>> the icon in the system tray it says "Running - \\NJS - MSSQLSERVER" and
    >>>> the icon shows the green arrow, which means it is running). What am I
    >>>> not doing? Thank you very much for your help, I greatly appreciate the
    >>>> quick responses.
    >>>> --
    >>>> Nathan Sokalski
    >>>> njsokalski@hotm ail.com
    >>>> http://www.nathansokalski.com/
    >>>>
    >>>> "Juan T. Llibre" <nomailreplies@ nowhere.com> wrote in message
    >>>> news:%23XkXgEGe FHA.1400@TK2MSF TNGP15.phx.gbl. ..
    >>>>>I think I tried it under .NET Beta 2, instead of .NET 1.1.
    >>>>> Nevertheless, try the simpler connection string I suggested.
    >>>>>
    >>>>> Per
    >>>>> http://msdn.microsoft.com/library/de...2000webapp.asp
    >>>>> a slightly more optimized connection string is :
    >>>>>
    >>>>> "Server=localho st;Database=Pic s2Share;Trusted _Connection=Tru e;
    >>>>> Connection Timeout=60;Pool ing=True;Min Pool Size=1;Max Pool Size=5"
    >>>>>
    >>>>> But the simpler connection string I suggested
    >>>>> should give you basic connectivity :
    >>>>>
    >>>>> "Server=NJS;Tru sted_Connection =True;Database= papresenters"
    >>>>>
    >>>>> The optimized connection string for your case would be :
    >>>>>
    >>>>> "Server=NJS;Dat abase=papresent ers;Trusted_Con nection=True;
    >>>>> Connection Timeout=60;Pool ing=True;Min Pool Size=1;Max Pool Size=5"
    >>>>>
    >>>>> You could also use
    >>>>> "Server=(local) ;Database=papre senters;Trusted _Connection=Tru e;
    >>>>> Connection Timeout=60;Pool ing=True;Min Pool Size=1;Max Pool Size=5"
    >>>>>
    >>>>> Using Trusted_Connect ion should prevent the error you're getting:
    >>>>> Login failed for user 'NJS\ASPNET'.
    >>>>>
    >>>>>
    >>>>>
    >>>>> Juan T. Llibre
    >>>>> ASP.NET MVP
    >>>>> http://asp.net.do/foros/
    >>>>> Foros de ASP.NET en Español
    >>>>> Ven, y hablemos de ASP.NET...
    >>>>> =============== =======
    >>>>>
    >>>>> "Nathan Sokalski" <njsokalski@hot mail.com> wrote in message
    >>>>> news:Oi55kZFeFH A.2844@TK2MSFTN GP14.phx.gbl...
    >>>>> That is not one of the listed providers. the listed providers that are
    >>>>> brought up are:
    >>>>>
    >>>>> If there is somewhere on the web that I can download the provider you
    >>>>> mentioned from, I would like to know about it, but right now all I
    >>>>> have are the ones shown above. Thanks.
    >>>>> --
    >>>>> Nathan Sokalski
    >>>>> njsokalski@hotm ail.com
    >>>>> http://www.nathansokalski.com/
    >>>>>
    >>>>> "Juan T. Llibre" <nomailreplies@ nowhere.com> wrote in message
    >>>>> news:exM$pAFeFH A.1328@TK2MSFTN GP12.phx.gbl...
    >>>>>> It looks like you selected the wrong provider when creating the
    >>>>>> connection.
    >>>>>>
    >>>>>> You should select the ".NET Framework Data Provider for SQL Server"
    >>>>>> for a provider.
    >>>>>>
    >>>>>> Try it using that provider. You should get a correct string if you
    >>>>>> do.
    >>>>>>
    >>>>>> If you still have problems, try a simpler connection string :
    >>>>>>
    >>>>>> "Server=NJS;Tru sted_Connection =True;Database= papresenters"
    >>>>>>
    >>>>>> That assumes that your MSDE's instance name is "NJS"
    >>>>>> and that your database name is "papresente rs".
    >>>>>>
    >>>>>>
    >>>>>> Juan T. Llibre
    >>>>>> ASP.NET MVP
    >>>>>> http://asp.net.do/foros/
    >>>>>> Foros de ASP.NET en Español
    >>>>>> Ven, y hablemos de ASP.NET...
    >>>>>> =============== =======
    >>>>>>
    >>>>>> "Nathan Sokalski" <njsokalski@hot mail.com> wrote in message
    >>>>>> news:esCnY4EeFH A.1404@TK2MSFTN GP09.phx.gbl...
    >>>>>>>I have tried that, but the connectionstrin g that is created has
    >>>>>>>plenty of stuff in it
    >>>>>>>that gives me errors. For example:
    >>>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>>> Server Error in '/PAPresenters' Application.
    >>>>>>> --------------------------------------------------------------------------------
    >>>>>>>
    >>>>>>> Keyword not supported: 'provider'.
    >>>>>>> Description: An unhandled exception occurred during the execution of
    >>>>>>> the current web
    >>>>>>> request. Please review the stack trace for more information about
    >>>>>>> the error and where it
    >>>>>>> originated in the code.
    >>>>>>>
    >>>>>>> Exception Details: System.Argument Exception: Keyword not supported:
    >>>>>>> 'provider'.
    >>>>>>>
    >>>>>>> Source Error:
    >>>>>>>
    >>>>>>> Line 28:
    >>>>>>> Line 29: Private Sub btnExecute_Clic k(ByVal sender As
    >>>>>>> System.Object, ByVal e As
    >>>>>>> System.EventArg s) Handles btnExecute.Clic k
    >>>>>>> Line 30: Dim myconnection As New
    >>>>>>> System.Data.Sql Client.SqlConne ction("Provider =SQLOLEDB.1;Int egrated
    >>>>>>> Security=SSPI;P ersist Security Info=False;Init ial
    >>>>>>> Catalog=paprese nters;Data
    >>>>>>> Source=NJS;Use Procedure for Prepare=1;Auto Translate=True; Packet
    >>>>>>> Size=4096;Works tation
    >>>>>>> ID=NJS;Use Encryption for Data=False;Tag with column collation when
    >>>>>>> possible=False" )
    >>>>>>> Line 31: Dim cmdTesting As New
    >>>>>>> System.Data.Sql Client.SqlComma nd
    >>>>>>> Line 32: Dim dataadapter As New
    >>>>>>> System.Data.Sql Client.SqlDataA dapter
    >>>>>>>
    >>>>>>> Source File: c:\inetpub\wwwr oot\PAPresenter s\DBtest.aspx.v b Line:
    >>>>>>> 30
    >>>>>>>
    >>>>>>> Stack Trace:
    >>>>>>>
    >>>>>>> [ArgumentExcepti on: Keyword not supported: 'provider'.]
    >>>>>>> System.Data.Com mon.DBConnectio nString.ParseIn ternal(Char[]
    >>>>>>> connectionStrin g,
    >>>>>>> UdlSupport checkForUdl, NameValuePair& keychain) +1133
    >>>>>>> System.Data.Com mon.DBConnectio nString..ctor(S tring
    >>>>>>> connectionStrin g, UdlSupport
    >>>>>>> checkForUdl) +114
    >>>>>>> System.Data.Sql Client.SqlConne ctionString..ct or(String
    >>>>>>> connectionStrin g) +13
    >>>>>>> System.Data.Sql Client.SqlConne ctionString.Par seString(String
    >>>>>>> connectionStrin g) +96
    >>>>>>> System.Data.Sql Client.SqlConne ction.set_Conne ctionString(Str ing
    >>>>>>> value) +11
    >>>>>>> System.Data.Sql Client.SqlConne ction..ctor(Str ing connectionStrin g)
    >>>>>>> +158
    >>>>>>> PAPresenters.DB test.btnExecute _Click(Object sender, EventArgs e)
    >>>>>>> in
    >>>>>>> c:\inetpub\wwwr oot\PAPresenter s\DBtest.aspx.v b:30
    >>>>>>> System.Web.UI.W ebControls.Butt on.OnClick(Even tArgs e) +108
    >>>>>>>
    >>>>>>> System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.RaiseP ostBackEvent(St ring
    >>>>>>> eventArgument) +57
    >>>>>>> System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
    >>>>>>> sourceControl, String
    >>>>>>> eventArgument) +18
    >>>>>>> System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection
    >>>>>>> postData) +33
    >>>>>>> System.Web.UI.P age.ProcessRequ estMain() +1292
    >>>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>>> --------------------------------------------------------------------------------
    >>>>>>> Version Information: Microsoft .NET Framework Version:1.1.432 2.2032;
    >>>>>>> ASP.NET
    >>>>>>> Version:1.1.432 2.2032
    >>>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>>> Although I don't know much about connectionstrin gs, the little bit
    >>>>>>> of experience I have
    >>>>>>> leads me to think that the connectionstrin g generated by Visual
    >>>>>>> Studio .NET has a lot
    >>>>>>> more stuff in it than necessary, but either way it is not working.
    >>>>>>> Why is this, and how
    >>>>>>> can I fix it? Thanks.
    >>>>>>> --
    >>>>>>> Nathan Sokalski
    >>>>>>> njsokalski@hotm ail.com
    >>>>>>> http://www.nathansokalski.com/
    >>>>>>>
    >>>>>>> "Juan T. Llibre" <nomailreplies@ nowhere.com> wrote in message
    >>>>>>> news:e8E%23LaEe FHA.1136@TK2MSF TNGP12.phx.gbl. ..
    >>>>>>>>
    >>>>>>>> 1. Create at least one empty table in that database,
    >>>>>>>> using the Server Explorer.
    >>>>>>>>
    >>>>>>>> 2. Use the Server Explorer's "Add Connection" wizard
    >>>>>>>> ( right-click "Data Connections" ) to create a connection.
    >>>>>>>>
    >>>>>>>> 3. The connection string will be created for you.
    >>>>>>>>
    >>>>>>>> 4. Right-click the created connection and select Properties.
    >>>>>>>>
    >>>>>>>> 5. Copy the connection string from the "Properties " box.
    >>>>>>>>
    >>>>>>>>
    >>>>>>>>
    >>>>>>>>
    >>>>>>>> Juan T. Llibre
    >>>>>>>> ASP.NET MVP
    >>>>>>>> http://asp.net.do/foros/
    >>>>>>>> Foros de ASP.NET en Español
    >>>>>>>> Ven, y hablemos de ASP.NET...
    >>>>>>>> =============== =======
    >>>>>>>>
    >>>>>>>> "Nathan Sokalski" <njsokalski@hot mail.com> wrote in message
    >>>>>>>> news:e7ceEVEeFH A.3712@TK2MSFTN GP09.phx.gbl...
    >>>>>>>>>I have Visual Studio .NET and SQL Server Desktop Engine on my
    >>>>>>>>>comput er. I
    >>>>>>>>> have created an empty database using Visual Studio .NET's Server
    >>>>>>>>> Explorer.
    >>>>>>>>> However, I am having trouble connecting to the database using
    >>>>>>>>> ASP.NET. I
    >>>>>>>>> think the problem is somewhere in my connection string, but
    >>>>>>>>> because I do not
    >>>>>>>>> know much about connection strings, I am not sure what it should
    >>>>>>>>> look like.
    >>>>>>>>> Can someone please help me determine what my connection string
    >>>>>>>>> should look
    >>>>>>>>> like? I am using the version of IIS that comes with XP Pro.
    >>>>>>>>> Thanks.[/color][/color]
    >
    >[/color]


    Comment

    • Juan T. Llibre

      #17
      Re: MSDE, ASP.NET, Visual Studio .NET, and connectionstrin gs

      re:
      Login failed for user 'NJS\ASPNET'.

      Download the SQL Web Administrator
      http://www.microsoft.com/downloads/d...displaylang=en

      With it, you can manage logins for MSDE databases.

      Add an ad-hoc username to your PAPresenters database,
      give it read/write permissions, and include that user in a new
      connection string that specifies that user.

      Example :

      "Data Source=NJS;Init ial Catalog=PAPrese nters;User Id=YourUser;Pas sword=thePasswo rd;"

      You could also add the user NJS\ASPNET to your PAPresenters database,
      with the SQL Web Administrator, and use the original connection string supplied:

      "Server=NJS;Tru sted_Connection =True;Database= papresenters"





      Juan T. Llibre
      ASP.NET MVP

      Foros de ASP.NET en Español
      Ven, y hablemos de ASP.NET...
      =============== =======

      "Nathan Sokalski" <njsokalski@hot mail.com> wrote in message
      news:e1sqvSSeFH A.2880@TK2MSFTN GP10.phx.gbl...[color=blue]
      > When using that connectionstrin g I get the following error:
      >
      > Server Error in '/PAPresenters' Application.
      > --------------------------------------------------------------------------------
      >
      > Login failed for user 'NJS\ASPNET'.
      > Description: An unhandled exception occurred during the execution of the current web
      > request. Please review the stack trace for more information about the error and where it
      > originated in the code.
      >
      > Exception Details: System.Data.Sql Client.SqlExcep tion: Login failed for user
      > 'NJS\ASPNET'.
      >
      > Source Error:
      >
      > Line 32: cmdTesting.Comm andText = txtSQLStatement .Text
      > Line 33: cmdTesting.Conn ection = myconnection
      > Line 34: myconnection.Op en()
      > Line 35: cmdTesting.Exec uteNonQuery()
      > Line 36: myconnection.Cl ose()
      >
      > Source File: c:\inetpub\wwwr oot\PAPresenter s\DBtest.aspx.v b Line: 34
      >
      > Stack Trace:
      >
      > [SqlException: Login failed for user 'NJS\ASPNET'.]
      > System.Data.Sql Client.Connecti onPool.GetConne ction(Boolean& isInTransaction ) +474
      > System.Data.Sql Client.SqlConne ctionPoolManage r.GetPooledConn ection(SqlConne ctionString
      > options, Boolean& isInTransaction ) +372
      > System.Data.Sql Client.SqlConne ction.Open() +384
      > PAPresenters.DB test.btnExecute _Click(Object sender, EventArgs e) in
      > c:\inetpub\wwwr oot\PAPresenter s\DBtest.aspx.v b:34
      > System.Web.UI.W ebControls.Butt on.OnClick(Even tArgs e) +108
      >
      > System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.RaiseP ostBackEvent(St ring
      > eventArgument) +57
      > System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler sourceControl, String
      > eventArgument) +18
      > System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData) +33
      > System.Web.UI.P age.ProcessRequ estMain() +1273
      >
      >
      >
      > --------------------------------------------------------------------------------
      > Version Information: Microsoft .NET Framework Version:1.1.432 2.2032; ASP.NET
      > Version:1.1.432 2.2032
      >
      >
      > I don't know of anything I could have done that I haven't told you that would be related
      > in any way. If there were any more details I could give you (and there probably are, but
      > I'm not sure how to get them or even what they would be) I would, but right now I'm
      > pretty much pulling my hair out. I'm willing to try anything. Thank you for anything you
      > can find.
      > --
      > Nathan Sokalski
      > njsokalski@hotm ail.com
      > http://www.nathansokalski.com/
      >
      > "Juan T. Llibre" <nomailreplies@ nowhere.com> wrote in message
      > news:esZxrBReFH A.544@TK2MSFTNG P12.phx.gbl...[color=green]
      >> Did you try :
      >>
      >> "Server=NJS;Tru sted_Connection =True;Database= papresenters"
      >>
      >> ?
      >>
      >> On a box where both the web server and MSDE are running, that should connect.
      >> Is there anything else you're doing that you haven't told us ?
      >>
      >> Did you read
      >> http://msdn.microsoft.com/library/de...2000webapp.asp
      >>
      >> ?
      >>
      >> There's code samples there which I *know* work.
      >>
      >>
      >>
      >> Juan T. Llibre
      >> ASP.NET MVP
      >> http://asp.net.do/foros/
      >> Foros de ASP.NET en Español
      >> Ven, y hablemos de ASP.NET...
      >> =============== =======
      >>
      >> "Nathan Sokalski" <njsokalski@hot mail.com> wrote in message
      >> news:O3GCZ%23Pe FHA.2556@TK2MSF TNGP10.phx.gbl. ..[color=darkred]
      >>> Yes, I used the ones you suggested.
      >>> --
      >>> Nathan Sokalski
      >>> njsokalski@hotm ail.com
      >>> http://www.nathansokalski.com/
      >>>
      >>> "Juan T. Llibre" <nomailreplies@ nowhere.com> wrote in message
      >>> news:%23pcIkDHe FHA.2700@tk2msf tngp13.phx.gbl. ..
      >>>> Did you try the connection strings I suggested,
      >>>> or are you still using the other connection strings ?
      >>>>
      >>>>
      >>>>
      >>>> Juan T. Llibre
      >>>> ASP.NET MVP
      >>>> http://asp.net.do/foros/
      >>>> Foros de ASP.NET en Español
      >>>> Ven, y hablemos de ASP.NET...
      >>>> =============== =======
      >>>>
      >>>> "Nathan Sokalski" <njsokalski@hot mail.com> wrote in message
      >>>> news:esNBVAHeFH A.1920@tk2msftn gp13.phx.gbl...
      >>>>>I eventually got past the Login Failed error by adding permissions for NJS\ASPNET to
      >>>>>the database file. However, I am now recieving the following error:
      >>>>>
      >>>>>
      >>>>> Server Error in '/PAPresenters' Application.
      >>>>> --------------------------------------------------------------------------------
      >>>>>
      >>>>> SQL Server does not exist or access denied.
      >>>>> Description: An unhandled exception occurred during the execution of the current web
      >>>>> request. Please review the stack trace for more information about the error and
      >>>>> where it originated in the code.
      >>>>>
      >>>>> Exception Details: System.Data.Sql Client.SqlExcep tion: SQL Server does not exist or
      >>>>> access denied.
      >>>>>
      >>>>> Source Error:
      >>>>>
      >>>>> Line 33: cmdTesting.Comm andText = txtSQLStatement .Text
      >>>>> Line 34: cmdTesting.Conn ection = myconnection
      >>>>> Line 35: myconnection.Op en()
      >>>>> Line 36: cmdTesting.Exec uteNonQuery()
      >>>>> Line 37: myconnection.Cl ose()
      >>>>>
      >>>>> Source File: c:\inetpub\wwwr oot\PAPresenter s\DBtest.aspx.v b Line: 35
      >>>>>
      >>>>> Stack Trace:
      >>>>>
      >>>>> [SqlException: SQL Server does not exist or access denied.]
      >>>>> System.Data.Sql Client.Connecti onPool.GetConne ction(Boolean& isInTransaction ) +474
      >>>>>
      >>>>> System.Data.Sql Client.SqlConne ctionPoolManage r.GetPooledConn ection(SqlConne ctionString
      >>>>> options, Boolean& isInTransaction ) +372
      >>>>> System.Data.Sql Client.SqlConne ction.Open() +384
      >>>>> PAPresenters.DB test.btnExecute _Click(Object sender, EventArgs e) in
      >>>>> c:\inetpub\wwwr oot\PAPresenter s\DBtest.aspx.v b:35
      >>>>> System.Web.UI.W ebControls.Butt on.OnClick(Even tArgs e) +108
      >>>>>
      >>>>> System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.RaiseP ostBackEvent(St ring
      >>>>> eventArgument) +57
      >>>>> System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler sourceControl, String
      >>>>> eventArgument) +18
      >>>>> System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData) +33
      >>>>> System.Web.UI.P age.ProcessRequ estMain() +1292
      >>>>>
      >>>>>
      >>>>>
      >>>>> --------------------------------------------------------------------------------
      >>>>> Version Information: Microsoft .NET Framework Version:1.1.432 2.2032; ASP.NET
      >>>>> Version:1.1.432 2.2032
      >>>>>
      >>>>>
      >>>>> I have SQL Server Desktop Engine running (when I hover my cursor over the icon in
      >>>>> the system tray it says "Running - \\NJS - MSSQLSERVER" and the icon shows the green
      >>>>> arrow, which means it is running). What am I not doing? Thank you very much for your
      >>>>> help, I greatly appreciate the quick responses.
      >>>>> --
      >>>>> Nathan Sokalski
      >>>>> njsokalski@hotm ail.com
      >>>>> http://www.nathansokalski.com/
      >>>>>
      >>>>> "Juan T. Llibre" <nomailreplies@ nowhere.com> wrote in message
      >>>>> news:%23XkXgEGe FHA.1400@TK2MSF TNGP15.phx.gbl. ..
      >>>>>>I think I tried it under .NET Beta 2, instead of .NET 1.1.
      >>>>>> Nevertheless, try the simpler connection string I suggested.
      >>>>>>
      >>>>>> Per
      >>>>>> http://msdn.microsoft.com/library/de...2000webapp.asp
      >>>>>> a slightly more optimized connection string is :
      >>>>>>
      >>>>>> "Server=localho st;Database=Pic s2Share;Trusted _Connection=Tru e;
      >>>>>> Connection Timeout=60;Pool ing=True;Min Pool Size=1;Max Pool Size=5"
      >>>>>>
      >>>>>> But the simpler connection string I suggested
      >>>>>> should give you basic connectivity :
      >>>>>>
      >>>>>> "Server=NJS;Tru sted_Connection =True;Database= papresenters"
      >>>>>>
      >>>>>> The optimized connection string for your case would be :
      >>>>>>
      >>>>>> "Server=NJS;Dat abase=papresent ers;Trusted_Con nection=True;
      >>>>>> Connection Timeout=60;Pool ing=True;Min Pool Size=1;Max Pool Size=5"
      >>>>>>
      >>>>>> You could also use
      >>>>>> "Server=(local) ;Database=papre senters;Trusted _Connection=Tru e;
      >>>>>> Connection Timeout=60;Pool ing=True;Min Pool Size=1;Max Pool Size=5"
      >>>>>>
      >>>>>> Using Trusted_Connect ion should prevent the error you're getting:
      >>>>>> Login failed for user 'NJS\ASPNET'.
      >>>>>>
      >>>>>>
      >>>>>>
      >>>>>> Juan T. Llibre
      >>>>>> ASP.NET MVP
      >>>>>> http://asp.net.do/foros/
      >>>>>> Foros de ASP.NET en Español
      >>>>>> Ven, y hablemos de ASP.NET...
      >>>>>> =============== =======
      >>>>>>
      >>>>>> "Nathan Sokalski" <njsokalski@hot mail.com> wrote in message
      >>>>>> news:Oi55kZFeFH A.2844@TK2MSFTN GP14.phx.gbl...
      >>>>>> That is not one of the listed providers. the listed providers that are brought up
      >>>>>> are:
      >>>>>>
      >>>>>> If there is somewhere on the web that I can download the provider you mentioned
      >>>>>> from, I would like to know about it, but right now all I have are the ones shown
      >>>>>> above. Thanks.
      >>>>>> --
      >>>>>> Nathan Sokalski
      >>>>>> njsokalski@hotm ail.com
      >>>>>> http://www.nathansokalski.com/
      >>>>>>
      >>>>>> "Juan T. Llibre" <nomailreplies@ nowhere.com> wrote in message
      >>>>>> news:exM$pAFeFH A.1328@TK2MSFTN GP12.phx.gbl...
      >>>>>>> It looks like you selected the wrong provider when creating the connection.
      >>>>>>>
      >>>>>>> You should select the ".NET Framework Data Provider for SQL Server"
      >>>>>>> for a provider.
      >>>>>>>
      >>>>>>> Try it using that provider. You should get a correct string if you do.
      >>>>>>>
      >>>>>>> If you still have problems, try a simpler connection string :
      >>>>>>>
      >>>>>>> "Server=NJS;Tru sted_Connection =True;Database= papresenters"
      >>>>>>>
      >>>>>>> That assumes that your MSDE's instance name is "NJS"
      >>>>>>> and that your database name is "papresente rs".
      >>>>>>>
      >>>>>>>
      >>>>>>> Juan T. Llibre
      >>>>>>> ASP.NET MVP
      >>>>>>> http://asp.net.do/foros/
      >>>>>>> Foros de ASP.NET en Español
      >>>>>>> Ven, y hablemos de ASP.NET...
      >>>>>>> =============== =======
      >>>>>>>
      >>>>>>> "Nathan Sokalski" <njsokalski@hot mail.com> wrote in message
      >>>>>>> news:esCnY4EeFH A.1404@TK2MSFTN GP09.phx.gbl...
      >>>>>>>>I have tried that, but the connectionstrin g that is created has plenty of stuff in
      >>>>>>>>it
      >>>>>>>>that gives me errors. For example:
      >>>>>>>>
      >>>>>>>>
      >>>>>>>>
      >>>>>>>> Server Error in '/PAPresenters' Application.
      >>>>>>>> --------------------------------------------------------------------------------
      >>>>>>>>
      >>>>>>>> Keyword not supported: 'provider'.
      >>>>>>>> Description: An unhandled exception occurred during the execution of the current
      >>>>>>>> web
      >>>>>>>> request. Please review the stack trace for more information about the error and
      >>>>>>>> where it
      >>>>>>>> originated in the code.
      >>>>>>>>
      >>>>>>>> Exception Details: System.Argument Exception: Keyword not supported: 'provider'.
      >>>>>>>>
      >>>>>>>> Source Error:
      >>>>>>>>
      >>>>>>>> Line 28:
      >>>>>>>> Line 29: Private Sub btnExecute_Clic k(ByVal sender As System.Object, ByVal e
      >>>>>>>> As
      >>>>>>>> System.EventArg s) Handles btnExecute.Clic k
      >>>>>>>> Line 30: Dim myconnection As New
      >>>>>>>> System.Data.Sql Client.SqlConne ction("Provider =SQLOLEDB.1;Int egrated
      >>>>>>>> Security=SSPI;P ersist Security Info=False;Init ial Catalog=paprese nters;Data
      >>>>>>>> Source=NJS;Use Procedure for Prepare=1;Auto Translate=True; Packet
      >>>>>>>> Size=4096;Works tation
      >>>>>>>> ID=NJS;Use Encryption for Data=False;Tag with column collation when
      >>>>>>>> possible=False" )
      >>>>>>>> Line 31: Dim cmdTesting As New System.Data.Sql Client.SqlComma nd
      >>>>>>>> Line 32: Dim dataadapter As New System.Data.Sql Client.SqlDataA dapter
      >>>>>>>>
      >>>>>>>> Source File: c:\inetpub\wwwr oot\PAPresenter s\DBtest.aspx.v b Line: 30
      >>>>>>>>
      >>>>>>>> Stack Trace:
      >>>>>>>>
      >>>>>>>> [ArgumentExcepti on: Keyword not supported: 'provider'.]
      >>>>>>>> System.Data.Com mon.DBConnectio nString.ParseIn ternal(Char[] connectionStrin g,
      >>>>>>>> UdlSupport checkForUdl, NameValuePair& keychain) +1133
      >>>>>>>> System.Data.Com mon.DBConnectio nString..ctor(S tring connectionStrin g, UdlSupport
      >>>>>>>> checkForUdl) +114
      >>>>>>>> System.Data.Sql Client.SqlConne ctionString..ct or(String connectionStrin g) +13
      >>>>>>>> System.Data.Sql Client.SqlConne ctionString.Par seString(String connectionStrin g)
      >>>>>>>> +96
      >>>>>>>> System.Data.Sql Client.SqlConne ction.set_Conne ctionString(Str ing value) +11
      >>>>>>>> System.Data.Sql Client.SqlConne ction..ctor(Str ing connectionStrin g) +158
      >>>>>>>> PAPresenters.DB test.btnExecute _Click(Object sender, EventArgs e) in
      >>>>>>>> c:\inetpub\wwwr oot\PAPresenter s\DBtest.aspx.v b:30
      >>>>>>>> System.Web.UI.W ebControls.Butt on.OnClick(Even tArgs e) +108
      >>>>>>>>
      >>>>>>>> System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.RaiseP ostBackEvent(St ring
      >>>>>>>> eventArgument) +57
      >>>>>>>> System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler sourceControl,
      >>>>>>>> String
      >>>>>>>> eventArgument) +18
      >>>>>>>> System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData) +33
      >>>>>>>> System.Web.UI.P age.ProcessRequ estMain() +1292
      >>>>>>>>
      >>>>>>>>
      >>>>>>>>
      >>>>>>>> --------------------------------------------------------------------------------
      >>>>>>>> Version Information: Microsoft .NET Framework Version:1.1.432 2.2032; ASP.NET
      >>>>>>>> Version:1.1.432 2.2032
      >>>>>>>>
      >>>>>>>>
      >>>>>>>>
      >>>>>>>> Although I don't know much about connectionstrin gs, the little bit of experience
      >>>>>>>> I have
      >>>>>>>> leads me to think that the connectionstrin g generated by Visual Studio .NET has a
      >>>>>>>> lot
      >>>>>>>> more stuff in it than necessary, but either way it is not working. Why is this,
      >>>>>>>> and how
      >>>>>>>> can I fix it? Thanks.
      >>>>>>>> --
      >>>>>>>> Nathan Sokalski
      >>>>>>>> njsokalski@hotm ail.com
      >>>>>>>> http://www.nathansokalski.com/
      >>>>>>>>
      >>>>>>>> "Juan T. Llibre" <nomailreplies@ nowhere.com> wrote in message
      >>>>>>>> news:e8E%23LaEe FHA.1136@TK2MSF TNGP12.phx.gbl. ..
      >>>>>>>>>
      >>>>>>>>> 1. Create at least one empty table in that database,
      >>>>>>>>> using the Server Explorer.
      >>>>>>>>>
      >>>>>>>>> 2. Use the Server Explorer's "Add Connection" wizard
      >>>>>>>>> ( right-click "Data Connections" ) to create a connection.
      >>>>>>>>>
      >>>>>>>>> 3. The connection string will be created for you.
      >>>>>>>>>
      >>>>>>>>> 4. Right-click the created connection and select Properties.
      >>>>>>>>>
      >>>>>>>>> 5. Copy the connection string from the "Properties " box.
      >>>>>>>>>
      >>>>>>>>>
      >>>>>>>>>
      >>>>>>>>>
      >>>>>>>>> Juan T. Llibre
      >>>>>>>>> ASP.NET MVP
      >>>>>>>>> http://asp.net.do/foros/
      >>>>>>>>> Foros de ASP.NET en Español
      >>>>>>>>> Ven, y hablemos de ASP.NET...
      >>>>>>>>> =============== =======
      >>>>>>>>>
      >>>>>>>>> "Nathan Sokalski" <njsokalski@hot mail.com> wrote in message
      >>>>>>>>> news:e7ceEVEeFH A.3712@TK2MSFTN GP09.phx.gbl...
      >>>>>>>>>>I have Visual Studio .NET and SQL Server Desktop Engine on my computer. I
      >>>>>>>>>> have created an empty database using Visual Studio .NET's Server Explorer.
      >>>>>>>>>> However, I am having trouble connecting to the database using ASP.NET. I
      >>>>>>>>>> think the problem is somewhere in my connection string, but because I do not
      >>>>>>>>>> know much about connection strings, I am not sure what it should look like.
      >>>>>>>>>> Can someone please help me determine what my connection string should look
      >>>>>>>>>> like? I am using the version of IIS that comes with XP Pro. Thanks.[/color]
      >>
      >>[/color]
      >
      >[/color]


      Comment

      Working...