DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Visual Basic

Sort:
You are not authorized to post a reply.





New Around Here





    Hi, 

    I'm trying to reuse an old DNN code written in VB but I receive this message:

    DotNetNuke.Services.Exceptions.ModuleLoadException: 'Visual Basic' is not a supported language.

    But in Extentions > Create new module 

    there is the possibility to select Visual Basic as language.

    I really need to convert my module from VB to C#?

    Thanks

     

     






    Veteran Member





      Yes, you can still use VB to write modules.

      It has been a while, but I'd guess that there is some configuration item that is not set. Possibly something in web.config?

      Are you doing this as a compiled module or an uncompiled one?
      Joe Craig
      DNN MVP
      Patapsco Research Group





      New Around Here





        This is a good news!
        My module is not compiled. I'm writing it into the editor. But which could be the problem in web.config? My module doesn't use any configuration.





        New Around Here





          For more infos, this is the complete error message:

          Error: Famiglia is currently unavailable. DotNetNuke.Services.Exceptions.ModuleLoadException: 'Visual Basic' is not a supported language. ---> System.Web.HttpParseException: 'Visual Basic' is not a supported language. ---> System.Web.HttpParseException: 'Visual Basic' is not a supported language. ---> System.Web.HttpException: 'Visual Basic' is not a supported language. at System.Web.Configuration.CompilationSection.GetCompilerInfoFromLanguage(String language) at System.Web.UI.TemplateParser.ProcessLanguageAttribute(String language) at System.Web.UI.TemplateParser.ProcessMainDirectiveAttribute(String deviceName, String name, String value, IDictionary parseData) at System.Web.UI.TemplateControlParser.ProcessMainDirectiveAttribute(String deviceName, String name, String value, IDictionary parseData) at System.Web.UI.TemplateParser.ProcessMainDirective(IDictionary mainDirective) --- End of inner exception stack trace --- at System.Web.UI.TemplateParser.ProcessException(Exception ex) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) --- End of inner exception stack trace --- at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath) at System.Web.UI.TemplateParser.ParseInternal() at System.Web.UI.TemplateParser.Parse() at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType() at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider) at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at DotNetNuke.UI.ControlUtilities.LoadControl[T](TemplateControl containerControl, String ControlSrc) at DotNetNuke.UI.Modules.WebFormsModuleControlFactory.CreateControl(TemplateControl containerControl, String controlKey, String controlSrc) at DotNetNuke.UI.Modules.WebFormsModuleControlFactory.CreateModuleControl(TemplateControl containerControl, ModuleInfo moduleConfiguration) at DotNetNuke.ModulePipeline.ModuleControlPipeline.LoadModuleControl(TemplateControl containerControl, ModuleInfo moduleConfiguration) at DotNetNuke.UI.Modules.ModuleHost.LoadModuleControl() --- End of inner exception stack trace --





          New Around Here





            Probably I've found the problem:
            when I create the new module (empty) DNN creates the ascx file with this in header:
            Control Language="Visual Basic" ClassName....

            But the string "Visual Basic" is not valid (I'm VB developer from long time).
            So I changed it to "vb" and....now the error message does not appears any more.

            This is wrong:
            Control Language="Visual Basic" ClassName

            This is correct:
            Control Language="vb" ClassName

            Have a nice day!





            Veteran Member





              Digging around in some old websites, I found a codedom section in web.config that has a compilers section.

              Also, there is a codeSubDirectories section.

              You may need one or both of these. But, as I said, it's been a long time since I've had to work in that arena. You may want to look for some old "how to build a DotNetNuke module" references using Google. Something before version 7 I think.

              Hopefully, some folks here have longer memories than I do.
              Joe Craig
              DNN MVP
              Patapsco Research Group





              New Around Here





                Don't worry! 

                I've solved as written above.
                Thank you very much for your help.

                Davide

                You are not authorized to post a reply.

                These Forums are dedicated to the discussion of DNN Platform.

                For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

                1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
                2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
                3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
                4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
                5. No Flaming or Trolling.
                6. No Profanity, Racism, or Prejudice.
                7. Site Moderators have the final word on approving / removing a thread or post or comment.
                8. English language posting only, please.

                Would you like to help us?

                Awesome! Simply post in the forums using the link below and we'll get you started.

                Get Involved