小编use*_*400的帖子

IIS中的ServiceStack部署(404例外)

我已经在Stackoverflow上看了很多关于ServiceStack的问题并且实际上用完了选项.花了很多时间并尝试了很多选项,但无法在IIS中运行我的ServiceStack服务.

我在默认网站名下有一个虚拟目录,api指向它的物理位置是ServiceStack程序集的bin目录.

只是为了测试我已经index.htm在bin文件夹中放了一个.当我导航到时localhost/api,我从bin文件夹中获取index.htm的内容.

但是,正如您在下面的代码中看到的那样,我的客户端调用ServiceStack服务会JSONServiceClient导致404异常.我不确定我错过了什么.

非常感谢提前.

  • 服务堆栈版本:3.9.69.0
  • IIS 8.0版

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)

.net c# asp.net iis servicestack

6
推荐指数
1
解决办法
1342
查看次数

标签 统计

.net ×1

asp.net ×1

c# ×1

iis ×1

servicestack ×1