unable to run react.net in 64-bit mode on iis - c#

I have followed http://reactjs.net/getting-started/tutorial.html to get started with ReactJS.
The first step works fine running in IISExpress. However running the same example in "real" IIS does not work. I Get the following error:
Server Error in '/' Application.
Unable to resolve type: React.Web.IJsxHandler
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: React.TinyIoC.TinyIoCResolutionException: Unable
to resolve type: React.Web.IJsxHandler
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: [TinyIoCResolutionException: Unable to resolve type: React.Web.IJsxHandler]
React.TinyIoC.TinyIoCContainer.ResolveInternal(TypeRegistration
registration, NamedParameterOverloads parameters, ResolveOptions
options) +1165 React.TinyIoC.TinyIoCContainer.Resolve() +163
React.Web.JsxHandlerFactory.ProcessRequest(HttpContext context) +52
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+913 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +165
If I set the "Enable 32-bit applications" setting to true in the application pool, the solution starts to work.
Based on this, I guess the problem is related to instantiating the 64-bit react dll (or v8 component).
I have tried installing the x64 run time components (both 2012 and 2013) to no avail.

Related

Blazor linking error: Value cannot be null. (Parameter 'input')

I have spent some weeks to create a prototype for my customer using the Blazor Webassembly hosting model. It has worked far above my expectations. Until now. Time for first deployment to real environment on Azure. I have configured PublishTrimmed=true in client and server project files. Is that needed in both projects?
Unfortunately the publish failed on the linking giving me these two errors:
"Optimizing assemblies for size failed. Optimization can be disabled by setting the PublishTrimmed property to false."
"IL Linker has encountered an unexpected error. Please report the issue at https://github.com/mono/linker/issues"
In the dialog I am referred to a tmp file having this content:
"System.AggregateException: One or more errors occurred. ---> Microsoft.WebTools.Shared.Exceptions.WebToolsException: Build failed. Check the Output window for more details.
--- End of inner exception stack trace ---
---> (Inner Exception #0) Microsoft.WebTools.Shared.Exceptions.WebToolsException: Build failed. Check the Output window for more details.<---
Microsoft.WebTools.Shared.Exceptions.WebToolsException: Build failed. Check the Output window for more details."
The output window includes this section:
Fatal error in IL Linker
Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'input')
at System.Text.RegularExpressions.ThrowHelper.ThrowArgumentNullException(ExceptionArgument arg)
at System.Text.RegularExpressions.Regex.Matches(String input)
at Mono.Linker.Steps.MarkStep.MarkTypeWithDebuggerDisplayAttribute(TypeDefinition type, CustomAttribute attribute)
at Mono.Linker.Steps.MarkStep.MarkTypeSpecialCustomAttributes(TypeDefinition type)
at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference, DependencyInfo reason, IMemberDefinition sourceLocationMember)
at Mono.Linker.Steps.MarkStep.MarkField(FieldDefinition field, DependencyInfo& reason)
at Mono.Linker.Steps.MarkStep.MarkEntireTypeInternal(TypeDefinition type, Boolean includeBaseTypes, DependencyInfo& reason, IMemberDefinition sourceLocationMember, HashSet1 typesAlreadyVisited) at Mono.Linker.Steps.MarkStep.MarkEntireTypeInternal(TypeDefinition type, Boolean includeBaseTypes, DependencyInfo& reason, IMemberDefinition sourceLocationMember, HashSet1 typesAlreadyVisited)
at Mono.Linker.Steps.MarkStep.MarkEntireAssembly(AssemblyDefinition assembly)
at Mono.Linker.Steps.MarkStep.InitializeAssembly(AssemblyDefinition assembly)
at Mono.Linker.Steps.MarkStep.Initialize()
at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
at Mono.Linker.Pipeline.Process(LinkContext context)
at Mono.Linker.Driver.Run(ILogger customLogger)
at Mono.Linker.Driver.Main(String[] args)
What can I do? I have really recommended Blazor to my colleagues. I would be ashamed to tell them we need to skip the trimming and publish an application that will give the customers a download size of 9 MB!!!!
Is the trimming just an empty promise or does it actually work in real applications? Can I do something to detect the crucial problem? The error hints are not really helpful. I don't mind reporting an issue, but I have no meaningful details to include in the report.

Self hosting web application using Hostable Web Core

Am trying to host a web application (aspx web form) using hostable web core feature.
Using this when i tried to load the aspx page, am getting error
error details :
responce : 502
The connection to 'localhost' failed. Error: ConnectionRefused
(0x274d). System.Net.Sockets.SocketException No connection could be
made because the target machine actively refused it 127.0.0.1:8080
Then i changed the CodeBehind attribute to CodeFile , after that am getting this error :
Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not
set to an instance of an object.
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:
[NullReferenceException: Object reference not set to an instance of an
object.]
System.Web.HttpResponse.ApplyRedirectQueryStringIfRequired(String url)
+144 System.Web.HttpResponse.Redirect(String url, Boolean endResponse) +546
System.Web.Security.FormsAuthenticationModule.OnLeave(Object source,
EventArgs eventArgs) +1730
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+412 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +229
In the same application am having a test page in html format. When i tried to access that page, it's rendering properly.
Here am adding my configuration file also
AppHostAspNet.config
After some code changes and some configuration changes now it's working.
Here am attaching the working sample. Sample
In Program.cs change the code physical path
WebServer server = new WebServer( #"C:\project_path", port, siteId );

No service for type 'Microsoft.Framework.Runtime.ILibraryManager' has been registered

I'm currently doing a project on the new version of ASP.NET. I'm getting this really annoying error when I run a new empty ASP.NET project. There's nothing else in the project than the generated code... I tried changing the CLR's, but nothing helps.
I'm getting this error:
Server Error in '/' Application.
No service for type 'Microsoft.Framework.Runtime.ILibraryManager' has
been registered.
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.InvalidOperationException: No service for
type 'Microsoft.Framework.Runtime.ILibraryManager' has been
registered.
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:
[InvalidOperationException: No service for type
'Microsoft.Framework.Runtime.ILibraryManager' has been registered.]
System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags
hostingFlags, PolicyLevel policyLevel, Exception
appDomainCreationException) +303
[HttpException (0x80004005): No service for type
'Microsoft.Framework.Runtime.ILibraryManager' has been registered.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9940016
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)
+101 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest
wr, HttpContext context) +261
---------------------------------------------------------------------- I'm running the 1.0.0beta5 clr x64 on windows 8.1.
Does someone know how to solve this error?
When I google for 'Microsoft.Framework.Runtime.ILibraryManager' I find several issues in github mentioning that error. It sounds like it happens when you have mismatched packages, ie if you still have some beta4 packages listed in project.json

Could not load file or assembly [System.EnterpriseServices.Wrapper.dll]

I'm using Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.276; Windows 2k3.
After reset IIS some days. This error occurs again.
I did not find a complete solution for below error:
Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL))
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.NotImplementedException: Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL))
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:
[NotImplementedException: Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL))]
[FileLoadException: Could not load file or assembly 'System.EnterpriseServices.Wrapper.dll' or one of its dependencies. Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL))]
System.Lazy`1.get_Value() +9587987
Microsoft.Owin.Host.SystemWeb.OwinHttpModule.Init(HttpApplication context) +43
System.Web.HttpApplication.InitModulesCommon() +172
System.Web.HttpApplication.InitModules() +43
System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +828
System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +304
System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +107
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +327
Please let me know a complete solution.
Thank you.
while running the project from visual studio force the platform target as 32 bit using following steps:
->Right click on Project
->Select Properties
->Goto Build Options
->Change "Platform Target" from "ANY CPU" to "X86"
now run the Project.

singalR with windows 8

Has anyone gotten signalR to run on Windows 8 or Server 2012? When I browse to the signalr url I recieve the following error:
Protocol error: Unknown transport.
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.InvalidOperationException: Protocol error: Unknown transport.
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:
[InvalidOperationException: Protocol error: Unknown transport.]
SignalR.PersistentConnection.ProcessRequestAsync(HostContext context) +1052
SignalR.Hosting.AspNet.AspNetHandler.ProcessRequestAsync(HttpContextBase context) +746
SignalR.Hosting.AspNet.HttpTaskAsyncHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +97
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +12551795
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929
SignalR works fine on Windows 8 and Server 2012, your problem does not seem to be specific to the OS.

Categories

Resources