Parsing property in ASP version 4 causes FormatException - asp.net

I have this code fragment
public Version BuildVersion =Version.Parse(System.Web.Configuration.WebConfigurationManager.AppSettings["BuildVersion"].ToString());
which reads following appSetting entry
<appSettings>
<add key="BuildVersion" value="4.7.2.2" />
</appSettings>
This throws exception
[FormatException: Input string was not in a correct format.]
System.VersionResult.SetFailure(ParseFailureKind failure, String argument) +10852983
System.Version.TryParseComponent(String component, String componentName, VersionResult& result, Int32& parsedComponent) +105
System.Version.TryParseVersion(String version, VersionResult& result) +135
System.Version.Parse(String input) +68
QuickPick.Main..ctor() in D:\IWROX-DEV\Expresslane\IWorx-Trunk-PromoFrontEnd\ExpressLane.Web\Main.Master.cs:52
ASP.main_master..ctor() in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\e43b3107\2f748eb6\App_Web_main.master.cdcab7d2.uaxqveln.0.cs:0
__ASP.FastObjectFactory_app_web_main_master_cdcab7d2_uaxqveln.Create_ASP_main_master() in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\e43b3107\2f748eb6\App_Web_main.master.cdcab7d2.uaxqveln.1.cs:0
System.Web.Compilation.BuildResultCompiledType.CreateInstance() +30
System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +782
System.Web.UI.Page.get_Master() +54
System.Web.UI.Page.ApplyMasterPage() +14
System.Web.UI.Page.PerformPreInit() +45
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +335
once deployed to the server, However it runs fine on VS2010 web host (ASP NET Development Server).

Most likely the correct config file is not deployed to your host.

Related

Asp.Net webforms Viewstate validation getting failed

I have a website hosted on shared server, running on .Net version : 4.0.30319.34280
I was initially getting the following error
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
In order to fix it I added a section in my web.config, by following the steps mentioned at : https://support.microsoft.com/en-us/kb/312906
Now I am getting the following error
Unable to validate data.
stack trace:
[HttpException (0x80004005): Unable to validate data.]
System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Boolean useValidationSymAlgo, Boolean useLegacyMode, IVType ivType, Boolean signData) +1072
System.Web.UI.Page.EncryptString(String s, Purpose purpose) +150
System.Web.Handlers.AssemblyResourceLoader.FormatWebResourceUrl(String assemblyName, String resourceName, Int64 assemblyDate, Boolean htmlEncoded) +52
System.Web.Handlers.AssemblyResourceLoader.GetWebResourceUrlInternal(Assembly assembly, String resourceName, Boolean htmlEncoded, Boolean forSubstitution, IScriptManager scriptManager, Boolean enableCdn) +662
System.Web.Handlers.AssemblyResourceLoader.GetWebResourceUrl(Type type, String resourceName, Boolean htmlEncoded, IScriptManager scriptManager, Boolean enableCdn) +188
System.Web.UI.ClientScriptManager.GetWebResourceUrl(Page owner, Type type, String resourceName, Boolean htmlEncoded, IScriptManager scriptManager, Boolean enableCdn) +99
System.Web.UI.ClientScriptManager.RegisterClientScriptResource(Type type, String resourceName) +96
System.Web.UI.WebControls.BaseValidator.RegisterValidatorCommonScript() +212
System.Web.UI.WebControls.BaseValidator.OnPreRender(EventArgs e) +85
System.Web.UI.Control.PreRenderRecursiveInternal() +88
System.Web.UI.Control.PreRenderRecursiveInternal() +160
System.Web.UI.Control.PreRenderRecursiveInternal() +160
System.Web.UI.Control.PreRenderRecursiveInternal() +160
System.Web.UI.Control.PreRenderRecursiveInternal() +160
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +883
Any help in solving would be appreciated.
It could be that IIS recycled your app and therefore you get new keys for the session/view state. To alleviate this, add a machine static key in the web.config.
<machineKey
validationKey="56AB7132992003EE87F74AE4D9675D65EED8018D3528C0B8874905B51940DEAF6B85F1D922D19AB8F69781B2326A2F978A064708822FD8C54ED74CADF8592E17"
decryptionKey="A69D80B92A16DFE1698DFE86D4CED630FA56D7C1661C8D05744449889B88E8DC"
validation="SHA1" decryption="AES" />
Refrence Link

Getting an error serving images from App_Themes when using precompilation?

I have an ASP.NET site with both WebForms and MVC sections to it. When I try to precompile the site, everything works except serving images/css from under App_Themes.
If I request something like /foo/App_Themes/themeName/my.png, I get this error:
The file '/foo/App_Themes/themeName/my.png.cshtml' is in the special directory 'App_Themes', which is not allowed.
I only get this when precompiling, it works fine otherwise. Presumably MVC routing is interfering somehow, but I don't know why or how to disable it.
In case it's helpful, here's the stack trace:
System.Web.Compilation.BuildManager.ValidateVirtualPathInternal(VirtualPath virtualPath, Boolean allowCrossApp, Boolean codeFile) +9930801
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) +455
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) +103
System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) +165
System.Web.Compilation.BuildManager.GetObjectFactory(String virtualPath, Boolean throwIfNotFound) +33
System.Web.WebPages.BuildManagerWrapper.GetObjectFactory(String virtualPath) +26
System.Web.WebPages.BuildManagerWrapper.ExistsInPrecompiledSite(String virtualPath) +80
System.Web.WebPages.BuildManagerWrapper.Exists(String virtualPath) +13
System.Web.WebPages.<>c__DisplayClass1.<Exists>b__0(IVirtualPathFactory factory) +15
System.Linq.Enumerable.Any(IEnumerable`1 source, Func`2 predicate) +146
System.Web.WebPages.VirtualPathFactoryManager.Exists(String virtualPath) +73
System.Web.WebPages.DefaultDisplayMode.GetDisplayInfo(HttpContextBase httpContext, String vir tualPath, Func`2 virtualPathExists) +42
System.Web.WebPages.<>c__DisplayClassb.<GetDisplayInfoForVirtualPath>b__8(IDisplayMode mode) +22
System.Linq.WhereSelectListIterator`2.MoveNext() +104
System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source, Func`2 predicate) +94
System.Web.WebPages.DisplayModeProvider.GetDisplayInfoForVirtualPath(String virtualPath, HttpContextBase httpContext, Func`2 virtualPathExists, IDisplayMode currentDisplayMode, Boolean requireConsistentDisplayMode) +204
System.Web.WebPages.WebPageRoute.GetRouteLevelMatch(String pathValue, IEnumerable`1 supportedExtensions, IVirtualPathFactory virtualPathFactory, HttpContextBase context, DisplayModeProvider displayModeProvider) +201
System.Web.WebPages.WebPageRoute.MatchRequest(String pathValue, IEnumerable`1 supportedExtensions, IVirtualPathFactory virtualPathFactory, HttpContextBase context, DisplayModeProvider displayModes) +281
System.Web.WebPages.WebPageRoute.DoPostResolveRequestCache(HttpContextBase context) +235
System.Web.WebPages.WebPageHttpModule.OnApplicationPostResolveRequestCache(Object sender, EventArgs e) +89
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +136
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69
I was having the same issue but it only occured when I published my web application and would work fine locally. I came up with two potential solutions.
Hacky solution
By looking at the source code I could see it was throwing this error as the "BuildManager" object had a field "_forbiddenTopLevelDirectories" which it would check and throw an expection if the path was in a number of special directories, "App_Themes" being one of them.
So by using reflection I remove the "App_Themes" object from the collection by calling the following code in the global file Application_Start method.
var buildManagerType = typeof(BuildManager);
var theBuilderManager = buildManagerType.GetField("_theBuildManager"
, BindingFlags.Static | BindingFlags.NonPublic)
.GetValue(null);
var forbiddenDirectoryField = buildManagerType
.GetField("_forbiddenTopLevelDirectories",
BindingFlags.Instance | BindingFlags.NonPublic)
.GetValue(theBuilderManager);
var removeMethod = forbiddenDirectoryField.GetType().GetMethod("Remove");
removeMethod.Invoke(forbiddenDirectoryField, new object[] { "App_Themes" });
This solved the issue and my css + image files would now be correctly served when deployed. Warning - I do not have a good understanding of the consequences of editing the _forbiddenTopLevelDirectories field and doing this may have unintended side effects.
Alternative solution
Another thing i noticed was I would not recieve the errors when the runAllManagedModulesForAllRequests attribute of the modules node in the webconfig was set to false. So if your application can work with this set to false consider this solution
<modules runAllManagedModulesForAllRequests="false">

.Net Framework Data Provider May Not Be Installed?

I have an ASP.NET website created in VS 2010 which is using the MVC3 (Razor) and Entity Framework and MSSQL database. The project runs fine on my machine, however when I publish and upload to my host I get the error:
Unable to find the requested .Net Framework Data Provider. It may not be installed.
Now I believe that I have added all required DLLs to my /bin folder. This is my connection string in the web.config file:
Connection String
<add name="WhimsicalFurnishingEntities"
connectionString="metadata=res://*/App_Code.WhimsicalFurnishingModel.csdl|res://*/App_Code.WhimsicalFurnishingModel.ssdl|res://*/App_Code.WhimsicalFurnishingModel.msl;
provider=System.Data.SqlClient;
provider connection string="
data source=localhost\sqlexpress;
Initial Catalog=DBNAME;
integrated security=True;
User ID=DBUSER;
Password=DBPASSWORD;
user instance=True;
multipleactiveresultsets=True;
App=EntityFramework""
providerName="System.Data.EntityClient" />
I have read that you might need to add another connection string just for the database SQL Client and I have tried:
What I Have Tried
<add name="WhimsicalFurnishingMembership"
connectionString="data source=localhost\sqlexpress;Initial Catalog=DBNAME;Integrated Security=false;User ID=DBUSER;Password=DBPASSWORD;"
providerName="System.Data.SqlClient"/>
However the same error persists. This is the exact error that I am getting from Stack Trace:
[ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed.
]
System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName) +1434271
WebMatrix.Data.DbProviderFactoryWrapper.CreateConnection(String connectionString) +64
WebMatrix.Data.<>c__DisplayClass15.<OpenConnectionStringInternal>b__14() +16
WebMatrix.Data.Database.get_Connection() +19
WebMatrix.Data.Database.EnsureConnectionOpen() +12
WebMatrix.Data.<QueryInternal>d__0.MoveNext() +71
System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source) +4231764
WebMatrix.Data.Database.QuerySingle(String commandText, Object[] args) +103
WebMatrix.WebData.SimpleMembershipProvider.CheckTableExists(Database db, String tableName) +59
WebMatrix.WebData.SimpleMembershipProvider.CreateTablesIfNeeded() +55
WebMatrix.WebData.WebSecurity.InitializeMembershipProvider(SimpleMembershipProvider sMembership, DatabaseConnectionInfo connect, String userTableName, String userIdColumn, String userNameColumn, Boolean createTables) +73
WebMatrix.WebData.WebSecurity.InitializeProviders(DatabaseConnectionInfo connect, String userTableName, String userIdColumn, String userNameColumn, Boolean autoCreateTables) +51
WebMatrix.WebData.WebSecurity.InitializeDatabaseConnection(String connectionStringName, String userTableName, String userIdColumn, String userNameColumn, Boolean autoCreateTables) +51
ASP._Page__AppStart_cshtml.Execute() in ******\wwwroot\_AppStart.cshtml:3
System.Web.WebPages.ApplicationStartPage.<ExecuteInternal>b__3() +65
System.Web.WebPages.ApplicationStartPage.<GetSafeExecuteStartPageThunk>b__a(Action action) +7
System.Web.WebPages.ApplicationStartPage.ExecuteInternal() +78
System.Web.WebPages.ApplicationStartPage.ExecuteStartPageInternal(HttpApplication application, Action`1 monitorFile, Func`2 fileExists, Func`2 createInstance, IEnumerable`1 supportedExtensions) +202
System.Web.WebPages.ApplicationStartPage.ExecuteStartPage(HttpApplication application, Action`1 monitorFile, Func`2 fileExists, Func`2 createInstance, IEnumerable`1 supportedExtensions) +41
[HttpException (0x80004005): Exception of type 'System.Web.HttpException' was thrown.]
System.Web.WebPages.ApplicationStartPage.ExecuteStartPage(HttpApplication application, Action`1 monitorFile, Func`2 fileExists, Func`2 createInstance, IEnumerable`1 supportedExtensions) +88
System.Web.WebPages.ApplicationStartPage.ExecuteStartPage(HttpApplication application) +287
System.Web.WebPages.WebPageHttpModule.StartApplication(HttpApplication application, Action`1 executeStartPage, EventHandler applicationStart) +113
System.Web.WebPages.WebPageHttpModule.StartApplication(HttpApplication application) +71
System.Web.WebPages.WebPageHttpModule.Init(HttpApplication application) +217
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +517
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +194
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +339
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +253
[HttpException (0x80004005): Exception of type 'System.Web.HttpException' was thrown.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9090876
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +256
Is there another way I can try to debug this? Am I missing anything that must be included in my web.config or _AppStart.cshtml file?
Thank You

migrate .net 2.0 app from windows server 2003/iis6 to windows server 2008 R2/iis7

I am attempting to migrate a .net 2.0 application from Windows Server 2003 to windows server 2008.
I am receiving the error - The specified module could not be found. (Exception from HRESULT: 0x8007007E)
It seems like there is a dll missing however I cannot seem to find out which one. I copied the entire application over to the new website I created in IIS7.
I also saw some posts on the net about needing the dll msvcr71.dll in the system32 and syswow64 folders so I tried that, however it didn't work.
Could there be an issue with Windows Server 2008 R2 being a 64bit OS?
Thanks for any help in advance.
More detail from the application logs:
at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) at System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() at System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) at System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) at System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir) at System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) at System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory vdir, VirtualPath virtualDir, Boolean ignoreErrors) at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) at System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
EDIT:
Here is more information about the IIS configuration:
I have a main website setup on an apppool set in classic mode - I also set it to run 32bit applications. I put just a simple test.aspx file inside that folder and it works fine. I then have a subdirectory which actually holds the application I am trying to migrate. I added another test.aspx file in there and I can navigate to it fine.
When I go to the subdirectory and make it an application directory the test.aspx file no longer works and I get the error above.
I hope this will shed more light on my issue.
I Figured out my own issue.
There is a DLL NTidy.dll in the bin folder.
This dll required the following dlls to be in the system32 folder:
msvcp71d.dll ( Microsoft C++ Runtime Library )
msvcp71.dll ( Microsoft C++ Runtime Library )
msvcr71d.dll ( Microsoft C Runtime Library )
msvcr71.dll ( Microsoft C Runtime Library )
Once I added those dlls the application began to work.
Thanks

FSharp site on shared server, which dll's do I need to include in the bin folder?

Which dll's do I need to include in the bin folder?
or do I need to install F# on the server it self ?
N.B:
Resolved
All the FSharp dlls are now in the site Bin
The site is deployed using the Publish option from Visual Studio
The allow precompiled site to be updatable has to be unchecked
Error from my site:
The system cannot find the file specified
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ComponentModel.Win32Exception: The system cannot find the file specified
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[Win32Exception (0x80004005): The system cannot find the file specified]
System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) +2097
System.Diagnostics.Process.Start() +140
Microsoft.FSharp.Compiler.CodeDom.Internal.Compiler.compileFiles(String args, CompilerResults res) +120
Microsoft.FSharp.Compiler.CodeDom.Internal.Compiler.compileAssemblyFromFileBatch(CompilerParameters options, String[] fileNames, CompilerResults results, FastFunc`2 sortf) +278
System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromFile(CompilerParameters options, String[] fileNames) +23
System.Web.Compilation.AssemblyBuilder.Compile() +843
System.Web.Compilation.BuildProvidersCompiler.PerformBuild() +164
System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +267
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +582
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +93
System.Web.UI.BaseTemplateParser.GetReferencedType(VirtualPath virtualPath, Boolean allowNoCompile) +325
System.Web.UI.PageParser.EnsureMasterPageFileFromConfigApplied() +89
System.Web.UI.PageParser.HandlePostParse() +16
System.Web.UI.TemplateParser.Parse() +155
System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType() +105
System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider) +54
System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() +182
System.Web.Compilation.BuildProvidersCompiler.PerformBuild() +29
System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +267
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +582
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +93
System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +111
System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +54
System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +31
System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +40
System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +139
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +128
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +161
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
If you 'pre-compile' the web site using the aspnet_compiler.exe tool (or using the Publish button in Visual Studio) without compiling it as "updatable" (meaning that all ASPX and FS files have to be compiled into DLLs) then I think you'll need just:
FSharp.Core.dll (contains the core F# libraries, lists, tuples, etc.)
possibly FSharp.PowerPack.dll (as Robert mentioned)
Other DLLs from the F# installation shouldn't be needed for the runtime. If you want to compile the Web application on the server (using the F# CodeDOM) (i.e. deploy it as an updatable web site), then you'll need to install F# on the server and you'll need the rights to spawn "fsc.exe" (so that doesn't look like a case for shared server).
Installing F# on the server will definitely cure your problems, but isn't strictly necessary. You will have definitely picked up a dependency on FSharp.core.dll, you may also have picked up a dependency on FSharp.PowerPack.dll if you have referenced it from your project, and well any other FSharp.*.dlls that you may have referenced. You can generally use reflector to find which dlls your application depends on.
I was able to fix the issue by unchecking the allow this precompiled site to be updatable and by having all the dlls in the directory.
Thanks for the suggestions.

Resources