Compilation Error - The type or namespace name 'Linq' does not exist in the namespace 'System'

Topics: Installing Orchard
Apr 18, 2012 at 1:33 PM
Edited Apr 18, 2012 at 1:38 PM

I'm trying to get Orchard running at www.playintothesun.com so I copied the content of Orchard.Web.1.4.0.zip in the wwwroot folder but I'm getting this error:

Compiler Error Message: CS0234: The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?)

Source Error:

 
Line 102:        <add namespace="System.Web.Mvc.Html" />
Line 103:        <add namespace="System.Web.Routing" />
Line 104:        <add namespace="System.Linq" />
Line 105:        <add namespace="System.Collections.Generic" />
Line 106:        <add namespace="Orchard.Mvc.Html" />

Before trying to install it by just copying the files to the server, I used WebMatrix and published from there but I was getting the same error. Orchard was working fine locally when I was using WebMatrix (SQL Compact).

Thanks for helping!

Coordinator
Apr 18, 2012 at 6:09 PM

Probably wrong version of .NET. Check your app pool settings.

Apr 18, 2012 at 6:19 PM

The setting in WebsitePanel is ASP.NET 4.0 Integrated Pipeline for this website.

Coordinator
Apr 18, 2012 at 6:28 PM

You probably didn't upload everything you needed then. It's common when using FTP. That's why I use WebDeploy whenever I can instead of ftp.

Apr 18, 2012 at 7:03 PM

I downloaded the files from FTP and made a binary comparison with the ones in Orchard.Web.1.4.0.zip. They seem to be the same. However, a folder Dependencies was created under App_Data that contains 32 dll files (Orchard.*.dll etc.) and 2 xml (dependencies.compiled.xml and dependencies.xml). Also, the remote web.config now includes:

<directoryBrowse enabled="false" />
        <defaultDocument>
            <files>
                <clear />
                <add value="index.php" />
                <add value="Default.htm" />
                <add value="Default.asp" />
                <add value="index.htm" />
                <add value="index.html" />
                <add value="iisstart.htm" />
                <add value="default.aspx" />
            </files>
        </defaultDocument>

 

Apr 18, 2012 at 7:04 PM
Edited Apr 18, 2012 at 7:05 PM

IE9 error made the above post to display twice. Sorry.

Coordinator
Apr 18, 2012 at 8:38 PM

Maybe your hosting company has a weird trust level? Always prefer hosting companies that give you full trust.

Apr 18, 2012 at 8:40 PM
Edited Apr 18, 2012 at 8:53 PM

What can I do to find out more about the issue? What should I ask the hosting company? Full trust is not enabled for the hosting plan I contracted.

I installed Orchard on another website (http://intothesun.co.uk/) on the same host but through WebsitePanel - Microsoft Web App Gallery using a MSSQL database. I get the same error.

Coordinator
Apr 18, 2012 at 10:20 PM

Ask them what their trust level is. That's probably the problem.

Apr 19, 2012 at 10:26 AM
Edited Apr 19, 2012 at 3:47 PM

They say the trust level is set to medium. By default.

I asked them to grant full trust for a limited time, just to see if it works. They agreed and it works with full trust. However, I tried to install a new theme because I knew this could be problematic and I got this error even though from what I can tell there is write access to those folders:

"Package installation failed: There was an error installing the requested package. This can happen if the server does not have write access to the '~/Modules' or '~/Themes' folder of the web site. If the site is running in shared hosted environement, adding write access to these folders sometimes needs to be done manually through the Hoster control panel. Once Themes and Modules have been installed, it is recommended to remove write access to these folders."

Coordinator
Apr 19, 2012 at 6:49 PM

That's a different issue: you probably have the wrong feed configured. It should be http://packages.orchardproject.net/FeedService.svc/

Medium trust should work, but it seems like somehow it fails on 1.4 with some hosting companies. I'm not sure why but in any case I would strongly advise looking for a hoster that offers full trust. There are so many quality affordable hosting plans with full trust nowadays that for a company to only offer medium is just not justifiable in my eyes. I would not give them my business.

Apr 19, 2012 at 7:00 PM

I thought I got a good deal with this hosting company.

Thanks for your help!