
I am creating a Asp.Net HTTP Module that will use the CodeHighlighter dynamically without the use of the the ASP.Net form control.
I have added a reference to the following dll's and copied the assemblies to my websites bin directory:
ActiproSoftware.CodeHighlighter.Net20.dll v4.0.40.0
ActiproSoftware.Shared.Net20.dll v1.0.83.0
I then use the following code:When executing the GetLanguage Function I receive the following error:
I am able to resolve this error by adding a reference to the CodeHighlighterTest.dll that is created with the samples you have provided. I have no idea why this dll would need to be added to my project for the GetLanguage function to work. Is there some kind of work around, as it seems like it should be unnecesary to include the CodeHighlighterTest.dll in my project.
Thanks for any help you may be able to provide.
I have added a reference to the following dll's and copied the assemblies to my websites bin directory:
ActiproSoftware.CodeHighlighter.Net20.dll v4.0.40.0
ActiproSoftware.Shared.Net20.dll v1.0.83.0
I then use the following code:
Dim configuration As CodeHighlighterConfiguration = CType(System.Configuration.ConfigurationManager.GetSection("codeHighlighter"), CodeHighlighterConfiguration)
Dim language As ActiproSoftware.SyntaxEditor.SyntaxLanguage = ActiproSoftware.CodeHighlighter.CodeHighlighter.GetLanguage(configuration, Options.LanguageName)
ActiproSoftware.SyntaxEditor.InvalidLanguageDefinitionException was unhandled by user code
Message="An error occurred while loading the DynamicSyntaxLanguage '{Unknown}':
The syntax language type 'CodeHighlighterTest.VBDotNetDynamicSyntaxLanguage, CodeHighlighterTest' could not be loaded.
The problem occurred near line 1, position 2
in Unknown Stream."
Source="ActiproSoftware.CodeHighlighter.Net20"
StackTrace:
at l.a(DynamicSyntaxLanguage A_0, XmlTextReader A_1, String A_2, Boolean A_3)
at l.b(DynamicSyntaxLanguage A_0, XmlTextReader A_1, String A_2)
at l.a(IDesignerHost A_0, XmlTextReader A_1, String A_2, DynamicSyntaxLanguage A_3)
at l.b(IDesignerHost A_0, XmlTextReader A_1, String A_2, DynamicSyntaxLanguage A_3)
at l.c(IDesignerHost A_0, XmlTextReader A_1, String A_2, DynamicSyntaxLanguage A_3)
at ActiproSoftware.SyntaxEditor.Addons.Dynamic.DynamicSyntaxLanguage.a(IDesignerHost A_0, Stream A_1, Int32 A_2, DynamicSyntaxLanguage A_3)
at ActiproSoftware.SyntaxEditor.Addons.Dynamic.DynamicSyntaxLanguage.LoadFromXml(String path, Int32 encryptionKey)
at ActiproSoftware.CodeHighlighter.CodeHighlighter.GetLanguage(CodeHighlighterConfiguration config, String languageKey)
at HttpModules.CodeHighlighter.HighlightCode(String inputText, CodeBlockOptions Options) in D:\My Documents\Visual Studio 2005\Projects\HttpModules.CodeHighlighter.Net20\CodeHighlighter.vb:line 125
at HttpModules.CodeHighlighter.Write(Byte[] buffer, Int32 offset, Int32 count) in D:\My Documents\Visual Studio 2005\Projects\HttpModules.CodeHighlighter.Net20\CodeHighlighter.vb:line 104
at System.Web.HttpWriter.Filter(Boolean finalFiltering)
at System.Web.HttpResponse.FilterOutput()
at System.Web.HttpApplication.CallFilterExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Thanks for any help you may be able to provide.