Tom Lawrence
in

InfoPath Dev

Tom Lawrence

  • Connecting an InfoPath Forms Services form template to DBXL v2.2

    Connecting an InfoPath Forms Services form template to DBXL v2.2

     

    For users of the InfoPath application in Office 2007, DBXL has been providing a great way to easily connect forms with SQL databases. Now, with the increasing popularity of InfoPath Forms Services (IPFS) running on Microsoft Office SharePoint Services (MOSS), people are wondering how to connect an IPFS form template to a database using DBXL. It can be done, but for now it requires some form code to access the DBXL web services. This gets around the problem of IPFS being unable to open an xml document from any source other than a SharePoint document collection. Eventually, this should be easy to do from within DBXL without any code in the form template. To provide a solution now, this blog post intends to provide a tutorial of how-to steps for connecting an existing form template with DBXL for use on IPFS. This blog post builds on the initial idea outlined by David Airapetyan in a blog entry at http://www.infopathdev.com/blogs/david/archive/2008/05/05/browser-forms-and-dbxl.aspx.

    At the end of this tutorial you should have an IPFS-ready form template that can submit documents to DBXL and load them through the use of a querystring added the IPFS launch URL for your template.

     

    I. Preparations

    I will make some assumptions during this tutorial about how the form template is set up. The instructions provided here can be adapted to any form template. However, if you are not an advanced form template developer you may wish to follow the tutorial through once exactly as described before attempting this on a different form template.

    1. I will be customizing the ExpenseReport sample that comes with InfoPath. This form template does not contain any existing load or submit handlers. If your form template does, you’ll need to modify them as fits your scenario to connect with the sample code I provide in this tutorial.
    2. I will assume you have a working SharePoint and MOSS 2007 server, have verified that IPFS is working correctly on simple forms, and that DBXL v2.2 installed and working on the main SharePoint web site at port 80.

    II. Modifying the InfoPath Form Template in the Designer

    Creating the Form

    1. Start InfoPath. In the dialog box that opens, click Design a Form Template..., then click Customize a Sample..., then choose the template called Sample - Expense Report.
    2. Save the form template to a convenient location. We’ll need to save the form in order to add code to it. Don’t worry about publishing yet.

    Creating the GetDocument and SubmitDocument data adapters

    The form code will use two web service data adapters, one called GetDocument which will retrieve document data from DBXL, the other called SubmitDocument which will post a modified document back to DBXL. First, we’ll configure the GetDocument data adapter.

    1. From the Tools menu, choose Data Connections..., then click the Add... button.
    2. Select the Create a new connection to radio button. Then choose Receive data. Click Next in the wizard.
    3.  Under From where do you want to receive your data?, choose Web service. Click Next.
    4. Enter the location of the Qdabra DBXL Document web service. It likely looks like http://<your-server-name>/QdabraWebService/DbxlDocumentService.asmx . Click Next.
    5. Select the operation called GetDocument, near the bottom of the list. Click Next.
    6.  For tns:docId, click Set Sample Value..., enter 0 (that is, zero), click OK, then click Next.
    7. No value is needed for tns:docId on the next panel. Just click Next.
    8. There is no need to store a copy of the data in the form template. Just click Next.
    9. Uncheck the box Automatically retrieve data when the form is opened. Our code will do that instead. Then click Finish.

    Now we’ll configure the SubmitDocument data adapter.

    1. We should be back at the data connections dialog box. Click Add....
    2. Select the Create a new connection to radio button. Then choose Receive data. Click Next in the wizard. Note: you are choosing Receive data even though think of the operation as submitting the document. This is a result of how the web service method was defined.
    3. Under From where do you want to receive your data?, choose Web service. Click Next.
    4.  Enter the location of the Qdabra DBXL Document web service, same as above in step 6. Click Next.
    5. Select the operation called SubmitDocument, near the bottom of the list. Click Next.
    6. No value is needed for any of the parameters on this panel. Just click Next.
    7. There is no need to store a copy of the data in the form template. Just click Next.
    8. Uncheck the box Automatically retrieve data when the form is opened. Our code will do that instead. Then click Finish.
    9. Back at the data connections dialog box, click Close.

    Adding the On Load and Submit handlers

    In this series of steps we will hook up the On Load and Submit handlers to form code using Visual Studio Tools for Applications (VSTA). However, we won’t fill in the event handlers yet.

    1. Click the Tools menu, locate the submenu Programming, and choose the item Loading Event.... VSTA will launch and show code for an empty event handler, called FormEvents_Loading.
    2. Back in InfoPath Designer, go to the Tools menu and choose Submit Options....
    3. In Expense Report, Allow users to submit this form will already be checked. If it is not for your form template, check it now.
    4. Choose Perform custom action using Code.
    5. Click Edit Code.... VSTA will flash on the task bar. If you switch to it you’ll notice another empty submit handler, called FormEvents_Submit, has appeared.
    6. Back in InfoPath Designer, click OK to dismiss the submit handler dialog box.

    Writing the custom code to query and submit the DBXL document

    In this series of steps we will hook up the On Load and Submit handlers to form code using Visual Studio Tools for Applications (VSTA). However, we won’t fill in the event handlers yet.

    1. We’ll need to add some subroutines to the form code which will handle querying the web services we added earlier.

    a.  If you are programming in Visual Basic, insert the following code just before the End Class statement at the bottom of the file:

    Private Function GetDocTypeName() As String

     

        ' Return the document type name that will be used in DBXL to identify the documents.

        ' For tutorial simplicity this is hard-coded, but can be obtained via more flexible methods for production templates.

        Return "MyDocType"

     

    End Function

     

    Private Function LoadFromDbxl(ByVal docType As String, ByVal docId As String) As Boolean

     

        Try

            Dim domGetDocument As XPathNavigator = DataSources("GetDocument").CreateNavigator()

     

            ' Set docId argument for the DBXL web service call.

            domGetDocument.SelectSingleNode("/dfs:myFields/dfs:queryFields/tns:GetDocument/tns:docId", NamespaceManager).SetValue(docId)

     

            ' Invoke the web service method to query DBXL for the document.

            Dim connGetDocument As DataConnection = DataConnections("GetDocument")

            connGetDocument.Execute()

     

            ' Check for error.

            If Not domGetDocument.SelectSingleNode("/dfs:myFields/dfs:dataFields/tns:GetDocumentResponse/tns:GetDocumentResult/tns:Success", NamespaceManager).ValueAsBoolean Then

                Throw New Exception("GetDocument failed")

            End If

     

            ' Replace main DOM with obtained document.

            Dim root As XPathNavigator = MainDataSource.CreateNavigator().SelectSingleNode("/child::*", NamespaceManager)

            Dim newDoc As XPathNavigator = domGetDocument.CreateNavigator().SelectSingleNode("/dfs:myFields/dfs:dataFields/tns:GetDocumentResponse/tns:docInfo/tns:Content/node()", NamespaceManager)

            root.InnerXml = newDoc.InnerXml

     

            ' Add new or updated QdabraDBXL PI so subsequent saves will overwrite DBXL document.

            InsertQdabraDbxlPi(docType, docId)

        Catch

            Return False ' Failure.

        End Try

        Return True ' Success.

     

    End Function

     

    Private Function SubmitToDbxl(ByVal docType As String, ByVal name As String, ByVal author As String, ByVal description As String) As Boolean

     

        Dim domMainDocument As XPathNavigator = MainDataSource.CreateNavigator()

        Dim domSubmitDocument As XPathNavigator = DataSources("SubmitDocument").CreateNavigator()

     

        Try

            ' Set the arguments for the SubmitDocument web service call.

            domSubmitDocument.SelectSingleNode("/dfs:myFields/dfs:queryFields/tns:SubmitDocument/tns:docTypeName", NamespaceManager).SetValue(docType)

            ' Notice that tns:xml will contain the entire main document being submitted to DBXL.

            domSubmitDocument.SelectSingleNode("/dfs:myFields/dfs:queryFields/tns:SubmitDocument/tns:xml", NamespaceManager).SetValue(MainDataSource.CreateNavigator().OuterXml)

            domSubmitDocument.SelectSingleNode("/dfs:myFields/dfs:queryFields/tns:SubmitDocument/tns:name", NamespaceManager).SetValue(name)

            domSubmitDocument.SelectSingleNode("/dfs:myFields/dfs:queryFields/tns:SubmitDocument/tns:author", NamespaceManager).SetValue(author)

            domSubmitDocument.SelectSingleNode("/dfs:myFields/dfs:queryFields/tns:SubmitDocument/tns:description", NamespaceManager).SetValue(description)

     

            ' Invoke the web service method to submit the document data to DBXL.

            Dim connSubmit As DataConnection = DataConnections("SubmitDocument")

            connSubmit.Execute()

     

            ' Check for error.

            If Not domSubmitDocument.SelectSingleNode("/dfs:myFields/dfs:dataFields/tns:SubmitDocumentResponse/tns:SubmitDocumentResult/tns:Success", NamespaceManager).ValueAsBoolean Then

                Throw New Exception("SubmitDocument failed")

            End If

     

            ' Add new or updated QdabraDBXL PI so subsequent saves will overwrite DBXL document.

            Dim docId As String = domSubmitDocument.SelectSingleNode("/dfs:myFields/dfs:dataFields/tns:SubmitDocumentResponse/tns:docId", NamespaceManager).Value

            InsertQdabraDbxlPi(docType, docId)

        Catch

            Return False ' Failure.

        End Try

        Return True ' Success.

     

    End Function

     

    Private Sub InsertQdabraDbxlPi(ByVal docType As String, ByVal docId As String)

     

        Dim domMainDocument As XPathNavigator = MainDataSource.CreateNavigator()

     

        ' Remove any existing QdabraDBXL PI.

        Dim oldPi As XPathNavigator = domMainDocument.SelectSingleNode("/processing-instruction()[local-name(.) = 'QdabraDBXL']", NamespaceManager)

        If Not oldPi Is Nothing Then

            oldPi.DeleteSelf()

        End If

     

        If docId <> "" Then

            ' Add new or updated QdabraDBXL PI so subsequent saves will overwrite DBXL document.

            Dim newPi As String = String.Format("<?QdabraDBXL docid='{0}' doctype='{1}' ?>", docId, docType)

            domMainDocument.SelectSingleNode("/processing-instruction()[local-name(.) = 'mso-infoPathSolution']", NamespaceManager).InsertBefore(newPi)

        End If

     

    End Sub

    b.  If you are programming  in Visual C#, use this code instead, inserted just after the closing brace for the empty FormEvents_Submit function:

    public string GetDocTypeName()

    {

        // Return the document type name that will be used in DBXL to identify the documents.

        // For tutorial simplicity this is hard-coded, but can be obtained via more flexible methods for production templates.

        return "MyDocType";

    }

     

    private bool LoadFromDbxl(string docType, string docId)

    {

        try

        {

            XPathNavigator domGetDocument = DataSources["GetDocument"].CreateNavigator();

     

            // Set docId argument for the DBXL web service call.

            domGetDocument.SelectSingleNode("/dfs:myFields/dfs:queryFields/tns:GetDocument/tns:docId", NamespaceManager).SetValue(docId);

     

            // Invoke the web service method to query DBXL for the document.

            DataConnection connGetDocument = DataConnections["GetDocument"];

            connGetDocument.Execute();

     

            // Check for error.

            if (!domGetDocument.SelectSingleNode("/dfs:myFields/dfs:dataFields/tns:GetDocumentResponse/tns:GetDocumentResult/tns:Success", NamespaceManager).ValueAsBoolean)

                throw new Exception("GetDocument failed");

     

            // Replace main DOM with obtained document.

            XPathNavigator root = MainDataSource.CreateNavigator().SelectSingleNode("/child::*", NamespaceManager);

            XPathNavigator newDoc = domGetDocument.SelectSingleNode("/dfs:myFields/dfs:dataFields/tns:GetDocumentResponse/tns:docInfo/tns:Content/node()", NamespaceManager);

            root.InnerXml = newDoc.InnerXml;

     

            // Add new or updated QdabraDBXL PI so subsequent saves will overwrite DBXL document.

            InsertQdabraDbxlPi(docType, docId);

        }

        catch

        {

            return false; // Failure.

        }

        return true; // Success.

    }

     

    private bool SubmitToDbxl(string docType, string name, string author, string description)

    {

        XPathNavigator domMainDocument = MainDataSource.CreateNavigator();

        XPathNavigator domSubmitDocument = DataSources["SubmitDocument"].CreateNavigator();

     

        try

        {

            // Set the arguments for the SubmitDocument web service call.

            domSubmitDocument.SelectSingleNode("/dfs:myFields/dfs:queryFields/tns:SubmitDocument/tns:docTypeName", NamespaceManager).SetValue(docType);

            // Notice that tns:xml will contain the entire main document being submitted to DBXL.

            domSubmitDocument.SelectSingleNode("/dfs:myFields/dfs:queryFields/tns:SubmitDocument/tns:xml", NamespaceManager).SetValue(MainDataSource.CreateNavigator().OuterXml);

            domSubmitDocument.SelectSingleNode("/dfs:myFields/dfs:queryFields/tns:SubmitDocument/tns:name", NamespaceManager).SetValue(name);

            domSubmitDocument.SelectSingleNode("/dfs:myFields/dfs:queryFields/tns:SubmitDocument/tns:author", NamespaceManager).SetValue(author);

            domSubmitDocument.SelectSingleNode("/dfs:myFields/dfs:queryFields/tns:SubmitDocument/tns:description", NamespaceManager).SetValue(description);

     

            // Invoke the web service method to submit the document data to DBXL.

            DataConnection connSubmit = DataConnections["SubmitDocument"];

            connSubmit.Execute();

     

            // Check for error.

            if (!domSubmitDocument.SelectSingleNode("/dfs:myFields/dfs:dataFields/tns:SubmitDocumentResponse/tns:SubmitDocumentResult/tns:Success", NamespaceManager).ValueAsBoolean)

                throw new Exception("Submit failed");

     

            // Add new or updated QdabraDBXL PI so subsequent saves will overwrite DBXL document.

            string docId = domSubmitDocument.SelectSingleNode("/dfs:myFields/dfs:dataFields/tns:SubmitDocumentResponse/tns:docId", NamespaceManager).Value;

            InsertQdabraDbxlPi(docType, docId);

        }

        catch

        {

            return false; // Failure.

        }

     

        return true; // Success.

    }

     

    private void InsertQdabraDbxlPi(string docType, string docId)

    {

        XPathNavigator domMainDocument = MainDataSource.CreateNavigator();

     

        // Remove any existing QdabraDBXL PI.

        XPathNavigator oldPi = domMainDocument.SelectSingleNode("/processing-instruction()[local-name(.) = 'QdabraDBXL']", NamespaceManager);

        if (oldPi != null)

        {

            oldPi.DeleteSelf();

        }

     

        if (docId != "")

        {

            // Add new or updated QdabraDBXL PI so subsequent saves will overwrite DBXL document.

            string newPi = String.Format("<?QdabraDBXL docid=\"{0}\" doctype=\"{1}\" ?>", docId, docType);

            domMainDocument.SelectSingleNode("/processing-instruction()[local-name(.) = 'mso-infoPathSolution']", NamespaceManager).InsertBefore(newPi);

        }

    }

     

    1. Before we go any further I want to point out a special function (found at the top of the just-inserted code block) called GetDocTypeName. This function will identify the document type in DBXL that documents stored under. The name here will be used when creating the DBXL document type record in the DBXL Administration Tool later. Although the document type string is hard-coded in this example, there are other ways of storing it that may be more appropriate in a production scenario. For example, you might create an xml file containing configuration information and attach it to your form template as a static xml data source. In the function GetDocTypeName you return the value of the xml node value in the data source. This provides more flexibility since the document type can be modified if needed without recompiling the form code. Other ways include having the form template use a web service data adapter to query the appropriate document type or using a query string. For the tutorial this string can remain as is.
    2. Next, we will fill in the FormEvents_Loading event handler.

    a.  If you are programming in Visual Basic, insert the following code into the body of the FormEvents_Loading subroutine:

    Me.NamespaceManager.GetNamespacesInScope(XmlNamespaceScope.All)

     

    Dim docId As String = Nothing

     

    ' Do a case-insensitive search for the docid querystring parameter on the URL

    For Each inputParameter As System.Collections.Generic.KeyValuePair(Of String, String) In e.InputParameters

        If (inputParameter.Key.Equals("docid", StringComparison.OrdinalIgnoreCase)) Then

            docId = inputParameter.Value

        End If

    Next

     

    If Not String.IsNullOrEmpty(docId) Then

        LoadFromDbxl(GetDocTypeName(), docId)

    End If

     

    b.  If you are programming in Visual C#, insert the following code into the body of the FormEvents_Loading function:

    this.NamespaceManager.GetNamespacesInScope(XmlNamespaceScope.All);

     

    string docId = null;

     

    // Do a case-insensitive search for the docid querystring parameter on the URL

    foreach (System.Collections.Generic.KeyValuePair<string, string> inputParameter in e.InputParameters)

    {

        if (inputParameter.Key.Equals("docid", StringComparison.OrdinalIgnoreCase))

        {

            docId = inputParameter.Value;

        }

    }

     

    if (!String.IsNullOrEmpty(docId))

    {

        LoadFromDbxl(GetDocTypeName(), docId);

    }

    1. Finally, we will fill in the code for the FormEvents_Submit handler.

    a.  If you are programming in Visual Basic, insert the following code into the body of the FormEvents_Submit subroutine:

    ' These document properties can be customized as desired

    Dim title As String = "Expense Report"

    Dim user As String = Application.User.UserName

    Dim description As String = MainDataSource.CreateNavigator().SelectSingleNode("/my:expenseReport/my:purpose", NamespaceManager).Value

     

    SubmitToDbxl(GetDocTypeName(), title, user, description)

     

    e.CancelableArgs.Cancel = False

     

    b.  If you are programming in Visual C#, insert the following code into the body of the FormEvents_Submit function:

    // These document properties can be customized as desired

    string title = "Expense Report";

    string user = Application.User.UserName;

    string description = MainDataSource.CreateNavigator().SelectSingleNode("/my:expenseReport/my:purpose", NamespaceManager).Value;

     

    SubmitToDbxl(GetDocTypeName(), title, user, description);

     

    e.CancelableArgs.Cancel = false;

     

    1. The code is now finished. Switch back to the InfoPath Designer.

    Converting the data source connections for server use

    In order for the form template to be able to access web service methods, the data connections must be converted to udcx files on a server.

    1. Create a Data Connections Library on your SharePoint server.

    a.  Navigate in your web browser to your SharePoint web site.

    b.  Click on Document Center.

    c.  On the right side of the page, click on the Site Actions menu and choose Create.

    d.  Under the Libraries heading, choose Data Connection Library.

    e.  Enter a name, such as MyDataConnections and hit OK.

    f.       You will now have a new Data Connections Library at a URL like http://<your-server-name>/Docs/MyDataConnections/Forms/AllItems.aspx .

    1. Convert the form template’s data connections.

    a.  In the InfoPath Designer, from the Tools menu, open Data Connections....

    b.  At this time we need to remove the Main submit data connection that came with the sample template since it will prevent deployment on the server. Make sure Main submit is selected and click Remove. Then answer Yes to the dialog.

    c.  Select GetDocument and click Convert.

    d.  In the dialog, enter the path to the udcx file you wish to create in your data connections library. This should be of the form http://<your-server-name>/Docs/MyDataConnections/GetDocument.udcx . Hit OK.

    e.  Select SubmitDocument and click Convert.

    f.       In the dialog, enter the path to the udcx file you wish to create in your data connections library. This should be of the form http://<your-server-name>/Docs/MyDataConnections/SubmitDocument.udcx . Hit OK.

    g.  In the data connections dialog, click Close.

    1. Each udcx must be approved on the server.

    a.  Navigate to the data connections library, using the URL you obtained in step 32(f).

    b.  Click the dropdown menu that appears when hovering near GetDocument and choose Approve/reject from this menu.

    c.  Click the Approved option on the page that comes up. Click OK.

    d.  Click the dropdown menu that appears when hovering near SubmitDocument and choose Approve/reject from this menu.

    e.  Click the Approved option on the page that comes up. Click OK.

     

    Publishing a deployable form template

    1. In the InfoPath Designer, go to the File menu and choose Publish..., then click OK in response to the message This form template has been modified since it was last saved.
    2. On the first panel of the wizard under Where do you want to publish the form template?, select To a network location. Click Next.
    3. Under Form template path and file name enter a path and filename on the local hard disk. An example might be c:\ExpenseReport-Published.xsn . Click Next.
    4. On the next panel, delete the path in the box such that the box is empty. Providing a path here can sometimes prevent deployment on the server. Click Next.
    5. In response to the warning that starts Users will not be able to open this form..., hit OK.
    6. Click Publish. Then click Close.

    Deploying the form template

    1. Open the SharePoint 3.0 Central Administration tool from the Programs menu on your server. This will navigate a web browser to the administration page for your server.
    2. Click Applications Management.
    3. Under InfoPath Forms Services, click Manage form templates.
    4. Click Upload form template.
    5. Enter the file path to which you published your finished template, for example c:\ExpenseReport-Published.xsn . Click Upload.
    6. Click OK on the resulting success page.
    7. Click the menu that appears when hovering over the form template you just added and choose Activate to a site collection.
    8. Click the Site collection selector menu and choose Change Site Collection. (Note, SharePoint almost always defaults to the wrong site collection the first time a form template is activated.)
    9. In the pop-up window, click the Web Application selector menu and choose Change Web Application.
    10. Click SharePoint - 80, and then click the / to activate to the entire site collection. Click OK. The pop-up window will disappear.
    11. Click OK.

    Configuring DBXL for your document type

    1. Open the DBXL Administration Tool. This can be found by navigating to the DBXL start page on your server, usually at http://<your-server-name>/QdabraWebService/default.htm and then clicking DBXL Administration Tool.
    2. Click New Configuration in the tool.
    3. Under Document Type Details, find the Name text box and enter the name of your document type. As you will recall, we pasted in a function called GetDocTypeName that contained a hard-coded string MyDocType. This field is how the form template connects to DBXL. Enter MyDocType in the Name box.
    4. Find XSN File and click the control that says Click here to attach file. Find your finished template, for example c:\ExpenseReport-Published.xsn and attach that file.
    5. Click Save.

    Testing new document creation and updating

    1. In the DBXL Administration Tool click the Documents tab and observe that there are no documents listed.
    2. In a new web browser window enter a URL to IPFS launching your document. This URL will look something like this: http://<your-server-name>/_layouts/formserver.aspx?XsnLocation=/FormServerTemplates/ExpenseReport-Published.xsn&OpenIn=Browser .
    3. In the form, fill out the required fields (manager’s email address) and enter test1 in the Business Purpose field. Click Submit.
    4. In the DBXL Administration Tool click Refresh and verify that the document appears with test1 in the Description column.
    5. In the form, modify Business Purpose to say test2. Click Submit.
    6. In the DBXL Administration Tool click Refresh and verify that the document now has test2 in the Description column. The Doc. ID column has not changed because the form is now connected to the previously submitted document.

    Testing opening and updating an existing document

    1. To open an existing document, specify the DocID querystring parameter on the URL. You can identify a document ID by looking in DBXL Administration Tool under the Doc. ID column. Identify the document ID for the document submitted in step 59. Assume the document ID is 25, the URL to open this document would look like: http://<your-server-name>/_layouts/formserver.aspx?XsnLocation=/FormServerTemplates/ExpenseReport-Published.xsn&OpenIn=Browser&DocID=25 .
    2.  In a new web browser window, navigate to this URL, setting the DocID parameter to the one for your document. Verify that Business Purpose contains test2.
    3. Modify Business Purpose to say test3. Click Submit.
    4. In the DBXL Administration Tool click Refresh and verify that the document now has test3 in the Description column.

    I hope you have enjoyed exploring how to connect InfoPath Forms Server with DBXL and that it opens up all kinds of new possibilities for your forms solutions!

  • One possible cause for the error message: Error initializing DBXL database. Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'.

    In the forums, there has been some discussion about the following error message:

    Error initializing DBXL database. Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'.

    Usually it relates to local machine accounts not having database administration rights or membership in the WSS permissions groups. For examples, see http://www.infopathdev.com/forums/p/5678/21311.aspx#21311 and http://www.infopathdev.com/forums/p/6941/25289.aspx#25289.

    I want to discuss another possible cause of the error message on MOSS 2007 installations. It's a fairly simple oversight but unfortunately the message does not help diagnose the problem. Once MOSS 2007 is installed and the default SharePoint web site (on port 80) is provisioned, the "Default Web Site" on the machine is locked down. Typically, one would want to install DBXL on the newly provisioned "SharePoint - 80" web site. However, the initial configuration panel of the DBXL installer defaults to "Default Web Site". If one makes the erroneous but reasonable assumption that "Default Web Site" would be equivalent the "SharePoint - 80", then one may run into this problem.

    The problem occurs in two phases. The first time DBXL installation is attempted, the installer fails with this error message:

    Cannot open log for source 'Database Accelerator'. You may not have write access. --> The security descriptor structure is invalid.

    This is correct but does not specifically identify the cause. Someone new to the product might not realize this is due to selecting the wrong web site for installation. Or, someone might assume the problem is with database permissions and attempt to grant various administrative privileges to Network Service or other accounts being used for installation. Finally, many of us just "feel lucky" and sometimes try to install again, looking for some hint of what to change.

    The second time DBXL installation is attempted, the installer fails with this error message:

    Error initializing DBXL database.
    Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'.

    In the Qdabra event log, you'll see a failure event with the preceding message as well as a large amount of HTML (attached below). Embedded in the HTML somewhere will be the following:

    The file you are attempting to save or retrieve has been blocked from this Web site by the server administrators.

     

    The solution to this problem is ensure that "SharePoint - 80" is selected as the web site to install to. There may still be other configuration problems, so if the problem continues, be sure to take a look at the other links above as well.

     

    <HTML dir="ltr">
    <HEAD><meta name="GENERATOR" content="Microsoft SharePoint" /><meta name="progid" content="SharePoint.WebPartPage.Document" /><meta HTTP-EQUIV="Content-Type" content="text/html; charset=utf-8" /><meta HTTP-EQUIV="Expires" content="0" /><meta name="ROBOTS" content="NOHTMLINDEX" /><title>
     
     Error

    </title><link rel="stylesheet" type="text/css" href="/_layouts/1033/styles/core.css?rev=5msmprmeONfN6lJ3wtbAlA%3D%3D"/>
    <script type="text/javascript" language="javascript" src="/_layouts/1033/init.js?rev=ck%2BHdHQ8ABQHif7kr%2Bj7iQ%3D%3D"></script>
    <script type="text/javascript" language="javascript" src="/_layouts/1033/core.js?rev=S5dt4K8TJGVTYU9HrW6enw%3D%3D"></script>

     <meta name="Robots" content="NOINDEX " />
     <meta name="SharePointError" content=""/>
    </HEAD>
    <BODY scroll="yes" onload="BLOCKED SCRIPTif (typeof(_spBodyOnLoadWrapper) != 'undefined') _spBodyOnLoadWrapper();">
      <form name="aspnetForm" method="post" action="../_layouts/error.aspx" id="aspnetForm" onsubmit="return _spFormOnSubmitWrapper();">
    <div>
    <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKLTU2NjkxODU3M2RkBAIEHmag7t7I92tfdt6LwmoUHAs=" />
    </div>

      <TABLE class="ms-main" CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH="100%" HEIGHT="100%">
     <tr><td>
        <table CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH="100%">
      <tr>
       <td colspan=4 class="ms-globalbreadcrumb" align="right">
          <a href="BLOCKED SCRIPTTopHelpButtonClick('NavBarHelpHome')" id="ctl00_PlaceHolderGlobalNavigation_TopHelpLink" AccessKey="6" title="Help (new window)"><img src="/_layouts/images/helpicon.gif" align="absmiddle" border="0" alt="Help (new window)" /></a>
       </td>
      </tr>
        </table>
       </td></tr>
     <tr>
      <td class="ms-globalTitleArea">
       <table width=100% cellpadding=0 cellspacing=0 border=0>
        <tr>
      <td id="GlobalTitleAreaImage" class="ms-titleimagearea"><img id="onetidHeadbnnr0" src="/_layouts/images/titlegraphic.gif"  alt="" /></td>
      <td class="ms-sitetitle" width=100%>
        
      </td>
      <td style="padding-top:8px;" valign=top>
        
      </td>
        </tr>
       </table>
      </td>
     </tr>
     <TR>
      <TD id="onetIdTopNavBarContainer" WIDTH=100% class="ms-bannerContainer">
      
      </TD>
     </TR>
     
     <TR height="100%"><TD><TABLE width="100%" height="100%" cellspacing="0" cellpadding="0">
     <tr>
      <td class="ms-titlearealeft" id="TitleAreaImageCell" valign="middle" nowrap><div style="height:100%" class="ms-titleareaframe"></div></td>
      <td class="ms-titleareaframe" id="TitleAreaFrameClass">
      
      <table cellpadding=0 height=100% width=100% cellspacing=0>
       <tr><td class="ms-areaseparatorleft"><IMG SRC="/_layouts/images/blank.gif" width=1 height=1 alt=""></td></tr>
      </table>
      
      </td>
      <td valign=top  id="onetidPageTitleAreaFrame" class='ms-areaseparator' nowrap width="100%">
       <table id="onetidPageTitleAreaTable" cellpadding=0 cellspacing=0 width=100% border="0">
        <tr>
      <td valign="top" class="ms-titlearea">
      
        <a href="
    http://tomws2k3" id="ctl00_PlaceHolderTitleBreadcrumb_idSimpleGoBackToHome">Go back to site</a>
      
      </td>
        </tr>
        <tr>
      <td height=100% valign=top ID=onetidPageTitle class="ms-pagetitle">
        <h2 class="ms-pagetitle">
       
     Error

        </h2>
      </td>
        </tr>
       </table>
      </td>
      <td class="ms-titlearearight">
      
    <div class='ms-areaseparatorright'><IMG SRC="/_layouts/images/blank.gif" width=8 height=100% alt=""></div>
    </td>
     </tr>

     <TR>
       <TD class="ms-leftareacell" valign=top height=100% id="LeftNavigationAreaCell">
        <table class=ms-nav width=100% height=100% cellpadding=0 cellspacing=0>
      <tr>
       <td>
        <TABLE height="100%" class=ms-navframe CELLPADDING=0 CELLSPACING=0 border="0">
         <tr valign="top">
       <td width="4px"><IMG SRC="/_layouts/images/blank.gif" width=4 height=1 alt=""></td>
       <td valign="top" width="100%">     
         
       </td>
         </tr>
         <tr><td colspan=2><IMG SRC="/_layouts/images/blank.gif" width=138 height=1 alt=""></td></tr>
        </TABLE>
       </td>
       <td></td>
      </tr>
        </table>
       </TD>
       <td>
    <div class='ms-areaseparatorleft'><IMG SRC="/_layouts/images/blank.gif" width=8 height=100% alt=""></div>
    </td>
       <td class='ms-formareaframe' valign="top">
      <TABLE width="100%" border="0" cellspacing="0" cellpadding="0" class="ms-propertysheet">
       <TR valign="top"  >
       <TD class="ms-descriptiontext" width="100%">
        
       </TD>
          <TD ID=onetidYPadding width="10px"><IMG SRC="/_layouts/images/blank.gif" width=10 height=1 alt=""></TD>
        </TR>
        <TR >
       <TD ID=onetidMainBodyPadding height="8px"><IMG SRC="/_layouts/images/blank.gif" width=1 height=8 alt=""></TD>
        </TR>
        <tr>
        <td valign="top" height="100%">
          <A name="mainContent"></A>
        
     <table width=100% border=0 class="ms-titleareaframe" cellpadding=0>
     <TR>
     <TD valign=top width="100%" style="padding-top: 10px" class="ms-descriptiontext">
        <span id="ctl00_PlaceHolderMain_LabelMessage">The file you are attempting to save or retrieve has been blocked from this Web site by the server administrators.</span>
        <P><span class="ms-descriptiontext">
      <span id="ctl00_PlaceHolderMain_helptopic_troubleshooting"><A Title="Troubleshoot issues with Windows SharePoint Services. - Opens in new window" HREF="BLOCKED SCRIPTHelpWindowKey('troubleshooting')">Troubleshoot issues with Windows SharePoint Services.</A></span>
      
      </span>
     </TD>
     </TR>
     </table>
    <script type="text/javascript" language="JavaScript">
      var gearPage = document.getElementById('GearPage');
      if(null != gearPage)
      {
       gearPage.parentNode.removeChild(gearPage);
       document.title = "Error";
      }
    </script>

        </td>
        </tr>
      </table>
       </td>
       <td class="ms-rightareacell">
    <div class='ms-areaseparatorright'><IMG SRC="/_layouts/images/blank.gif" width=8 height=100% alt=""></div>
    </td>
     </TR>
    <tr>
     <td class="ms-pagebottommarginleft"><IMG SRC="/_layouts/images/blank.gif" width=1 height=10 alt=""></td>
     <td class="ms-pagebottommargin"><IMG SRC="/_layouts/images/blank.gif" width=1 height=10 alt=""></td>
     <td class="ms-bodyareapagemargin"><IMG SRC="/_layouts/images/blank.gif" width=1 height=10 alt=""></td>
     <td class="ms-pagebottommarginright"><IMG SRC="/_layouts/images/blank.gif" width=1 height=10 alt=""></td>
    </tr>
     </TABLE></TD></TR>
      </TABLE>
        
       <input type="text" name="__spDummyText1" style="display:none;" size=1/>
       <input type="text" name="__spDummyText2" style="display:none;" size=1/>
      </form>
     
    </BODY>
    </HTML>

Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.