Click here to Skip to main content
15,893,722 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: SignalR on IIS Not Working Pin
Kevin Marois6-Jan-17 6:04
professionalKevin Marois6-Jan-17 6:04 
GeneralRe: SignalR on IIS Not Working Pin
ZurdoDev6-Jan-17 6:57
professionalZurdoDev6-Jan-17 6:57 
GeneralRe: SignalR on IIS Not Working Pin
Kevin Marois6-Jan-17 6:05
professionalKevin Marois6-Jan-17 6:05 
QuestionRe: SignalR on IIS Not Working Pin
ZurdoDev6-Jan-17 6:58
professionalZurdoDev6-Jan-17 6:58 
AnswerRe: SignalR on IIS Not Working Pin
Kevin Marois6-Jan-17 7:02
professionalKevin Marois6-Jan-17 7:02 
GeneralRe: SignalR on IIS Not Working Pin
ZurdoDev6-Jan-17 7:10
professionalZurdoDev6-Jan-17 7:10 
GeneralRe: SignalR on IIS Not Working Pin
Kevin Marois6-Jan-17 7:34
professionalKevin Marois6-Jan-17 7:34 
QuestionSignalR Error Handling Problem Pin
Kevin Marois3-Jan-17 12:00
professionalKevin Marois3-Jan-17 12:00 
I'm trying to set up error handling in my SignalR app.

This leads me to believe that when I call a method on the server that doesn't exist, I should be able to CATCH an exception for it.

I've done exactly what the example code shows, yet neither the Error event nor the try/catch ever fire:

My Connect method:
public void Connect()
{
    _connection = new HubConnection(ServerUri);
    //TODO: Turn off for production
    _connection.TraceLevel = TraceLevels.All;
    _connection.TraceWriter = Console.Out;
    _hubProxy = _connection.CreateHubProxy("DashboardHub");
    _hubProxy.On<string>("EchoMessage", EchoMessageReceived);
    _hubProxy.On<AssayDashboardInfo>("ResultsAdded", ResultsAdded);
    _hubProxy.On<AssayDashboardInfo>("ResultsChanged", ResultsChanged);
    _connection.Error += ex => Console.WriteLine("ERROR!!!!!!!!: {0}", ex.Message); // <==== NEVER FIRES
    _connection.StateChanged += _connection_StateChanged;
    try
    {
        _connection.Start();
    }
    catch (Exception e)
    {
        throw;  //<==== NEVER FIRES
    }
}

then later I do:
try
{
    // There is no method named NotARealMethod on the server
    _hubProxy.Invoke("NotARealMethod");    
}
catch (Exception e)
{
    throw e;  //<== NEVER FIRES
}

What I DO get is a bunch of text in the Console window which includes

"OnMessage({"I":"0","E"
:"'NotARealMethod' method could not be resolved. No method found with that name.
","T":" at Microsoft.AspNet.SignalR.Hubs.NullMethodDescriptor.<get_invoker>b__
6_0(IHub emptyHub, Object[] emptyParameters)\r\n at Microsoft.AspNet.SignalR.H
ubs.HubDispatcher.Incoming(IHubIncomingInvokerContext context)\r\n--- End of sta
ck trace from previous location where exception was thrown ---\r\n at System.R
untime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at Syste
m.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(T
ask task)\r\n at Microsoft.AspNet.SignalR.Hubs.HubPipelineModule"

Anyone have an ideas on what's wrong?
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.

AnswerRe: SignalR Error Handling Problem Pin
Kevin Marois3-Jan-17 12:27
professionalKevin Marois3-Jan-17 12:27 
QuestionCSS & Javascript in Accelerated Mobile Pages(AMP) Pages Pin
ali akbar.jpm1-Jan-17 19:50
ali akbar.jpm1-Jan-17 19:50 
QuestionBrowser based application without dependence on a particular browser Pin
Schatak28-Dec-16 19:38
professionalSchatak28-Dec-16 19:38 
AnswerRe: Browser based application without dependence on a particular browser Pin
Kornfeld Eliyahu Peter28-Dec-16 20:26
professionalKornfeld Eliyahu Peter28-Dec-16 20:26 
AnswerRe: Browser based application without dependence on a particular browser Pin
Afzaal Ahmad Zeeshan29-Dec-16 5:56
professionalAfzaal Ahmad Zeeshan29-Dec-16 5:56 
GeneralRe: Browser based application without dependence on a particular browser Pin
Schatak2-Jan-17 2:13
professionalSchatak2-Jan-17 2:13 
AnswerRe: Browser based application without dependence on a particular browser Pin
Afzaal Ahmad Zeeshan2-Jan-17 5:19
professionalAfzaal Ahmad Zeeshan2-Jan-17 5:19 
GeneralRe: Browser based application without dependence on a particular browser Pin
Schatak5-Jan-17 18:22
professionalSchatak5-Jan-17 18:22 
AnswerRe: Browser based application without dependence on a particular browser Pin
Nathan Minier4-Jan-17 2:03
professionalNathan Minier4-Jan-17 2:03 
QuestionMVC Basic Page With A Table Pin
Kevin Marois28-Dec-16 7:43
professionalKevin Marois28-Dec-16 7:43 
SuggestionRe: MVC Basic Page With A Table Pin
ZurdoDev28-Dec-16 8:56
professionalZurdoDev28-Dec-16 8:56 
GeneralRe: MVC Basic Page With A Table Pin
Kevin Marois28-Dec-16 11:15
professionalKevin Marois28-Dec-16 11:15 
QuestionApple Pay - WEB Integration through Braintree - how to create Certificate for the Sandbox / Development Environment? Pin
AndreeaLib27-Dec-16 1:37
AndreeaLib27-Dec-16 1:37 
QuestionWhich is the Best Laravel Admin Template with all the advanced functionalities? Pin
Rakeshroshans23-Dec-16 20:00
Rakeshroshans23-Dec-16 20:00 
QuestionBootstrap v W3.CSS Pin
xiecsuk21-Dec-16 22:56
xiecsuk21-Dec-16 22:56 
AnswerRe: Bootstrap v W3.CSS Pin
Afzaal Ahmad Zeeshan22-Dec-16 4:00
professionalAfzaal Ahmad Zeeshan22-Dec-16 4:00 
QuestionSecure a PHP Webservice Pin
Jassim Rahma21-Dec-16 1:39
Jassim Rahma21-Dec-16 1:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.