Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/wcf/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net WCF&;休息及;肥皂_Asp.net_Wcf_Azure - Fatal编程技术网

Asp.net WCF&;休息及;肥皂

Asp.net WCF&;休息及;肥皂,asp.net,wcf,azure,Asp.net,Wcf,Azure,我有一些ASMXWeb服务,它们接受字符串参数并返回json字符串。它们看起来像这样: WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.Web.Script.Services.ScriptService] public class MyService : System.Web.Services.WebServic

我有一些ASMXWeb服务,它们接受字符串参数并返回json字符串。它们看起来像这样:

WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.Web.Script.Services.ScriptService]
public class MyService : System.Web.Services.WebService
{
     [WebMethod(EnableSession = true)]
     public string MyWebMethod1(string TheParameter1)
     {
           TheClassThatDoesTheWork MyClass = new  TheClassThatDoesTheWork();
           return MyClass.DoTheWork1(TheParameter);
     }

     [WebMethod(EnableSession = true)]
     public string MyWebMethod2(string TheParameter2)
     {
           TheClassThatDoesTheWork MyClass = new  TheClassThatDoesTheWork();
           return MyClass.DoTheWork2(TheParameter);
     }
}
目前,他们在HTTP中处理IIS。我想在Azure中移动该应用程序,并将WCF用于web服务,并使其在HTTPS中工作。 最好的方法是什么


谢谢。

WCF服务返回JSON的最佳方法是使用webhttpbinding,请参阅:


要保护它,请通过HTTPS/SSL运行它。

WCF服务返回JSON的最佳方法是使用webhttpbinding,请参阅:


要保护它,请通过HTTPS/SSL运行它。

我是否有权访问WCF中的HTTPContext.Current.Session?您将使用内置的WCF每次会话功能进行此操作。好的,用户是否可以在IIS(或Azure)上登录应用程序,并以某种方式在WCF中访问会话?“我的应用”中的用户将使用表单身份验证登录,然后对WCF服务进行ajax调用。您需要在WCF服务中启用ASP.NET兼容性。您需要相关的服务属性和配置设置。此处的更多详细信息我是否有权访问WCF中的HTTPContext.Current.Session?您将使用内置的WCF每次会话功能进行此操作。确定,用户是否可以在IIS(或Azure)上登录应用程序,并且该会话是否也可以在WCF中访问?“我的应用”中的用户将使用表单身份验证登录,然后对WCF服务进行ajax调用。您需要在WCF服务中启用ASP.NET兼容性。您需要相关的服务属性和配置设置。这里有更多细节