0

I uploaded my MVC3 Razor application to the webhost provider (works fine on my development server under Visual Studio 2010).

On the deployed site I get a

"Could not load file or assembly 'FreeTextBox, Version=3.3.1.12354, Culture=neutral, PublicKeyToken=5962a4e684a48b87' or one of its dependencies. The system cannot find the file specified."

But I am totally puzzled, my application does NOT have ANY FreeTextBox in it! I am not even referencing that DLL. Unfortunately the "Detaile" IIS error doesn't even mention who or what is trying to load that DLL so I have no idea where it is coming from.

To triple check I did a search on FreeTextBox on my self-built app with search mask . on the ENTIRE solution and Visual Studio can't find anything.

Here the Actual Solution It was indeed inheriting an assembly of the parent application. Ketan as per your suggestion I solved it by doing this:

  <system.web>
     <assemblies>
        <clear/>
        ... here standard MVC3 assemblies of template project ...
     </assemblies>**
   </system.web>
Lord of Scripts
  • 3,579
  • 5
  • 41
  • 62

2 Answers2

1

Is your app folder on shared host configured as an "Application"? If not then it probably is using the machine.config or web.config at a higher level where there is a reference of that control. The FreeTextBox is a ASP.NET WYSWYG Text editor something that webhosts normally include in their hosting packages as free. I would contact their tech support to fix this.

Ketan
  • 5,861
  • 3
  • 32
  • 39
  • actually that gets me thinking. In this case I am publishing to a virtual directory. My main website is say example.com a full ASPX application. Now, the one I am having problems with does NOT have FreeTextBox BUT it is a subdirectory of example.com (Example.com/myApp/). – Lord of Scripts May 21 '12 at 21:37
  • Now that you mention it, the problem occurs on example.com/myApp which is a virtual directory of example.com. It is also marked as an application. However, the root site does make use of FreeTextBox. so apparently this is bleeding through somehow even though the virtual directory is marked as an application. How do I make it NOT inherit anything from the root application? – Lord of Scripts May 21 '12 at 21:39
  • Create a separate website pointing to the MVC folder. Does it have to be a virtual directory? – Ketan May 21 '12 at 21:45
  • as per your suggestion I solved it. I updated the question with the actual solution. – Lord of Scripts May 21 '12 at 22:41
  • I couldn't, my webhosting account has a limit on websites so I had to work around by adding virtual directory applications :( – Lord of Scripts May 22 '12 at 15:21
0

you are referencing a assembly with a dependency on "FreeTextBox".

deploy the .dll containing the "FreeTextBox" assembly to your /bin dir or find the offending assembly with a tool like

marc.d
  • 3,804
  • 5
  • 31
  • 46
  • Thanks, as I mentioned my code does *not* use FreeTextBox, it does not even appear in my /bin (local PC). On the shared webhost It seems to try to load that. For the sake of completeness I used dotNEtPeek and examined ALL the DLLs in the /bin of my MVC application and NONE of them depend on FreeTextBox. – Lord of Scripts May 21 '12 at 16:35
  • @lord is your web.config loading a http-handler or module which is using FreeTextBox? what about the machine.config? – marc.d May 21 '12 at 16:55
  • nope, there is no FreeTextBox in web.config either and this being a plain MVC3 with Razor website, it has no http handler. – Lord of Scripts May 21 '12 at 18:16
  • Are you on your own dedicated server or are you using some "shared" hosting solution? – Nick Bork May 21 '12 at 20:35
  • @Ketan as per your suggestion I solved it by doing this: ... here standard MVC3 assemblies of template project ... – Lord of Scripts May 21 '12 at 22:43