Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Michael Hyldsgaard 64 posts 124 karma points
    Sep 26, 2011 @ 12:05
    Michael Hyldsgaard
    0

    'Examine.ExamineManager' threw an exception

    I'm moving a website to another server.

    One of my razor scripts suddenly fails with this error:

    The type initializer for 'Examine.ExamineManager' threw an exception.

    All my script is doing is this:

    <div>
    @foreach (var slide in Model.NodeById(2745).Children)
    {
      @*<a href="@slide.Url">*@
      <a href="/">
       <img title="" src="/umbraco/[email protected](slide.subBannerImage).umbracoFile&width=955&height=250&Compression=100&Crop=Resize&Align=Center&VAlign=Middle&AllowUpsizing=True" />
      </a>
    }
    </div>

    It's the <IMG> line that causes the error.

    Any ideas on what might be wrong? The script doesn't fail on the "old" server.

     

  • daveb.84 21 posts 46 karma points
    Sep 30, 2011 @ 14:57
    daveb.84
    0

    Has anyone found a solution to this?

    I'm having exactly the same problem when running Umbraco v 4.7.1 on IIS 7 (windows 7).  It works find when I use Visual studio 2010's built in webserver (cassini) so is there something I need to do to get it working on IIS 7?

    I'm calling the following:

    var image = Model.NodeById(1053);

    or

    var image = Model.MediaById(1053);

    and getting the same exception.  Looking at the inner exception, I'm getting this:

    Unable to generate a temporary class (result=1).\r\nerror CS2001: Source file 'C:\\Windows\\TEMP\\ak2rjahu.0.cs' could not be found\r\nerror CS2008: No inputs specified\r\n (C:\\My Projects\\MySolution\\My.Website\\config\\ExamineSettings.config line 12)

    I haven't changed my Examine settings config, and haven't done anything to setup Examine, I'm just using the out of the box setup and have put in my first Razor template.

    Any ideas?

  • daveb.84 21 posts 46 karma points
    Sep 30, 2011 @ 15:28
    daveb.84
    3

    Ok, so I've dug a little deeper, and the exact line causing the problem is in Examine.dll in the method "LoadProviders".  It's this line...

    ProvidersHelper.InstantiateProviders(ExamineSettings.Instance.IndexProviders.Providers, this.IndexProviderCollection, typeof(BaseIndexProvider));

    I looked at this post...

    http://forums.asp.net/t/985053.aspx/1

    ... and the problem is that the account that runs the website didn't have permissions to write to c:\windows\temp

    I fixed it by setting the App Pool of my umbraco website to run under "Network Service" then adding full control for this account to the windows temp folder.  No doubt this is a heinous crime as far as security is concerned, but you could always use a different account if needed.

    Hope this helps.

  • Jamie Howarth 306 posts 773 karma points c-trib
    Nov 29, 2011 @ 14:45
    Jamie Howarth
    0

    Hi Dave,

    I just experienced the same problem on another development box, your solution worked. Thanks very much!

    Best,

    Benjain

  • Ed Bishop 53 posts 203 karma points
    Dec 19, 2011 @ 13:36
    Ed Bishop
    0

    Thanks daveb.84, sorted me right out!

    I don't think the examine instance running inside the website should rely on permissions to the c:\Windows\Temp directory as it has it's own temp directories.

    Ed

  • Peter Cort Larsen 418 posts 1015 karma points
    Jan 09, 2014 @ 10:04
    Peter Cort Larsen
    0

    A client of mine had the same issue.

    Problem: The account was suspended by the hosting company, due to unpaid bills.

    After the hosting company reactivated the account, everthing worked again.

     

    So please check this also!

Please Sign in or register to post replies

Write your reply to:

Draft