Re: SQL Express non-functional outside of VS 2005



Not sure exactly what you mean by attaching from IIS. Do you have an
ASP.Net page you're using?

By default, VS creates connections with the "User Instance" option. This
means a private SQL Server instance is created just for your user and the
database is attached to this instance. If your ASP.Net application also
uses a user instance connection string, it will create an different SQL
Instance running as ASPUSER. If VS has the database open when you try to
run your ASP page, the ASPUSER instance will find that the file is already
in use by you and thus the open will fail. VS has a lot of logic built in
so that if you hit F5 to run your application, VS will close the file so
ASPUSER can open it. If you don't do this and attempt to run your
application from the browser while VS still has the database open, it will
fail.

There's a more complete explanation of how this works here:

http://msdn.microsoft.com/sql/express/default.aspx?pull=/library/en-us/dnsse/html/sqlexpuserinst.asp


--
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

"Mike P" <MikeP@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:54DAC164-5CD5-407B-895E-19A8BE8D899B@xxxxxxxxxxxxxxxx
> Folks,
>
> Just installed VS 2005 -- HUGE improvement over 6.0 (now I have to learn
> all
> the new languages... moving from desktop to web apps to run distributed
> projects, workflows, and dashboards at work).
>
> SQL Express runs just fine inside VS. When I try to run from IIS I get no
> connection. Services tab shows SQL Express up and running. Approaching
> it
> from MS Access as an ADP finds no SQL server to connect to, as well.
>
> On-line help assumes I have more of a clue than I do. This is a 20-second
> fix for you gurus but a 3-week part-time journey thru pain and agony for
> me.
>
> Help, please.
> --
> Mike
> Engineer (part-time-, brute-force-, novice-, just-to-solve-a-problem-
> coder)


.



Relevant Pages

  • Re: Connection issues between .Net framwok and SQl Express 2005
    ... You will no longer need the database MDF file name in the connection string. ... simply attach the ASPNETDB.mdf to SQL Server permenantly, ... as USER INSTANCE on existing SQL Server Express, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: web server performance issues
    ... >quesry anlyser) an inactive connection (connecting from ... Good question, for a SQL group. ... It's not related to IIS. ... >version is the current server version. ...
    (microsoft.public.inetserver.iis)
  • Re: Some basic questions
    ... The application connection string has 'User instance = true' so I must be ... Jasper Smith (SQL Server MVP) ...
    (microsoft.public.sqlserver.setup)
  • Re: SQL Express non-functional outside of VS 2005
    ... > uses a user instance connection string, it will create an different SQL ... > Instance running as ASPUSER. ...
    (microsoft.public.sqlserver.setup)
  • Re: SQL.Net connection in VS2005 from local IIS to local SQLExpres
    ... IWAM_LANDON: Launch IIS process Account ... outside IIS in a "standalone" C# ADO.NET program using the same connection ... I can log into SQL Server 2005 and look at the tables. ...
    (microsoft.public.sqlserver.connect)