Drybridge Technologies

April 10, 2009

Drybridge Technologies

Filed under: Drybridge Activities — Tags: — art colman @ 3:01 pm

Here is the latest update from Drybridge Technologies:

  • Drybridge XML Document Transformer: Proof of Concept posted at www.drybridge.com – Provides rapid and efficient XSLT template creation. The Transformer was used to convert 500+ StratML documents for the xml.gov initiative (http://xml.gov/stratml/index.htm)
  • Reviewing applicability of XSLTforms as a framework for XForms development – looking good.
  • The Drybridge Investigator for Schema Difference Analysis has been released and is available as a free download at www.drybridge.com.
  • The papiNet Product Attributes Accelerator, an Excel Plug-In is complete and available for download. This remains the only free to use papiNet tool offered for use.
  • Drybridge Schema Documentation Facilitator Tool: Available for use see www.drybridge.com for more information.
  • www.schema-archive.com is now functional. A convenient location for schema from standards organizations. Contact us for inclusion.

November 4, 2009

ASP.Net Dynamic Data: HTML Editor Field Template – VB.Net Walkthrough

Filed under: asp.net dynamic data — Tags: , , — art colman @ 11:57 am

ASP.Net Dynamic Data: HTML Editor Field Template – VB.Net Walkthrough

For those of you interested in ASP.Net Dynamic Data Stephen Naughton provides excellent postings on the topic. This particular entry takes his HTML Editor post and converts it to VB.Net. You can find his original post at http://csharpbits.notaclue.net/2009/06/html-editor-fieldtemplate-for-dynamic.html

I also have found his posts an excellent way to learn about some escoteric features that I would not necessarily have pursued, on my own. For example, look at the sophisticated GetAttributeOrDefault Sub in the HtmlEditorAttribute module.

For this Field Template we will be creating three items:

  1. HtmlEditorAttribute.vb – I am currently working in an MVC-DynamicData website and I placed this item in my Models folder
  2. Html.ascx – In the FieldTemplates folder
  3. Html_Edit.ascx – In the FieldTemplates folder
  4. You will also need AjaxControlToolkit.HTMLEditor

It was a straight-forward conversion process. The only dramatic changes were HtmlEditorAttribute is a module and AttributeUsage at the HtmlEditorAttribute level was broadened to include Field as well as Property. The associated files can be found at this link (Dynamic Data Html Editor Field Template – VB.Net).

Many thanks.

November 3, 2009

Dynamic Data Error: “Name ‘FieldValueString’ is not declared”

Filed under: asp.net dynamic data — Tags: , , — art colman @ 8:48 pm

Dynamic Data Field Template Error: “Name ‘FieldValueString’ is not declared”

When you first create a field template a “Name ‘FieldValueString’ is not declared” error exists. This error goes away once the solution is built.

October 28, 2009

SQL Server: Login failed for user ‘NT AUTHORITY\NETWORK SERVICE”

Filed under: Drybridge Activities — Tags: , , — art colman @ 11:50 am

SQL Server: Login failed for user ‘NT AUTHORITY\NETWORK SERVICE”

An interesting take on Login failed for user ‘NT AUTHORITY\NETWORK SERVICE” message associated with SQL Server that I haven’t seen published. I do a lot of development related debugging with file associated databases. In one of my sessions I must have abended and kept the database in an open state. Restarting Visual Studio and openning and closing the associated solution did nothing to resolve the problem. I was able to determine the problem by attempting to create a new connection string for the database and in the process was informed that the database was in an open state (although the db did not appear to be open). I had to restart my computer session in order to clear the situation.

September 2, 2009

Asp.net MVC classes not showing in View Add Mode

Filed under: VB.Net Development, asp.net mvc — Tags: , — art colman @ 2:20 pm

If you find that a class that you are working on is not showing up when you try to add a view make sure that you have compiled the class into your project.

August 28, 2009

VS Development Server Troubleshooting

Filed under: VB.Net Development — Tags: — art colman @ 4:16 pm

VS Development Server Troubleshooting

Unable to debug or start web project.

I was burdened with an extremely annoying issue that was interfering with my productive use of VS2008 for web development. The issue being that  the initial web page was not being loaded when running VS2008 against a file-system web-site or an IIS web-ste (in Admin mode). The expression of the problem varies based upon the degree to which you have debugging enabled. You are either presented with:

  • A message indicating that the application could not connect to the localhost port specified in the VS Development Server (ASP.Net Development Server)
  • That compilation could not take place because access was denied
  • or Compiler Error Message: BC2000: compiler initialization failed unexpectedly: Access is denied.

The solution is found at the thread stored at http://forums.asp.net/p/1243868/3375733.aspx

In brief the solution is to provide NETWORK SERVICES with full control over the Windows/Temp directory. Yes, it works.

You do this by:

  1. Nnavigating to the Windows/Temp directory in Windows Explorer
  2. Right clicking for Properties
  3. Security Tab
  4. Edit
  5. Add
  6. Advanced
  7. Find Now
  8. Select “NETWORK SERVICES” or you could probably type this in back in Step 5 but….
  9. OK, OK, OK, et al.

Much thanks to Carl Kelley for providing this information.

June 11, 2009

Comparing the use of id as an attribute and the xml:id attribute

Filed under: XML — Tags: , — art colman @ 11:05 am

Comparing the use of id as an attribute and the xml:id attribute

I recently had the opportunity to delve into the use “id” as a property of schema structures versus the use of an “xml:id” attribute that is associated with with another element.

The confusion arises because the way in which properties are associated with schema structures is by attributes (as defined by the w3c). These property-ids are inward facing (not visible in the xml instance document) versus the attribute-ids that are outward facing (communicated in the xml instance document).

There are two references to the property-id scenario in the w3c structures document http://www.w3.org/TR/2000/WD-xmlschema-1-20000407/

 From Section 4.2.1

  •  
    • Short-form fragment identifiers may also be used in some cases, that is when a DTD or XML Schema is available for the schema in question, and the provision of an id attribute for the representations of all primary and secondary schema components, which is of type ID, has been exploited.

From the dtd for the schema in the above w3c documentation.

  •  
    • <!– The id attribute here and below is for use in external references from non-schemas using simple fragment identifiers. It is NOT used for schema-to-schema reference, internal or external. –>

Reconciling the above two excerpts to each other (one talks about a schema being available and the other talks about a schema not being available) is somewhat problematic but in the second case I believe the inference is that at least one of the documents is a non-schema derived document. Regardless, the intent appears to be to allow reference to path fragments.

The second use is very well documented in http://www.w3.org/TR/2005/REC-xml-id-20050909/ which I found by reading an excellent article on XML Internationalization http://tibor.w3.org/TR/2008/NOTE-xml-i18n-bp-20080213/

 It is this approach which would result in the inclusion of attribute-id information in the XML instance documents.

May 7, 2009

“Attempt to read or write protected memory” SQLServerCE

Filed under: VB.Net Development — Tags: — art colman @ 8:47 am

“Attempt to read or write protected memory” SQLServerCE

I believe I have found a cause (there could be others) for the above error message in the SQL Server CE environment. In my case I am converting to Compact Edition from an enterprise version of  SQL Server that is, from stored procedures to SQLCECommands that are compiled (Prepared). In my initial incarnation of the programs I would create and destroy the command everytime I used it and since I was performing repetitive reads on the database there was a lot of work going on. When I converted to a command that was created and prepared once, when it is initially required, and then reused the protected memory errors dissappeared.

April 29, 2009

XmlSerializers.dll file not uploaded when using ClickOnce Publish

Filed under: Windows Application — Tags: — art colman @ 10:35 am

XmlSerializers.dll file not uploaded ClickOnce Publish

I’d like to thank Troy Schmidt (whoever you are, where ever you are) for providing the following work around for a significant error that I have run into when using ClickOnce deployment. It is extremely important to validate that ClickOnce deployments are being published correctly.

The work around is…

Instead of using the Publish Now in the Publish tab of the Project’s properties, use the Publish in the Build Menu of the Toolbar. I have found that Publish setting that brings up the wizard versus the Publish Now button will include the XMLSerializers in VS2008 SP1.

What is interesting about this approach is that the XmlSerializers.dll file is not required to be uploaded when using the Publish option from the Build Menu. It seems that when you use the Publish button from within the Project Properties UI that an incorrect check for the XmlSerializers.dll file is created.

The link to the original support request is https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=354598&wa=wsignin1.0

April 16, 2009

OpenXML SpreadsheetML Cell Formatting

Filed under: Office Development, Schema Documentation, XML — Tags: — art colman @ 10:03 am

OpenXML SpreadsheetML Cell Formatting

Here is some quick and dirty information related to formatting a cell. This is a quick cut and paste job that will require some rework to make it understandable but it should provide some usable information in the meantime.

The code fragments are included in the following document. What are included are.

  1. Setting the StyleIndex of the cell
  2. Determining the StyleIndex (application specific code)
  3. Creating the Stylesheet (where the StyleIndexes are set)
  4. Where the Stylesheet creation process fits into the document creation flow (code fragment)

SpreadsheetML_Cell_Formatting
 

Please note that there are several unreferenced procedures in the above code fragments and that the “mSpreadsheet” variable is an instance of “Spreadsheet” which is created elsewhere. However, the code fragments should provide you with an initial starting point.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Private Shared Function StyleIndex_Determine(ByVal columnName As String, ByVal indentLevel As Integer, ByVal fontStyle As  System.Drawing.FontStyle, ByVal borderStyle As BorderTypeType) As 

UInt32Value 

 

 

 

If columnName <> “A” Then

     indentLevel = 0

 

 

 

End If

 

 

 

 

If indentLevel = 0 Then

 

 

 

 

     If fontStyle = System.Drawing.FontStyle.Bold Then

 

 

 

 

          Return 

9 

 

 

 

     ElseIf fontStyle = System.Drawing.FontStyle.Italic Then

 

 

 

 

          Return 

18 

 

 

 

     Else

 

 

 

 

 

 

 

          Return 

0 

 

 

 

     End If

 

 

 

 

ElseIf indentLevel = 1

     ‘etc.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

End If

 

 

 

 

 

 

 

 

 

 

 

End Function

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

April 11, 2009

ECMA 376 Schemas – Adjusted to permit .Net Framework SchemaSet Use

Filed under: Drybridge Activities — art colman @ 9:22 am

ECMA 376 Schemas – Adjusted to permit .Net SchemaSet Use

The ECML 376 schemas appear to have been created in such a way as to permit each individual schema file to stand-alone as a valid XSD. Unfortunately, when considered as a whole there are items (elements, attributes, groups, etc.) that are defined multiple times. The schemas that are published at http://www.schema-archive.com have been adjusted to correct this problem and to  permit their use in .Net SchemaSets.

In addition, a minor error in the establishment of an attribute with a default value as “required” has been corrected (set to “optional”). The details of the changes will be published shortly.

NOTE: The April 2009 CTP version of the SDK appears to have an updated Validation API, which might manage the need for my corrections.

Older Posts »

Blog at WordPress.com.