Did you get that error while working with ASP.NET 2.0? Something about aspnetdb.mdf or something? Here’s the solution:
(I’m assuming you’re on Windows XP)
1) Open up My Computer or any folder in Windows Explorer.
2) Go Tools -> Folder Options
3) Select the View Tab
4) Scroll down to the bottom and un-check the box that says ‘Use simple file sharing (Recommended)’ - it’s recommended to be checked for your grandma, not a ASP.NET developer like yourself.
5) Go to your website in Windows Explorer, probably C:/Inetpub/wwwroot/yourVirtualDirectory
6) Copy all the files and directories there to some other place, like your desktop.
7) Delete all the files in that directory/website. If it says not allowed, it’s because some process is accessing the file. Try shutting down the website, closing any windows you have open, and as a last resort restart your computer.
9) Delete the virtual directory/website in IIS, and then recreate it, giving it the same permissions - read, write, script, whatever.
8) Cut all the files you copied before you deleted them, and put them back in that directory.
9) View the physical directory in windows explorer, probably in C:/Inetpub/wwwroot/
10) Right click on it, select ‘properties’ and then select the security tab. Add the IUSR and ASPNET users and give them write access. If you don’t know what those users look like, check one of your other applications/virtual directories/websites, by selecting the properties window and clicking on the security tab and seeing what users have access.
11) Rebuild and view site. It should work now.
If you’re like me you probably just copy and paste the error in Google Search and now you’ve found this site and you’re pissed and maybe you’ve spent an hour or two searching and you still haven’t figured it out.
You’re probably ready to never use ASP.NET again.
You’ve probably already been to this site, and this one, and they didn’t help. Maybe you also hit up some forums like this one.
They probably said something like ‘change security settings’ and you’re running around the properties window for your files and directories finding nothing.
Hopefully my steps have helped. If not, good luck with your search.