Skip to content

signalr.exe crashes if a web application references certain assemblies #2711

Closed
StasPerekrestov opened this Issue Nov 14, 2013 · 2 comments

4 participants

@StasPerekrestov

Dear Sir/Madam,

I think there is an issue in SignalR that breaks hubs registration logic.

For instance, if you reference http://www.nuget.org/packages/ABCpdf/ ,
signalr.exe will fail to generate server.js because

namespace Microsoft.AspNet.SignalR.Utils
{
 public class JavaScriptGenerator : MarshalByRefObject
        {
             public string GenerateProxy(string path, string url)
            {
               ////foreach
                Assembly.Load(AssemblyName.GetAssemblyName(assemblyPath));
                 ///
            }
        }
}

Assembly.Load crashes with BadImageFormatException

I suppose, you should ignore such assemblies.

Also, I suspect, there is a similar issue in the code that generates JS in runtime.
For instance, in my application Signalr 2 doesn't generate hub proxies when the application accesses ~/signalr/hubs
I haven't found the exact place yet.

image

@DamianEdwards
SignalR member

Thanks, we'll take a look at this

@halter73 halter73 was assigned Dec 4, 2013
@halter73 halter73 added a commit that referenced this issue Dec 4, 2013
@halter73 halter73 Report clearer error messages when duplicate Hubs are found
- This is particularly useful when trying to generate JS Hub proxies

#2711
b70ab03
@halter73 halter73 added a commit that referenced this issue Dec 4, 2013
@halter73 halter73 Report clearer error messages when duplicate Hubs are found
- This is particularly useful when trying to generate JS Hub proxies

#2711
df17edf
@halter73 halter73 added a commit that referenced this issue Dec 5, 2013
@halter73 halter73 Report clearer error messages when duplicate Hubs are found
- This is particularly useful when trying to generate JS Hub proxies
  from signar.exe

#2711
7770ce5
@halter73 halter73 added a commit that referenced this issue Dec 5, 2013
@halter73 halter73 Report clearer error messages when duplicate Hubs are found
- This is particularly useful when trying to generate JS Hub proxies
  from signar.exe

#2687
#2711
98a56d3
@halter73 halter73 added a commit that referenced this issue Dec 5, 2013
@halter73 halter73 Report clearer error messages when duplicate Hubs are found
- This is particularly useful when trying to generate JS Hub proxies
  from signar.exe

#2687
#2711
fd2dd71
@halter73 halter73 added a commit that referenced this issue Dec 5, 2013
@halter73 halter73 Report clearer error messages when duplicate Hubs are found
- This is particularly useful when trying to generate JS Hub proxies
  from signar.exe

#2687
#2711
97e818f
@gustavo-armenta

tested repro, it raises warnings and continues generating hubs for valid assemblies

2> SignalR Utility Version: 2.1.0.0
2> Creating temp directory C:\Users\gustavoa\AppData\Local\Temp\48c24491-6efa-48f7-94d9-146857aae203
2>

2>EXEC : warning : Could not load file or assembly 'ABCpdf9-32.dll' or one of its dependencies. The module was expected to contain an assembly manifest.
2>

2>

2>EXEC : warning : Could not load file or assembly 'ABCpdf9-64.dll' or one of its dependencies. The module was expected to contain an assembly manifest.
2>

2>

2>EXEC : warning : Could not load file or assembly 'PrintHook32.dll' or one of its dependencies. The module was expected to contain an assembly manifest.
2>

2>

2>EXEC : warning : Could not load file or assembly 'PrintHook64.dll' or one of its dependencies. The module was expected to contain an assembly manifest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.