uritemplate

    0熱度

    2回答

    如何更新一個WCF REST服務UriTemplate是www.mysite.com/...而不是系統名稱http://mysystem/ ... 當我去到服務幫助頁面我看到系統名稱,我不希望最終用戶看到。 http://myServerName.local/WCF/Svc.svc/blah/function 我想看看 http://www.mysite.com/WCF/Svc.svc/blah/

    44熱度

    5回答

    我正在WCF 4.0中開發一些RESTful服務。我有一個方法如下: [OperationContract] [WebGet(UriTemplate = "Test?format=XML&records={records}", ResponseFormat=WebMessageFormat.Xml)] public string TestXml(string records)

    2熱度

    1回答

    我試圖在.NET 3.5中設計一個REST服務與WCF REST Contrib。我的服務幾乎可以正常工作,但我面臨着一個奇怪的錯誤。 基本上,我有兩種方法: [WebInvoke(UriTemplate = "/books?id={identity}", Method = "PUT")] public string InsertBook(string identity, Book book)

    3熱度

    1回答

    這是場景,我有一個WCF服務調用,它接受一個字符串參數,並且該字符串在其中有斜線(例如「123/456。 XML「)。我想設置一個像這樣的「/ {file}」的UriTemplate,以便我可以訪問http://www.example.com/File.svc/123/456.xml而不是http://www.example.com/File.svc/GetFile?file=123/456.xm

    0熱度

    1回答

    我有一個web服務來訪問網絡上的一些資源。該服務有一種方法來查找資源並返回資源的路徑。另一種方法,發送請求到這個路徑的web服務。 我嘗試將整個UNC路徑(使用HttpServerUtlility.UrlTokenEncode方法編碼)傳遞給web服務。生成的URI非常長(331個字符),我得到「HTTP 400錯誤請求」。 如何處理如此長的URI?如果我的URI縮短了大約10個字符,那麼請求就會