Posted by: Imar Spaanjaars at Sunday, March 28, 2004 7:56:46 PM in:
Security
When you're working with ASP or ASP.NET applications and a Microsoft Access database, you're
likely to run into an error like this:
Microsoft
JET Database Engine error '80004005'
The Microsoft Jet database engine cannot open the file 'C:\Inetpub\wwwroot\YourSite\Databases\YourDatabase.mdb'.
It is already opened exclusively by another user, or you need permission
to view its data.
/YourSite/YourDataAccessPage.asp, line 15
Alternatively, you may get this error instead:
Microsoft
JET Database Engine error '80004005'
Operation must use an updateable query.
/YourSite/YourDataAccessPage.asp, line 15
Both errors basically mean the same: the account that your Web server
is running under does not have the necessary permissions to read from
or write to the database.
This article will explain the steps you need to perform to fix this
problem. First I will explain how you can find out the current account
that the Web server is using to connect to the database. In the second
part of the article I'll explain how to change the security settings
so the Web server can successfully access the database.
Read on ...
Posted by: Imar Spaanjaars at Sunday, February 29, 2004 4:36:59 PM in:
VS 2005
UPDATE (2005-12-06): The compilation features presented in this article are obsolete. It's recommended that you look at Web Deployment Projects (http://weblogs.asp.net/scottgu/archive/2005/11/10/430283.aspx) instead.
Unlike Web sites created with Visual Studio .NET 2002 or 2003, there
is no need to do a full compile of the project whenever something has
changed in your site. The new Code Behind feature and the Code directory
used in ASP.NET Whidbey allow you to make changes without recompiling.
As soon as the changed page gets requested, the .NET FRamework will recompile
the page on the fly.
However, it is sometimes useful to compile the application right after
you have deployed it. One reason for this precompilation is speed. Another
is code protection. A compiled application does not expose its source
in the ASPX pages any longer. There are two ways to compile an application
at deployment time: In-place compilation and Precompilation for Deployment
Read on ...
Posted by: Imar Spaanjaars at Saturday, February 21, 2004 11:24:02 AM in:
ASP.NET 2.0
When you have installed ASP.NET on Windows Server 2003, you may receive the following 404 - Page Not Found error:
Read on ...
Posted by: Imar Spaanjaars at Thursday, February 19, 2004 10:13:58 AM in:
ASP.NET 2.0
With ASP.NET 1.0 and 1.1 many people stored their connection strings in the Web.config file under the appSettings element. But is there a better way to save these settings in ASP.NET 2.0?
Read on ...
Posted by: Imar Spaanjaars at Thursday, February 05, 2004 8:05:51 PM in:
Scripting
Update!! 11-29-2005
There seems to be a problem with the code presented in this article, so don't rely on it work anymore. When you click the print button you get an error and nothing gets printed.
So far, I haven't been able to isolate the problem or come up with a solution. It looks like this problem is caused by some security mechanism in Windows XP Service Pack 2. I haven't tested various versions of IE and Windows XP yet, but I am sure it doesn't run on IE 6, SP2 with Windows XP SP2 (well, it doesn't run on *my* IE 6, SP2 with Windows XP SP2 ;-) )
In some scenario's, it could be useful if you were able to print a page from within the browser, without the Print dialog popping up, and without the user confirming the print operation.
Read on ...
Posted by: Imar Spaanjaars at Tuesday, February 03, 2004 8:42:36 PM in:
CSS
It's often useful to hide certain elements when a page gets printed. For example, your Navigation Menu, or a Search button are usually pretty useless on paper.
Read on ...
Posted by: Imar Spaanjaars at Saturday, November 08, 2003 8:33:39 PM in:
T-SQL
This T-SQL snippet allows you to select duplicate records from a database table. The example assumes that the column Id is used to determine whether a record has a duplicate. If multiple columns determine whether a record has a duplicate or not, simply expand the SELECT list and the GROUP BY clause.
Read on ...