.Net version problem

Discussion in 'ASP.NET 4.5 Beta [Closed]' started by aliarpat, Jun 29, 2012.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi;

    I'm trying code at below;

    <% @ WebHandler language="C#" class="WebSockets.WSHttpHandler" %>

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using Microsoft.Web.WebSockets;

    namespace WebSockets
    {

    public class WSHttpHandler : IHttpHandler
    {

    public void ProcessRequest(HttpContext context)
    {
    if (context.IsWebSocketRequest)
    context.AcceptWebSocketRequest(new TestWebSocketHandler());
    }

    public bool IsReusable
    {
    get
    {
    return false;
    }
    }

    }

    }

    but get error as this;

    "Compiler Error Message: CS0234: The type or namespace name 'WebSockets' does not exist in the namespace 'Microsoft.Web' (are you missing an assembly reference?)"

    and at error page it seems this account in asp.net 4.0,massage is like this

    "Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17379"

    you can test it from "http://user1434.netfx45lab.discountasp.net/ws.ashx"

    can you help with this issue?

    best regards.
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    websocket only works on iis8 as far as i know.
     
  3. Bruce is right websockets support is only available with IIS8 for now - this is confirmed by http://www.paulbatum.com/
    IIS8 will be delivered as part of Windows Server 2012 currently in RC.

    MS might decide to back port websockets to IIS7 at some point but I've seen nothing to indicate this is on the cards.

    As a side issue, the exception you're seeing here http://user1434.netfx45lab.discountasp.net/ws.ashx is actually a compilation / missing assembly exception but even if you were to fix that (probably by bin deploying the relevant assemblies), you're not going to get websockets working on II7 in the DASP .NET4.5 lab environment because you need IIS8
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page