I'm sure the answers are out there, but the question was on where to start, and your answer didn't give me enough to start.
Also, when I create a Hub class, VS gives me a pop-up saying that this kind of item is usually placed in the App_Code folder. Did you place your items in the App_Code folder?
I managed to get the SignalR chat client tutorial to run in an ASP.NET Web Form.
I had to place the Hub item in the App_Code area, and I had to replace:
$.connection.hub.start().done(function () {
// Your code here.
});
with:
$.connection.hub.start();
// Your code here
I don't know why the done function didn't get called, but moving the code that was inside of done() to after start() worked just fine for me. I was pretty much just able to dump the webpage code from the tutorial into the web form. I still had to call RouteTable.Routes.MapHubs()
inside of Global.asax. But, I didn't have to do anything with MyConnections or setting things to without 'async'.
For those of you wondering why I'm not providing a link to the specific tutorial that I talked about, that's because after nearly a week of looking at SignalR, that is the one and only tutorial that I have found.
The call to start() is asynchronous, so while it might work fine some of the time, you may find your application will try to use the connection before it's initialized, which would produce some errors that would be difficult to track down.
Can you compare your initialization code to those in the tutorial, or perhaps throw in some debug code to find out why your done() routine isn't getting called?
I'm fairly new to web programing. So, I don't really how what kind of code to throw in, to find out why the done() routine isn't getting called. I only know it didn't get called is because I inserted some jquery to add a bit of text in the page before the
routine call and during the very start of the routine call. The text that was supposed to be inserted when the routine started never got inserted, which explained why the buttons never did anything when clicked.
BorisFR
0 Points
3 Posts
Where to start for ASP.NET Web Forms ?
Jan 26, 2013 11:46 AM|LINK
Hello.
It seems to me that wiki and tutorial are not for me using web forms asp.net. How can I start ?
Boris
Careed
All-Star
18764 Points
3637 Posts
Re: Where to start for ASP.NET Web Forms ?
Jan 26, 2013 11:52 AM|LINK
Have you looked here: http://www.asp.net/web-forms
"The oxen are slow, but the earth is patient."
BorisFR
0 Points
3 Posts
Re: Where to start for ASP.NET Web Forms ?
Jan 26, 2013 11:58 AM|LINK
I see nothing for SignalR on this page. ???
BorisFR
0 Points
3 Posts
Re: Where to start for ASP.NET Web Forms ?
Jan 26, 2013 12:21 PM|LINK
Here is how I succeed to test SignalR with asp.net web forms. In global.asax, I add
then adding in Application_Start
RouteTable.Routes.MapConnection<MyConnection>("echo", "/echo"); RouteTable.Routes.MapHubs();in the class MyConnection.cs, I'm using
(note without 'async') and then it is ok.
fct
Member
6 Points
3 Posts
Re: Where to start for ASP.NET Web Forms ?
Mar 27, 2013 11:37 PM|LINK
This answer seems a bit thin to me. Could you add a bit more detail.
For instance, why did you call:
RouteTable.Routes.MapConnection<MyConnection>("echo", "/echo");What do you mean by:
"in the class MyConnection.cs, I'm using
(note without 'async') and then it is ok."
I'm sure the answers are out there, but the question was on where to start, and your answer didn't give me enough to start.
Also, when I create a Hub class, VS gives me a pop-up saying that this kind of item is usually placed in the App_Code folder. Did you place your items in the App_Code folder?
Careed
All-Star
18764 Points
3637 Posts
Re: Where to start for ASP.NET Web Forms ?
Mar 28, 2013 12:02 PM|LINK
Your question mentioned nothing about SignalR. I answered the question that you asked.
For SignalR, try here:
http://signalr.net/
"The oxen are slow, but the earth is patient."
fct
Member
6 Points
3 Posts
Re: Where to start for ASP.NET Web Forms ?
Mar 29, 2013 06:41 PM|LINK
I managed to get the SignalR chat client tutorial to run in an ASP.NET Web Form.
I had to place the Hub item in the App_Code area, and I had to replace:
$.connection.hub.start().done(function () { // Your code here. });with:
I don't know why the done function didn't get called, but moving the code that was inside of done() to after start() worked just fine for me. I was pretty much just able to dump the webpage code from the tutorial into the web form. I still had to call RouteTable.Routes.MapHubs() inside of Global.asax. But, I didn't have to do anything with MyConnections or setting things to without 'async'.
For those of you wondering why I'm not providing a link to the specific tutorial that I talked about, that's because after nearly a week of looking at SignalR, that is the one and only tutorial that I have found.
pfletcher
Member
15 Points
7 Posts
Re: Where to start for ASP.NET Web Forms ?
Apr 01, 2013 06:06 PM|LINK
The call to start() is asynchronous, so while it might work fine some of the time, you may find your application will try to use the connection before it's initialized, which would produce some errors that would be difficult to track down.
Can you compare your initialization code to those in the tutorial, or perhaps throw in some debug code to find out why your done() routine isn't getting called?
fct
Member
6 Points
3 Posts
Re: Where to start for ASP.NET Web Forms ?
Apr 01, 2013 06:51 PM|LINK
I'm fairly new to web programing. So, I don't really how what kind of code to throw in, to find out why the done() routine isn't getting called. I only know it didn't get called is because I inserted some jquery to add a bit of text in the page before the routine call and during the very start of the routine call. The text that was supposed to be inserted when the routine started never got inserted, which explained why the buttons never did anything when clicked.