我已经在Stackoverflow上看了很多关于ServiceStack的问题并且实际上用完了选项.花了很多时间并尝试了很多选项,但无法在IIS中运行我的ServiceStack服务.
我在默认网站名下有一个虚拟目录,api指向它的物理位置是ServiceStack程序集的bin目录.
只是为了测试我已经index.htm在bin文件夹中放了一个.当我导航到时localhost/api,我从bin文件夹中获取index.htm的内容.
但是,正如您在下面的代码中看到的那样,我的客户端调用ServiceStack服务会JSONServiceClient导致404异常.我不确定我错过了什么.
非常感谢提前.
using System.Configuration;
using ServiceStack.OrmLite;
using ServiceStack.OrmLite.SqlServer;
// logging
using ServiceStack.Logging;
// Service Interface project
public class xxxService : Service
{
public List<xxxResponse> Get(xxxQuery xxxQuery)
}
[Route("/xxxFeature/{xxxSerialNo}/{xxxVersion}")]
public class xxxQuery : IReturn<List<xxxResponse>>
{
public string xxxSerialNo { get; set; }
public string xxxVersion { get; set; }
public string xxxId { get; set; }
public string xxxName { get; set; }
}
public class xxxResponse …Run Code Online (Sandbox Code Playgroud)