Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render error in Azure #612

Closed
peter3 opened this issue Jun 23, 2022 · 2 comments
Closed

Render error in Azure #612

peter3 opened this issue Jun 23, 2022 · 2 comments

Comments

@peter3
Copy link

peter3 commented Jun 23, 2022

After deploying to Azure the other day we got the following error on our site:

Message: D:\home\site\wwwroot\Areas\XXXX\Views\Blocks\SomeBlock.cshtml(15): error CS1061: 'string' does not contain a definition for 'ToHtmlString' and no extension method 'ToHtmlString' accepting a first argument of type 'string' could be found (are you missing a using directive or an assembly reference?)

Failed method: StackExchange.Profiling.Mvc.WrappedView.Render

We don't have any ToHtmlString in the view (and actually we don't use it anywhere).

Stack trace:

System.Web.HttpCompileException:
  at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
  at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
  at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a) 
  at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a) 
  at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a) 
  at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a) 
  at System.Web.Compilation.BuildManager.GetCompiledType (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a) 
  at System.Web.Mvc.BuildManagerCompiledView.Render (System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) 
  at StackExchange.Profiling.Mvc.WrappedView.Render (MiniProfiler.Mvc5, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b44f9351044011a3: C:\projects\dotnet\src\MiniProfiler.Mvc5\WrappedView.cs:55) 
  at System.Web.Mvc.ViewResultBase.ExecuteResult (System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) 

Any suggestion what can have casued this error? A subsequent deploy without any changes to the view or the MiniProfiler code does not cause the error

Thanks

@peter3
Copy link
Author

peter3 commented Jun 23, 2022

I forgot to mention: we have used MiniProfiler for at least a couple of months with frequent deploys without any issues until this particular deploy

@NickCraver
Copy link
Member

.ToHtmlString() is from the base Mvc framework - it's likely a DLL didn't copy (maybe it was in use during deploy?) or similar. If you only saw it this one time, I wouldn't spend a lot more time investigating if it were me - but if it repeats you likely have some deploy contention/locking happening would be my first guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants