Symptoms
Smartforms was installed on another ENV and the designer cannot start in either Chrome or IE.
Below is the error.
On IE Browser:
Server Error in '/Designer' Application.
--------------------------------------------------------------------------------
Could not load file or assembly 'K2Licensing' or one of its dependencies. An attempt was made to load a program with an incorrect format.
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.BadImageFormatException: Could not load file or assembly 'K2Licensing' or one of its dependencies. An attempt was made to load a program with an incorrect format.
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.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'K2Licensing' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value HKLMSoftwareMicrosoftFusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value HKLMSoftwareMicrosoftFusion!EnableLog].
Stack Trace:
>BadImageFormatException: Could not load file or assembly 'K2Licensing' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMarkandamp stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMarkandamp stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +34
System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMarkandamp stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +152
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMarkandamp stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +77
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMarkandamp stackMark, Boolean forIntrospection) +16
System.Reflection.Assembly.Load(String assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +38
>ConfigurationErrorsException: Could not load file or assembly 'K2Licensing' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +736
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +217
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +130
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +170
System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +91
System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Booleanandamp isRefAssemblyLoaded) +284
System.Web.Compilation.BuildManager.ExecutePreAppStart() +153
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +521
>HttpException (0x80004005): Could not load file or assembly 'K2Licensing' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9955652
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
On Chrome:
Server Error in '/Designer' Application.
Runtime Error
Description: An exception occurred while processing your request. Additionally, another exception occurred while executing the custom error page for the first exception. The request has been terminated.
Diagnoses
The appPool that is associated to the smartforms web sites is running as a 32-bit app instead of a 64 bit app.
Resolution
- Open IIS where the K2 smartforms designer site is hosted.
- Right-click the appPool that is running the designer site, and select "Advanced Settings" from the context menu.
- Under the "General" section, make sure that "Enable 32-bit Applications" is set to "False".
- Perform an IISReset and try again. (You might need to do this for the appPool running the runtime site as well.)
It is possible to only install the Runtime site in the production environment. The configuration is up to your design and architecture, but we recommend to have both, designer and runtime. It makes it easier for the administration.
The next link explains a little bit more about Design Time Vs Runtime Sites:
http://help.k2.com/onlinehelp/K2smartforms/ICG/4.6.9/default.htm#Design_Time_versus_Runtime_Sites.html
If you do not have a the designer site then you should note and give the path form name to your users, there is no way to manage the forms without the designer in a graphic way. You may want to use the Context browser from K2 Studio and see the forms from the SmartForms Server, but that's it.
You should be able to browse the Forms Runtime URL, here are some examples of how you can input the form:
Forms support the following:
(Test Form is the name of the form)
1.Vanity URL: http://dlx/SmartForms/Runtime/Form/test+form/
2.By ID: http://dlx/SmartForms/Runtime/Form.aspx?id=b73caa60-ea6c-4948-a77e-18e05987a2ff
3.By name: http://dlx/SmartForms/Runtime/Form.aspx?name=test form