Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesRazor script error - _UserList.cshtmlRazor script error - _UserList.cshtml
Previous
 
Next
New Post
1/23/2011 2:15 PM
 
I'm not sure if this is the right forum for this, but I couldn't find one specifically for Razor issues. Apologies if it's in the wrong place.
I was trying out the provided Razor scripts and the ones I've tried work fine except for the _UserList.cshtml script which gives the following error.  Anybody seen this?  Suggestions?  I looked at the script, but nothing jumped out at me. Thanks, Bill

Error: Razor Host is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: d:\websites\dnndev\DesktopModules\RazorModules\RazorHost\Scripts\_UserList.cshtml(5): error CS1002: ; expected ---> System.Web.HttpCompileException: d:\websites\dnndev\DesktopModules\RazorModules\RazorHost\Scripts\_UserList.cshtml(5): error CS1002: ; expected at System.Web.Compilation.AssemblyBuilder.Compile() 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.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) at System.Web.Compilation.BuildManager.GetCompiledType(VirtualPath virtualPath) at DotNetNuke.Web.Razor.RazorModuleBase.CreateWebPageInstance() at DotNetNuke.Web.Razor.RazorModuleBase.OnPreRender(EventArgs e) --- End of inner exception stack trace ---
 
New Post
1/24/2011 1:26 AM
 
I think I found the problem.  The following line
    var selectQueryString = "SELECT * FROM " + usersTableName " ORDER BY UserName";
should be
    var selectQueryString = "SELECT * FROM " + usersTableName + " ORDER BY UserName";

I'm not sure if it came this way or I somehow messed it up when I was looking at the scripts.  It does, however, reveal the level of errors that one can expect from the Razor Host module.  You get told that it has an error in it somewhere, but nothing more than that.  I expect that line by line errors are being generated somewhere.  Anybody know where to look or how to get access to that output?

Thanks,
Bill
 
New Post
2/5/2011 5:09 PM
 
You're right Bill. I came across the same issue and fixed in in the same way. I think someone put it in there deliberately just to keep us on our toes! Gus

"if the only tool you have is a hammer you tend to see every problem as a nail" http://www.carawaydesign.com
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesRazor script error - _UserList.cshtmlRazor script error - _UserList.cshtml


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

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

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. 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.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out