在C#中创建基于服务器的Web应用程序 [英] Creating a server based web application in C#

查看:269
本文介绍了在C#中创建基于服务器的Web应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问候全部.
我是一位经验丰富的开发人员,但对我来说是一个新的领域,即Web开发.我想创建一个浏览器可以访问但在服务器上运行的应用程序,访问服务器上的文件,然后将结果返回给浏览器.我已经尝试过使用VS2010 Express和WPF模板.该应用程序可以在调试器中正常运行,或者如果我通过单击publish.htm文件直接在服务器上启动该应用程序.当我尝试从远程Web浏览器访问该应用程序时,出现信任错误.我发现,如果进入远程浏览器的"Internet选项"安全选项卡,然后转到本地Intranet区域,然后单击站点"按钮,然后单击高级",就可以将Web视线添加到该区域.然后,该应用程序打开,但是访问本地计算机而不是服务器上的文件.我想这是错误的做法.我想创建一个客户端服务器应用程序,其中客户端界面是一个网页.由于这是一个自学的养生者,因此我正在寻找使用最佳工具的困境.关于如何设计此应用程序的任何建议将非常有帮助.我应该使用其他模板,而不是vs2010吗?我已经阅读了有关Silverlight的参考资料,那是什么,它与我要执行的操作有关吗?您提供的任何帮助将不胜感激.

谢谢,Dave

Greetings All.
I am an experienced developer but am moving into a new area for me, web development. I want to create an application which is accessed by a browser but runs on the server, accessing files on the server, and returning the results to the browser. I have made one attempt using VS2010 Express and the WPF template. The app works fine in the debugger, or if I start it directly on the server by clicking on the publish.htm file. When I attempt to access the application from a remote web browser I get trust errors. I found that if I go into the remote browser''s internet options security tab and go to the local intranet zone and click the sites button then advanced I can add the web sight to the zone. The application then opens but accesses file on the local machine not the server. I think I am going about this the wrong way. What I would like to create is a client server application where the client interface is a web page. Since this is a teach myself endevor I am floundering with the best choice of tools to use. Any suggestions on how to design this application would be very helpful. Should I use a different template, not use vs2010? I have read references to silverlight, what is that and is it relevant to what I am trying to do? Any help you can provide will be greatly appreciated.

Thanks, Dave

推荐答案

解决这个问题的一种方法是使用Microsoft的一些最新资料-ASP.NET Web API [ ^ ].由于这是供您自己使用的,并且我认为您想尝试学习一些新知识,因此我认为这可能是合宜的.
在服务器端,您可以在IIS中托管您的API,也可以是自托管的(
One way you could go about this is by using some of the very latest stuff from Microsoft - ASP.NET Web API[^]. Since this is for your own use and I assume you would like to try to learn something new, I think that might fit the bill.
On the server side, you can host your API in IIS, or it can be self-hosted (sample[^]).
You have not mentioned what your target clients are, but this kind of interface makes it easier to build client apps for all kind of devices.

Soren Madsen


Hello Dave,

请通过下面给出的链接,它具有使用VS2010创建Web应用程序的简单方法.

http://vishaljoshi.blogspot.com/2009/05/creation-simple-net-40-web-app-using.html [ http://msdn.microsoft.com/en-us/library/dd394698.aspx [ ^ ]
Hello Dave,

Please go through the link given below, it has simple way of creating a web application with VS2010.

http://vishaljoshi.blogspot.com/2009/05/creating-simple-net-40-web-app-using.html[^]

For deployment of your application on the server, here is an explanation from Microsoft with various ways of deployment. http://msdn.microsoft.com/en-us/library/dd394698.aspx[^]


您可以看看 visualwebgui


这篇关于在C#中创建基于服务器的Web应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆