473,732 Members | 2,217 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IIS7 on Vista and SQLExpress problem

Hi,

I wonder if someone could shed some light on this one for me.

I have developed a web app in VS2005 with the built in server. It uses an
sql database, everytihng works.

I need to test it across the network, so i've installed IIS7 on my Vista
machine and created a new website, point at the website's directory. After I
switched to the 'Classic .net' app pool, it shows up on the port.

However, the SQLExpress database is giving me an error...

"An attempt to attach an auto-named database for file ...\thepoint.md f
failed. A database with the same name exists, or specified file cannot be
opened, or it is located on UNC share."

The file in question exists, and the whole website directory has Everyone
Full Control permissions, with permission inheritance on, so that should be
fine.

The Visual Studio isntance of this isnt running (im not running visual
studio, the development server, or anything).

My web.config specifies the |DataDirectory| , and my file is in App_Data - in
fact, the database works fine when I run it through VS/Dev Server for
debugging, but it fails on IIS7.

What's going on?!! (and yes, my connection string does specify User
Instance=True.

Any help much appreciated.

Thanks

Dan
Sep 6 '07 #1
5 2674
I believe this is because the auto-attach feature of SQLEXPRESS only works
for local connections. You will probably need to permanently attach the MDF
database file using the SQLExpress Manager or the appropriate T-SQL Command.
Peter
--
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com

"musosdev" wrote:
Hi,

I wonder if someone could shed some light on this one for me.

I have developed a web app in VS2005 with the built in server. It uses an
sql database, everytihng works.

I need to test it across the network, so i've installed IIS7 on my Vista
machine and created a new website, point at the website's directory. After I
switched to the 'Classic .net' app pool, it shows up on the port.

However, the SQLExpress database is giving me an error...

"An attempt to attach an auto-named database for file ...\thepoint.md f
failed. A database with the same name exists, or specified file cannot be
opened, or it is located on UNC share."

The file in question exists, and the whole website directory has Everyone
Full Control permissions, with permission inheritance on, so that should be
fine.

The Visual Studio isntance of this isnt running (im not running visual
studio, the development server, or anything).

My web.config specifies the |DataDirectory| , and my file is in App_Data - in
fact, the database works fine when I run it through VS/Dev Server for
debugging, but it fails on IIS7.

What's going on?!! (and yes, my connection string does specify User
Instance=True.

Any help much appreciated.

Thanks

Dan
Sep 6 '07 #2
Thanks for Peter's input.

Hi Dan,

My understanding is after you create new website virtual dir on the Vista
IIS7 box, it still point to the web application directory on original
development machine, through a UNC share. Is this your case?

If so, the error may be caused by the SQL Express database file is on
remote location. I suggest you perform the following test:

** copy the entire website to a local physical directory on the vista box
and configure IIS to use the local locaiton to test

** Or as Peter suggested, you can consider directly attach the database
file to the SQL Express instance on VISTA and let your asp.net application
(modify connectionstrin g) connect that attached database to see whether it
works.

If there is any other finding, please feel free to post here also.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: =?Utf-8?B?UGV0ZXIgQnJ vbWJlcmcgW0MjIE 1WUF0=?=
<pb*******@yaho o.yohohhoandabo ttleofrum.com>
>References: <73************ *************** *******@microso ft.com>
Subject: RE: IIS7 on Vista and SQLExpress problem
Date: Thu, 6 Sep 2007 11:44:02 -0700

I believe this is because the auto-attach feature of SQLEXPRESS only works
for local connections. You will probably need to permanently attach the
MDF
>database file using the SQLExpress Manager or the appropriate T-SQL
Command.
>Peter
--
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder : http://www.blogmetafinder.com

"musosdev" wrote:
>Hi,

I wonder if someone could shed some light on this one for me.

I have developed a web app in VS2005 with the built in server. It uses
an
>sql database, everytihng works.

I need to test it across the network, so i've installed IIS7 on my Vista
machine and created a new website, point at the website's directory.
After I
>switched to the 'Classic .net' app pool, it shows up on the port.

However, the SQLExpress database is giving me an error...

"An attempt to attach an auto-named database for file ...\thepoint.md f
failed. A database with the same name exists, or specified file cannot
be
>opened, or it is located on UNC share."

The file in question exists, and the whole website directory has
Everyone
>Full Control permissions, with permission inheritance on, so that should
be
>fine.

The Visual Studio isntance of this isnt running (im not running visual
studio, the development server, or anything).

My web.config specifies the |DataDirectory| , and my file is in App_Data
- in
>fact, the database works fine when I run it through VS/Dev Server for
debugging, but it fails on IIS7.

What's going on?!! (and yes, my connection string does specify User
Instance=Tru e.

Any help much appreciated.

Thanks

Dan
Sep 7 '07 #3
Hi Steven,

Unfortunately, there is no UNC share involved - that's why I don't
understand it too well. VS, the website, the mdf, IIS7, firefox... all on the
C: drive of my laptop (Vista Ultimate).

Peter's suggestion sounds like it would break the SQL database in Visual
Studio? I still want to be able to run the site from VS as well for debugging
purposes.

Is it possible to make all this work, all I wanted to do was test my site in
IE6 :(
"Steven Cheng[MSFT]" wrote:
Thanks for Peter's input.

Hi Dan,

My understanding is after you create new website virtual dir on the Vista
IIS7 box, it still point to the web application directory on original
development machine, through a UNC share. Is this your case?

If so, the error may be caused by the SQL Express database file is on
remote location. I suggest you perform the following test:

** copy the entire website to a local physical directory on the vista box
and configure IIS to use the local locaiton to test

** Or as Peter suggested, you can consider directly attach the database
file to the SQL Express instance on VISTA and let your asp.net application
(modify connectionstrin g) connect that attached database to see whether it
works.

If there is any other finding, please feel free to post here also.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: =?Utf-8?B?UGV0ZXIgQnJ vbWJlcmcgW0MjIE 1WUF0=?=
<pb*******@yaho o.yohohhoandabo ttleofrum.com>
References: <73************ *************** *******@microso ft.com>
Subject: RE: IIS7 on Vista and SQLExpress problem
Date: Thu, 6 Sep 2007 11:44:02 -0700

I believe this is because the auto-attach feature of SQLEXPRESS only works
for local connections. You will probably need to permanently attach the
MDF
database file using the SQLExpress Manager or the appropriate T-SQL
Command.
Peter
--
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com

"musosdev" wrote:
Hi,

I wonder if someone could shed some light on this one for me.

I have developed a web app in VS2005 with the built in server. It uses
an
sql database, everytihng works.

I need to test it across the network, so i've installed IIS7 on my Vista
machine and created a new website, point at the website's directory.
After I
switched to the 'Classic .net' app pool, it shows up on the port.

However, the SQLExpress database is giving me an error...

"An attempt to attach an auto-named database for file ...\thepoint.md f
failed. A database with the same name exists, or specified file cannot
be
opened, or it is located on UNC share."

The file in question exists, and the whole website directory has
Everyone
Full Control permissions, with permission inheritance on, so that should
be
fine.

The Visual Studio isntance of this isnt running (im not running visual
studio, the development server, or anything).

My web.config specifies the |DataDirectory| , and my file is in App_Data
- in
fact, the database works fine when I run it through VS/Dev Server for
debugging, but it fails on IIS7.

What's going on?!! (and yes, my connection string does specify User
Instance=True.

Any help much appreciated.

Thanks

Dan

Sep 7 '07 #4
Thanks for your reply Dan,

Don't worry, we can try locating the problem step by step. I suggest you
try make the SQL Express database attached into the SQLExpress instance or
any other instance temporarly for test to see whether it works. If it
works, we can make sure that the problem just focus on the database
connection's establishment.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: =?Utf-8?B?bXVzb3NkZXY =?= <mu*******@comm unity.nospam>
References: <73************ *************** *******@microso ft.com>
<90************ *************** *******@microso ft.com>
<yq************ **@TK2MSFTNGHUB 02.phx.gbl>
>Subject: RE: IIS7 on Vista and SQLExpress problem
Date: Fri, 7 Sep 2007 02:00:02 -0700
t
>
Hi Steven,

Unfortunatel y, there is no UNC share involved - that's why I don't
understand it too well. VS, the website, the mdf, IIS7, firefox... all on
the
>C: drive of my laptop (Vista Ultimate).

Peter's suggestion sounds like it would break the SQL database in Visual
Studio? I still want to be able to run the site from VS as well for
debugging
>purposes.

Is it possible to make all this work, all I wanted to do was test my site
in
>IE6 :(
"Steven Cheng[MSFT]" wrote:
>Thanks for Peter's input.

Hi Dan,

My understanding is after you create new website virtual dir on the
Vista
>IIS7 box, it still point to the web application directory on original
development machine, through a UNC share. Is this your case?

If so, the error may be caused by the SQL Express database file is on
remote location. I suggest you perform the following test:

** copy the entire website to a local physical directory on the vista
box
>and configure IIS to use the local locaiton to test

** Or as Peter suggested, you can consider directly attach the database
file to the SQL Express instance on VISTA and let your asp.net
application
>(modify connectionstrin g) connect that attached database to see whether
it
>works.

If there is any other finding, please feel free to post here also.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.
>>

--------------------
>From: =?Utf-8?B?UGV0ZXIgQnJ vbWJlcmcgW0MjIE 1WUF0=?=
<pb*******@yah oo.yohohhoandab ottleofrum.com>
>References: <73************ *************** *******@microso ft.com>
Subject: RE: IIS7 on Vista and SQLExpress problem
Date: Thu, 6 Sep 2007 11:44:02 -0700

I believe this is because the auto-attach feature of SQLEXPRESS only
works
>for local connections. You will probably need to permanently attach
the
>MDF
>database file using the SQLExpress Manager or the appropriate T-SQL
Command.
>Peter
--
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder : http://www.blogmetafinder.com

"musosdev" wrote:

Hi,

I wonder if someone could shed some light on this one for me.

I have developed a web app in VS2005 with the built in server. It
uses
>an
>sql database, everytihng works.

I need to test it across the network, so i've installed IIS7 on my
Vista
>machine and created a new website, point at the website's directory.
After I
>switched to the 'Classic .net' app pool, it shows up on the port.

However, the SQLExpress database is giving me an error...

"An attempt to attach an auto-named database for file
...\thepoint.md f
>failed. A database with the same name exists, or specified file
cannot
>be
>opened, or it is located on UNC share."

The file in question exists, and the whole website directory has
Everyone
>Full Control permissions, with permission inheritance on, so that
should
>be
>fine.

The Visual Studio isntance of this isnt running (im not running
visual
>studio, the development server, or anything).

My web.config specifies the |DataDirectory| , and my file is in
App_Data
>- in
>fact, the database works fine when I run it through VS/Dev Server for
debugging, but it fails on IIS7.

What's going on?!! (and yes, my connection string does specify User
Instance=Tru e.

Any help much appreciated.

Thanks

Dan

Sep 12 '07 #5
Hi Dan,

Any progress on this issue? Please feel free to post here if you need any
help on this.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: st*****@online. microsoft.com (Steven Cheng[MSFT])
Organization : Microsoft
Date: Wed, 12 Sep 2007 03:04:25 GMT
Subject: RE: IIS7 on Vista and SQLExpress problem
>
Thanks for your reply Dan,

Don't worry, we can try locating the problem step by step. I suggest you
try make the SQL Express database attached into the SQLExpress instance or
any other instance temporarly for test to see whether it works. If it
works, we can make sure that the problem just focus on the database
connection's establishment.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>>From: =?Utf-8?B?bXVzb3NkZXY =?= <mu*******@comm unity.nospam>
References: <73************ *************** *******@microso ft.com>
<90*********** *************** ********@micros oft.com>
<yq*********** ***@TK2MSFTNGHU B02.phx.gbl>
>>Subject: RE: IIS7 on Vista and SQLExpress problem
Date: Fri, 7 Sep 2007 02:00:02 -0700
t
>>
Hi Steven,

Unfortunately , there is no UNC share involved - that's why I don't
understand it too well. VS, the website, the mdf, IIS7, firefox... all on
the
>>C: drive of my laptop (Vista Ultimate).

Peter's suggestion sounds like it would break the SQL database in Visual
Studio? I still want to be able to run the site from VS as well for
debugging
>>purposes.

Is it possible to make all this work, all I wanted to do was test my site
in
>>IE6 :(
"Steven Cheng[MSFT]" wrote:
>>Thanks for Peter's input.

Hi Dan,

My understanding is after you create new website virtual dir on the
Vista
>>IIS7 box, it still point to the web application directory on original
development machine, through a UNC share. Is this your case?

If so, the error may be caused by the SQL Express database file is on
remote location. I suggest you perform the following test:

** copy the entire website to a local physical directory on the vista
box
>>and configure IIS to use the local locaiton to test

** Or as Peter suggested, you can consider directly attach the database
file to the SQL Express instance on VISTA and let your asp.net
application
>>(modify connectionstrin g) connect that attached database to see whether
it
>>works.

If there is any other finding, please feel free to post here also.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.
>>>

--------------------

From: =?Utf-8?B?UGV0ZXIgQnJ vbWJlcmcgW0MjIE 1WUF0=?=
<pb*******@ya hoo.yohohhoanda bottleofrum.com >
References: <73************ *************** *******@microso ft.com>
Subject: RE: IIS7 on Vista and SQLExpress problem
Date: Thu, 6 Sep 2007 11:44:02 -0700

I believe this is because the auto-attach feature of SQLEXPRESS only
works
>>for local connections. You will probably need to permanently attach
the
>>MDF
database file using the SQLExpress Manager or the appropriate T-SQL
Command.
Peter
--
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinde r: http://www.blogmetafinder.com

"musosdev" wrote:

Hi,

I wonder if someone could shed some light on this one for me.

I have developed a web app in VS2005 with the built in server. It
uses
>>an
sql database, everytihng works.

I need to test it across the network, so i've installed IIS7 on my
Vista
>>machine and created a new website, point at the website's directory.
After I
switched to the 'Classic .net' app pool, it shows up on the port.

However, the SQLExpress database is giving me an error...

"An attempt to attach an auto-named database for file
..\thepoint.md f
>>failed. A database with the same name exists, or specified file
cannot
>>be
opened, or it is located on UNC share."

The file in question exists, and the whole website directory has
Everyone
Full Control permissions, with permission inheritance on, so that
should
>>be
fine.

The Visual Studio isntance of this isnt running (im not running
visual
>>studio, the development server, or anything).

My web.config specifies the |DataDirectory| , and my file is in
App_Data
>>- in
fact, the database works fine when I run it through VS/Dev Server
for
>>debugging, but it fails on IIS7.

What's going on?!! (and yes, my connection string does specify User
Instance=True .

Any help much appreciated.

Thanks

Dan

Sep 14 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
7538
by: Vlad Hrybok | last post by:
Hi all, I recently installed 64 bit version of Vista hoping to make it my primary development setup. I was able to do work with IIS7 and ASP.NET 2.0/Visua Studio 2005 combo, but hit a roadblock trying to work with Visual Studio .NET 2003 on ASP.NET 1.1 app. The problem is that I can’t create an application pool in IIS7 that would run .NET Framework 1.1. I noticed that unlinke .NET Framework 2.0, Framework 1.1 only gets installed...
3
5156
by: Brad | last post by:
In a Vista/IIS7 asp.net app, a coded crystal report export is crashing IIS7....but it works just fine in visual studio's cassini web server. And if I create a web form and use the crystal reports web viewer, view the report and then export from the viewer it also works fine (IIS7 and cassini). And I should note this all works fine in IIS6 on win2003 or in xp. So my thought with all this is that something is going on with IIS7, so...
8
7493
by: Darwiniv | last post by:
1. Does anyone run ASAPI and mysql succesfully on Vista /IIS7? 2. Does anyone run CGI and display all SESSION errors on Vista /IIS7? php ASAPI doesn't works with MYSQL. And CGI doesn't show any SESSION error message. PHP had so much bugs on windows vista. I using php-5.2.1-Win32
14
9500
by: Brad | last post by:
I have a .net 2.0 web application project that creates a pdf file, saves the pdf to disk (crystal reports does this part), and then my code reads the pdf file and writes it to the httpresponse The web app works great on win2003 and xp and the end result is a pdf file is displayed in the browser. When I run the same code on Vista, the browser displays the message "Internet Explorer cannot display the web page". If I open the same...
9
7945
by: Mark Rae | last post by:
Hi, Now that the VS.NET 2005 SP1 update patch is with us, I'm in the process of moving my main development environment onto 64-bit Vista Business Edition - so far, so good... However, there is a bit of a gotcha with Request.UserHostAddress... Under IIS6 and earlier, that would return a standard xxx.xxx.xxx.xxx IP address. However, Vista enables IP6 by default, which makes
0
1396
by: =?Utf-8?B?ZGF2ZQ==?= | last post by:
I moved to a new pc (vista ultimate) and copied an existing working asp.net application to the new web site on localhost. I installed iis7 with a number of asp.net and developer type windows components. The problem occurs when I select something (on the web site) where it is using xmlHttp call back to project.axd (handler). After a couple of seconds I am prompted for username and password. Regardless of what i type it doesnt...
0
5982
by: Erwin Moller | last post by:
Hi, I am one of those questionable people that started with Vista (Home Premium). Not because I think it is a ready/steady OS, but partly out of curiousity, and partly because I needed to work on an old project that happens to run on IIS6/W2000/MSSQL7, but my W2000 machine couldn't handle the size of the database in question anymore. :-( My new Vista machine is 5 years younger and is a lot faster, so I started to figure out how to use...
6
9641
by: ma | last post by:
Hello, I am new to IIS and ASP.NET. I wrote my first ASP.NET and I want to deploy in to a system which has Vista Business and IIS7. I copied my files to the target computer and created a virtual directory. I add default.aspx to the list of default pages for the virtual directory. My problems are: 1- On vista computer I am trying to see the output of my ASP.NET
11
2718
by: =?Utf-8?B?QXNhZg==?= | last post by:
Hello, I have just installed VISTA Enterprise and VS.NET 2008. When pressing F5 to debug my test ASP.NET website, IE 7 display the message "Internet Explorer cannot display the webpage". The local URL that VS.NET 2008 generates is http://localhost:49705/aaa/Default.aspx. In IIS7 Manager, ASP.NET V2.0… is "Allowed" in the ISAPI and CGI Restrictions. Also IIS7 is working and display ASP.NET web sites if I convert them to IIS7...
0
8946
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8774
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9307
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6735
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6031
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.