aspnetdb doesn't attach.

S

Shimon Sim

I am trying to work with web part framework. Yesterday I build try-it site
and it work just fine.

Today I tried to do the same and I keep getting this message
attempt to attach an auto-named database for file C:\Documents and
Settings\Shimon\My
Documents\Development\WebRoots\PipeBizWeb\PipeBizWeb\App_Data\aspnetdb.mdf
failed. A database with the same name exists, or specified file cannot be
opened, or it is located on UNC share.

I tried to delete the file, restart machine. Still have the same message.

Any suggestions?
Thanks.
Shimon.
 
S

Steven Cheng[MSFT]

Hi Shimon,

Thank you for posting.

From your description, I understand you had an ASP.NET 2.0 web application
which use SQL Express file database as the webpart service. It worked well
, but ran into some "can not attach database file..." error recently,
correct? If anything I missed, please feel free to let me know.

Based on my research, it is likely due to some connection issue, what's the
connectionstring of the webpart service's connection setting, have you done
any modificaiton on it? Here is a certain thread on the web forum
discussing on a similiar issue as this, you can have a look to see whether
it helps:

http://forums.asp.net/903667/ShowPost.aspx


Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.



Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
S

Shimon Sim

No.
I never had THIS application working with web parts.
I had different application working. Both of them used SQL Express.
I think the main difference is that working one used developer server while
not working is using IIS. I don't know if this is the reason.
I didn't configure any connection strings for the features provided by
asp.net so it is using defaults.
I looked on googles. There is some information on it but what ever I found
didn't help.
Also I have no problem connecting to the DB using VS2005 and from config
control manager ( the feature in VS that helps you manage web.config file.)
Provider tests pass fine also.

Thanks.
 
S

Steven Cheng[MSFT]

Thanks for your response Shimon,

So you can still have the application running correctly(connect to the SQL
EXPRESS db) in VS 2005 test web server? If so, the difference between IIS
hosted application and the test webserver hosted one is that when using
Test web server, the process runs under the current logon user(the
interactive user ....). When hosting in IIS, it use the IIS's worker
process identity run the application. I suggest you try the following
things:

Move your web project from the user specific location( C:\Documents and
Settings\Shimon\My Documents\Development\WebRoots\PipeBizWeb\PipeBizWeb\)
to a public location such as D\WebProjects\PipeBizWeb and retest it through
both vs 2005 test server and IIS to see whether it works. If still not
work, you may consider open the SQLExpress manager through SQL 2005
management studio and then try grant your IIS's ASP.NET worker process
account the sufficient permission to access any database in the SQL Express
instance. IMO, it is likely due to the mdf file is under your logon user's
user specific location which can not be correctly referenced by the IIS
worker process account.

Hope this helps.

Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.



Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,059
Latest member
cryptoseoagencies

Latest Threads

Top