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.
... 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.
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.
'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:
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.
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:
or
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?
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...
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.
Hi Dave,
I just experienced the same problem on another development box, your solution worked. Thanks very much!
Best,
Benjain
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
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!
is working on a reply...