Which dll's do I need to include in the bin folder? or do I need to install F# on the server it self ?
NB: Resolved
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
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.
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:
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) (ie 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).
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.