singalR with windows 8 - c#

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.

Related

Error in ASP.NET Core application when using Google authentication

My application is built in .Net core 6. I have google login page in my application to authenticate. I am able to login but after sometime it getting hanged. When I checked the error logs, I found the log
RequestPath: /signin-google
'.AspNetCore.Correlation.Tqs1QKvDfDtMzN1758B177fdEvPXBxm0_NuiFaB1ySc' cookie not found.
RequestPath: /signin-google
An unhandled exception has occurred while executing the request.
Exception:
System.Exception: An error was encountered while handling the remote login.
---> System.Exception: Correlation failed.
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler`1.HandleRequestAsync()
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
I removed samesite rule from program.cs but still the error persist

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

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

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.

I tried to use WebMatrix.WebData, but keep getting this error, even after I uninstalled the package

I was trying to use the simplemembership but dont know how it works. I tried to install WebMatrix.WebData but it got messy. Now I cant get back to where I was. Any help would be appreciated.
Here is the error:
Server Error in '/' Application.
Attempt by security transparent method 'WebMatrix.WebData.PreApplicationStartCode.Start()' to access security critical method 'System.Web.WebPages.Razor.WebPageRazorHost.AddGlobalImport(System.String)' failed.
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.MethodAccessException: Attempt by security transparent method 'WebMatrix.WebData.PreApplicationStartCode.Start()' to access security critical method 'System.Web.WebPages.Razor.WebPageRazorHost.AddGlobalImport(System.String)' failed.
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:
[MethodAccessException: Attempt by security transparent method 'WebMatrix.WebData.PreApplicationStartCode.Start()' to access security critical method 'System.Web.WebPages.Razor.WebPageRazorHost.AddGlobalImport(System.String)' failed.]
WebMatrix.WebData.PreApplicationStartCode.Start() +112
[InvalidOperationException: The pre-application start initialization method Start on type WebMatrix.WebData.PreApplicationStartCode threw an exception with the following error message: Attempt by security transparent method 'WebMatrix.WebData.PreApplicationStartCode.Start()' to access security critical method 'System.Web.WebPages.Razor.WebPageRazorHost.AddGlobalImport(System.String)' failed..]
System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection`1 methods, Func`1 setHostingEnvironmentCultures) +556
System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +132
System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +102
System.Web.Compilation.BuildManager.ExecutePreAppStart() +153
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +516
[HttpException (0x80004005): The pre-application start initialization method Start on type WebMatrix.WebData.PreApplicationStartCode threw an exception with the following error message: Attempt by security transparent method 'WebMatrix.WebData.PreApplicationStartCode.Start()' to access security critical method 'System.Web.WebPages.Razor.WebPageRazorHost.AddGlobalImport(System.String)' failed..]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9885044
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34009
What version of MVC? What version of Visual Studio? Is this an old project or a fresh one.
If it's a relatively new project, it may be easier to create a new shell solution with the authentication you desire - then pull in your models, controllers and views from the old solution.
If it's a VS2013 MVC 5 project, you may be missing the
public partial class Startup
class in your root on the application.
If you create a new empty solution, you can compare what's there and what should be in yours.
HOWEVER.... you need to first read up on Simplemembership....
http://weblogs.asp.net/jgalloway/archive/2012/08/29/simplemembership-membership-providers-universal-providers-and-the-new-asp-net-4-5-web-forms-and-asp-net-mvc-4-templates.aspx
Deleting all files from bin and then rebuilding the solution worked for me

Categories

Resources