微软上的范例:http://msdn.microsoft.com/zh-cn/library/ms243399但是在我本地运行web层的单元测试,一直报Could not connect to the Web server for page 'http://localhost:8549/'. 远程服务器返回错误: (500) 内部服务器错误。. Check that the Web server is running and visible on the network and that the page specified exists.这样的错误。我该如何配置?
请各位赐教...
请各位赐教...
解决方案 »
- 在配置节中自定义SiteMap后,SiteMapResolve事件处理程序不触发
- 打开新页面
- (狂散分200 !!!)类似于博客园,CSDN博客中C#语法高亮的实现方法大汇总!请大家过来接分!!
- 获取动态Table里的动态文本框值的问题
- formView控件的InsertItemTemplate插入文章时候的问题
- 一个关于日历的简单问题
- DataGrid绑定时怎么处理日期时间字段为空的问题
- DataGrid高级应用,请思归大侠和孟子来看看
- .net读取数据库中blob类型的二进制数据来显示问题
- 请问sql server中将工a表的数据插入b表中,很多数据时如何判断已完成。
- frameset菜菜问题,求解
- window.opener的一个疑问?
///
///</summary>
// TODO: Ensure that the UrlToTest attribute specifies a URL to an ASP.NET page (for example,
// http://.../Default.aspx). This is necessary for the unit test to be executed on the web server,
// whether you are testing a page, web service, or a WCF service.
[TestMethod()]
[HostType("ASP.NET")]
[AspNetDevelopmentServerHost("D:\\...\\..._CODE\\...\\PresentationLayer\\....Presentation.Web", "/")]
[UrlToTest("http://localhost:8549/")]
[DeploymentItem("Lrs.Presentation.Web.dll")]
public void InsertCodeExtensionInfoTest()
{
//Arrange
CodeList_Accessor target = new CodeList_Accessor(); // TODO: Initialize to an appropriate value //Act
int expected = 1;
int actual = 1;
try
{
target.InsertCodeExtensionInfo();
}
catch
{
actual = 0;
} //Assert
Assert.AreEqual(expected, actual);
}你好,以上是我web层的一个测试代码。运行这个单元测试项,就会报我最先发的那个错...我要测试web层中的所有方法,包括事件等...可能我的方法不对,如您有好的建议,请不吝赐教...