|
Thursday, August 14, 2008 |
| Attach database failed for Server computername\SQLEXPRESS |
|
The error I received.
Attach database failed for Server 'COMPUTERNAME\SQLEXPRESS'. (Microsoft.SqlServer.Smo) ------------------------------ ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) Directory lookup for the file "C:\Data\WebHelp\help_log.ldf" failed with the operating system error 2 (The system cannot find the file specified.). (Microsoft SQL Server, Error: 5133)
This error occurred for me when I tried to attach and SQL Server was looking for an existing log file (.ldf). I was able to get around this by doing the following.
Opened up SQL Server Management Studio Express. Browsed to my database (.mdf) file. Once I set the file name to attach I selected the log file that was listed below the database file, and clicked the Remove button located just above the Cancel button. |
jeremy at 11:32 PM |
(4) Comments |
Add a comment |
Permalink
|
|
|
Tuesday, August 12, 2008 |
| ActiveX control wont install for trusted site |
|
| I was trying to install an ActiveX control and it wouldn't install. I discovered that I had added the website to my trusted sites under Tools>Internet Options>Security tab>Trusted Sites node>Sites button, as an http site. However, the page that was trying to install the ActiveX control was using the https protocol. Once I added the Site as an http site, I was able to install. |
jeremy at 6:28 PM |
(0) Comments |
Add a comment |
Permalink
|
|
|
Saturday, August 02, 2008 |
| Unable to open the physical file \App_Data\DevResource.mdf. Operating system error 5: 5(Access is denied.). |
|
Here is the exact error I received.
Unable to open the physical file "C:\Develop\WebSites\Developer Resource\App_Data\DevResource.mdf". Operating system error 5: "5(Access is denied.)". An attempt to attach an auto-named database for file C:\Develop\WebSites\Developer Resource\App_Data\DevResource.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
After a little Googling something I read pointed me in the right direction. I imagine there are many scenarios that could trigger this error. In my case, I had restored a backup file into the App_Data folder of my website, setup the web.config, and tried to run. The issue was that when I restored the database backup file, the MDF file created in my App_Data folder, didn't have any file permissions on it. So I gave asp.net account rights and everything worked fine. |
jeremy at 9:35 PM |
(0) Comments |
Add a comment |
Permalink
|
|
|
Saturday, December 29, 2007 |
| ASP.NET Configuration menu item missing |
|
I responded to a user recently on a forum regarding a missing menu item in Visual Studio 2005. The user wanted to create an administrator account using the ASP.NET Configuration tool available through the Website menu. However, the tool was not there. The person was accessing the website directly through ftp in Visual Studio.
What I found is that if you load up a website in VS or VWD using ftp, the ASP.NET Configuration tool is not present on the menu. This is because the tool can only be used on the local system; it can't be used over the web.
If you're trying to manage users over the web, check out my web-based user management sample from my downloads section. |
jeremy at 11:50 AM |
(0) Comments |
Add a comment |
Permalink
|
|
|
Wednesday, November 14, 2007 |
| Check if an email address is from a valid domain |
|
Dim strEmail As String = "jimbale@apnzzz.com" strEmail = strEmail.Substring((strEmail.LastIndexOf("@") + 1), strEmail.Length - (strEmail.LastIndexOf("@") + 1)) Try Dim strTest As String = System.Net.Dns.GetHostEntry(strEmail).HostName Catch exNoHostException As System.Net.Sockets.SocketException 'Handle here when the email has an invalid domain Dim stT As String = "" Catch ex As Exception 'Handle unexpected errors here Dim stT As String = "" End Try |
jeremy at 10:44 AM |
(0) Comments |
Add a comment |
Permalink
|
|
|
|