我如何编程方式使用C#运行ASP.Net开发服务器? [英] How can I programmatically run the ASP.Net Development Server using C#?

查看:127
本文介绍了我如何编程方式使用C#运行ASP.Net开发服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有ASP.NET Web页面,我想建立自动化测试(使用华廷和放大器; MbUnit的)。如何从我的code启动ASP.Net开发服务器?我不想使用IIS。

I have ASP.NET web pages for which I want to build automated tests (using WatiN & MBUnit). How do I start the ASP.Net Development Server from my code? I do not want to use IIS.

推荐答案

据我所知,你能火起来从命令提示符开发服务器具有以下路径/语法:

From what I know, you can fire up the dev server from the command prompt with the following path/syntax:

C:\Windows\Microsoft.NET\Framework\v2.0.50727\Webdev.WebServer.exe /port:[PORT NUMBER] /path: [PATH TO ROOT]

...所以我可以想像,你可以很容易地使用的Process.Start()来启动你通过一些code所需要的资料。

...so I could imagine you could easily use Process.Start() to launch the particulars you need through some code.

当然你要调整该版本号无论是最新的/期望你。

Naturally you'll want to adjust that version number to whatever is most recent/desired for you.

这篇关于我如何编程方式使用C#运行ASP.Net开发服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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