
BlueDragon 7.1: Deploying CFML on ASP.NET and the Microsoft .NET Framework 49
Again, the solution is to grant permissions, as discussed in section 8.4.1, to allow .NET to write
to the parsed directory for the Fusebox application.
8.4.2 Problems Processing Access Databases
For similar security reasons, when trying to update an Access database using BlueDragon.NET,
you may receive the error: Operation must use an updateable query. This is not
caused by BlueDragon but instead the .NET framework. Indeed, the problem is discussed in the
Microsoft Knowledge Base article:
If you have opened the file in a currently running instance of BlueDragon or ColdFusion (or
Access) before making that change, you'll see that the directory where the MDB is stored will
now have an LDB file of the same name. In this case, the change you've made won't take effect
until you restart whatever app(s) had opened the file (which will release this LDB lock file and
make it disappear). In the case of BlueDragon.NET, see section
http://support.microsoft.com/default.aspx?scid=kb;en-us;316675
The issue has to do with security and the limited controls of the ASP.NET default user. The sim-
plest solution may be to edit the security properties for the MDB file (using Windows Explorer,
right-click on the MDB file, choose properties, then the security tab). Add everyone as a
user (choose Add, then Advanced, then Find Now, and select Everyone), and give that user
Modify and Write permissions.
7.1 for information on restarting
.NET web applications.
Once the file is gone, the change to security will take effect and the next refresh of the page
doing the database update should work as expected.
8.4.3 .NET Request Identity
In any web application, knowing the account under which processing take place is often vital in
order to understand permissions and some feature capabilities related to that.
The following ASP.NET code can be used to determine which user ASP.NET requests are run-
ning under:
<%@ Page Language="c#" %>
<% Response.Write("User: " +
System.Security.Principal.WindowsIdentity.GetCurrent().Name); %>
There is also a notion of setting or impersonating request identity during page processing, which
can be important to understand in resolving permissions problems. The account is determined by
the following algorithm:
1. If web.config contains an <identity> element with the impersonate attribute set to
true then BlueDragon.NET will run under the username specified in the <identity>
element. If an empty string is specified for the username then BlueDragon.NET will run
Komentarze do niniejszej Instrukcji