Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ServiceStack Razor web.config

web config errors

  <configSections>
    <sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
      <section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
      <section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
    </sectionGroup>
  </configSections>

After I updated to v3.9.55.0 my web config got these errors. The website still works (surprisingly). The website obviously won't work if I remove them. I am not sure how to fix these errors or it would effect anything at all.

It seems to have something to do with SS no longer use Razor 1.0? Should I simply add Razor 2.0 of System.web.WebPages.Razor to fix the issue or what?

Also, there is a System.Web.Razor.Unoffical Razor v3.0 in the reference dlls. Is it a SS mod or MS offical beta?

You see, I am a bit confused. Where do I get some explanation of this new update? Thank you.

like image 284
Tom Avatar asked Nov 12 '22 01:11

Tom


1 Answers

Here is the section that works fine.

<configSections>
    <sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
      <section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
      <section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
    </sectionGroup>
  </configSections>

It is tried and tested. Also you can check out my fsharp port of razor rockstars along with razor rockstars, I don't know if razor rockstars is updated with latest libraries.

UPDATE

I checked razor rockstars I guess it is updated with latest frameworks. You should check out that too.

Best way to solve this kind of error is to use completed project instead of dll. So, you can debug the source code itself and it there is any issue you can patch back.

Please let me know if any further details required.

like image 125
kunjee Avatar answered Dec 06 '22 07:12

kunjee