locked
ASP.Net Configuration - Fails to create ASPNETDB.MDF - Why? RRS feed

  • Question

  • User-1851576699 posted

    I have installed Visual Web Developer 2008 Express Edition along with SQL Server Express 2008 on Windows Vista and Windows 7. On Windows Vista, when I click the "ASP.Net Configuration" icon in the Solution Explorer and then click on the "Security" link, a new ASPNETDB.MDF file is created in the App_Data folder of any new project I have open. The same actions on my "Windows 7 Ultimate" machine will result in a message along the lines of "Your Data Source is not configured properly. This may be because the server has an invalid name or you do not have the proper credentials or you do not have the proper permissions"(not at Windows 7 machine right now so this isn't verbatim).  Then a more bold message below this general error message says something like, "Could not connect to SQL Server Database". In a nutshell, clicking on ASP.Net Configuration->Security fails to create the virgin ASPNETDB.MDF by default that VWD 2008 Express does so effortlessly on my Vista machine.

    Exploring the Windows 7 folder structure of the project I am "attempting" to configure with ASP.Net Configutarion reveals that it successfully creates the \App_Data folder in the current open project but fails to create the file itself(ASPNETDB.MDF). 

    I am assuming that this is some sort of stupid permission issue on my Windows 7 machine but with so many different layers of required permissions Im not sure how to resolve this issue. What or Who needs permission to do what and how can I give that permission to Who or What that needs it?

    Do I need to tell SQL Server 2008 Express that its okay to let Visual Web Developer 2008 Express create a virgin ASPNETDB.MDF when it wants to?  I have no idea who or what component is holding up this simple but frustrating process on the Windows 7 machine. Please help. Thanks.


    P.S. 


    I read this text in a book on ASP.Net. What is this ASPNET account that exists? Where can I look at that account on my computer?

    The user account utilized by your application will have read and write access to any of the files contained

    within the

    \App_Data folder. By default, this is the ASPNET account.





    Saturday, April 3, 2010 11:27 AM

Answers

  • User-1853252149 posted

    What or Who needs permission to do what and how can I give that permission to Who or What that needs it?

    The ASP.NET process identity needs permission and you grant permission using Windows File Manager.  Windows 7 changes the default account so you need to grant the account access yourself.

    Jeff

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, April 5, 2010 4:21 PM

All replies

  • User786598092 posted

    I think my problem is similar to yours but the error message am getting is different. am a newbie and was following instructions (from ASP.NET3.5 for dummies) to create a database for a new website. but the error message am getting is "Connection to SQL server files (*.mdf) require SQL server express 2005 to function properly. Please verify the installation of the component..."

    in my system i have 'SQL Server 2008' installed during installation of Microsoft Visual Web Developer 2008 express edition. Please i need help

    Monday, April 5, 2010 2:20 PM
  • User-1853252149 posted

    What or Who needs permission to do what and how can I give that permission to Who or What that needs it?

    The ASP.NET process identity needs permission and you grant permission using Windows File Manager.  Windows 7 changes the default account so you need to grant the account access yourself.

    Jeff

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, April 5, 2010 4:21 PM
  • User-1851576699 posted

     

    Jeff, thanks for the response however I am a newbie. Please clarify. What do you mean when you say "Windows 7 'changes' the default account? What is the default account name? Im not even sure what your saying is entirely accurate simply because...

     

    I got so obsessed with trying to resolve this issue that I installed Windows 7 Ultimate from scratch on a second computer along with Visual Web Developer 2008 Express Edition(which also installs SSE at the same time) and this problem no longer exists. Something must have simply gone awry on my first Windows 7 computer. On the first computer I installed a SQL Server 2008 Express Edition with Advanced Services separately from the install of the Visual Web Developer 2008 Express Edition so it was somewhat different. Then I had installed the Adventureworks 2008 sample databases.

     

    Long story short, installing Windows 7 Ultimate and then Visual Web Developer 2008 Express Edition on a second machine solved the problem.

     

    I would still like to know how to modify the "default" account and "grant the access myself" so that I can try and fix my first computer that "isnt" working properly. If I can't solve it soon I'll just reformat and reinstall. Maybe I got hit with a virus.

    Saturday, April 10, 2010 1:23 AM
  • User786598092 posted

    @Nutcracker please present the solution if u manage to solve the problem because am still facing the same problem to date, Thank you 

    Tuesday, April 20, 2010 1:18 PM