简体   繁体   English

ASP.NET的新手需要帮助来配置wsaspnet websockets服务器

[英]newbie to ASP.NET need help configuring wsaspnet websockets server

I'm new to ASP.NET (did some classic ASPs back in the day, but my how things have changed!) and need to get a proof-of-concept of a browser talking to a server using websockets up-and-running. 我是ASP.NET的新手(以前有一些经典的ASP,但是我的情况发生了变化!),并且需要获得浏览器与运行中使用websockets与服务器通信的概念证明。 。

I downloaded http://wsaspnet.codeplex.com/ 我下载了http://wsaspnet.codeplex.com/

I installed it in a directory called "counter" in my local IIS webroot (counter contains the folders Web, WsTestClient and the file wsaspnet.sln). 我将其安装在本地IIS webroot中的一个名为“计数器”的目录中(计数器包含Web文件夹,WsTestClient和文件wsaspnet.sln)。

I figured out that I needed to copy Global.asax from /counter/Web to / :p 我发现我需要将Global.asax从/ counter / Web复制到/:p

When I access http://localhost/counter/Web/Default.aspx I get the following error: 当我访问http://localhost/counter/Web/Default.aspx时 ,出现以下错误:

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0103: The name 'WebSocks' does not exist in the current context
Source Error:
Line 4: void Application_Start(object sender, EventArgs e)
Line 5: {
Line 6:     WebSocks.WebSockServer.Start();
Line 7: }

I realize that this is because the server can't find the code from the file /counter/Web/App_Code/WebSockServer.cs, where the namespace and object are defined. 我意识到这是因为服务器无法从文件/counter/Web/App_Code/WebSockServer.cs中找到定义了名称空间和对象的代码。

How do I tell the server where to find this code? 如何告诉服务器在哪里可以找到此代码? I'm guessing that it's a simple matter but I don't know ASP.NET well enough (read: AT ALL) to figure it out :( 我猜这很简单,但是我对ASP.NET的了解不够(阅读:一点也不了解):(

Any help would be greatly appreciated! 任何帮助将不胜感激!

我终于发现,Web文件夹中的所有内容都必须放在webroot中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM