Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 8th, 2008, 11:48 AM
Authorized User
 
Join Date: Feb 2008
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default accesing asp.net application

i have developed an asp.net website using VS2005.I am using sqlserver express as my database.my application is running fine when i debug it using VS2005.But when i created a virtual directory in iis and tried to run my application through my browser then while making a connection to the database it displays following error:


An attempt to attach an auto-named database for file C:\|directory path|\tracker.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share...

my connection string is:
"Data Source=.\\SQLEXPRESS;AttachDbFilename=C:\\|directo ry path|\\tracker.mdf;Integrated Security=True;User Instance=True";

plz suggest me some solution

Reply With Quote
  #2 (permalink)  
Old April 8th, 2008, 12:50 PM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Hi there..

some question that maybe will help you:
Do you have access for that specific file?
Do you have the file open in another application?
Does the database exist there?

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
Reply With Quote
  #3 (permalink)  
Old April 8th, 2008, 01:22 PM
Authorized User
 
Join Date: Feb 2008
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for replying but
I mentioned that my application is running absolutely fine when debugged using Visual Studio 2005.so
1.i do not have any access related problems.
2.no other application is using the file.
3.yes,database does exist at the specified location.
The problem is only when I created a virtual directory and tried running my application through a browser.


Reply With Quote
  #4 (permalink)  
Old April 8th, 2008, 01:32 PM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

So you are having some kind of permission problems. Are you using a server or you are just trying in you develop machine? (with the ISS)..

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
Reply With Quote
  #5 (permalink)  
Old April 8th, 2008, 03:19 PM
Authorized User
 
Join Date: Feb 2008
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your advice.Yes,i have hosted my website at IIS.
I have sorted that problem but now i am encountering a new problem.
while updating the database it says that "tracker.mdf" (my database) is read only .I am using sqlserver express edition that comes along with Visual Studio 2005..could you tell me how do i change this property of my database?
Again this problem is only when i debug my application directly through browser.

Reply With Quote
  #6 (permalink)  
Old April 8th, 2008, 08:52 PM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Well I really don't have a clue, never saw that error before. Did you try google about it? Maybe a problem with permissions?

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
Reply With Quote
  #7 (permalink)  
Old April 11th, 2008, 12:08 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

The problem is most likely still permissions. When you switch to using IIS, the security context (identity) that the process runs under is much more restricted than you are when you are running it on the development web server. The dev server runs under your user security, and you are likely an admin on your box so there's no problem. You need to check the user identity the IIS process is using and verify that the file system security allows that user access to the data files. Best to do some searching for detailed discussions on this topic.

-Peter
peterlanoie.blog
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
asp and asp dot net in single application rejoin2me ASP.NET 2.0 Basics 5 February 21st, 2007 12:26 PM
ASP and ASP.NET mixture for protecting application BananaJim ASP.NET 2.0 Professional 0 December 6th, 2006 02:19 PM
Accesing data from dot net Bhavin Crystal Reports 4 September 10th, 2004 09:05 AM
Creating ASP.NET Application in Visual Studio.NET Maxood ASP.NET 1.0 and 1.1 Basics 1 March 8th, 2004 01:56 PM



All times are GMT -4. The time now is 09:29 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.