2

I'm trying to implement comet in my ASP.Net MVC 2.0 project. I'm using WebSync from FrozenMountain. My website is coded in C# 4.0 and ASP.Net 4.0.

The comet code is triggering my MVC controller function with the [HttpPost] attribute (even though the page doesn't refresh or appear to post). Is there a way to determine what is being posted and ignore that route in my global.asax.cs?

  • Please note, I know how to ignore routes with MVC, that is not the issue.
Chris Klepeis
  • 9,783
  • 16
  • 83
  • 149
  • can you post some sample code? – Anton Jul 14 '10 at 00:06
  • Does WebSync really require log4net? I'd like to explore using WebSync but I'm turned off by the apparent dependency. It's not listed as a requirement, but it is included in the download and the tutorial mentions it. – Jason Kleban Feb 26 '11 at 22:57
  • @uosef - I'd recommend contacting Jared at Frozen Mountain. He was very helpful with providing us with technical details. – Chris Klepeis Feb 28 '11 at 01:16

2 Answers2

3

The gentlemen at Frozen Mountain helped me solve the problem here

It was hitting one of my MVC controller functions. I had to add this to my global.asax.cs

routes.IgnoreRoute("{*allashx}", new {allashx=@".*\.ashx(/.*)?"}); 
Chris Klepeis
  • 9,783
  • 16
  • 83
  • 149
  • For future reference, our docs now include this detail: http://docs.frozenmountain.com/#class=server-troubleshooting-asp.net-mvc – Jerod Venema Apr 08 '11 at 19:55
1

In WebSync 4, you can skip the .ashx handler altogether and just add a route for WebSync directly in Global.asax:

WebSyncServer.AddRoute("...");
Anton
  • 4,554
  • 2
  • 37
  • 60