1. sayfa
DH forumlarında vakit geçirmekten keyif alıyor gibisin ancak giriş yapmadığını görüyoruz. Üye olduğunda özel mesaj gönderebilir, beğendiğin konuları favorilerine ekleyip takibe alabilir ve daha önce gezdiğin konulara hızlıca erişebilirsin.
olarak uri,method,type ve param değişkenlerine ulaşıyorum fakat
public static string SendRequest(string uri, string method, string type, string param)
statik olarak tanımladığımda
[WebMethod]
public static string SendRequest(string uri, string method, string type, string param)
{
string procName = "CCGENEL_SP";
string lstParams = "\"lstParams\": [{\"ParamName\":\"BEGINDATE\",\"ParamVal\":\"28.03.2014\",\"ParamType\":\"0\"},{\"ParamName\":\"ENDDATE\",\"ParamVal\":\"28.03.2014\",\"ParamType\":\"0\"}]";
string AllParams = "{\"procName\":\"" + procName + "\"," + lstParams + ",\"cacheTime\":\"0\"}";
string Result = SendRequest("http://oraclewcf.atlasyazilim.com.tr/test/Service1Json.svc/getReportJSON", "POST", "application/json", AllParams);
ASCIIEncoding encoding = new ASCIIEncoding();
byte[] byte1 = Encoding.UTF8.GetBytes(param);
HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(uri + "?" + param);
req.Method = method;
req.Headers.Add("company", "ATLAS");
req.Headers.Add("userName", "aDmin");
req.Headers.Add("password", "*****");
req.ContentType = type;
req.ContentLength = byte1.Length;
System.IO.Stream newStream = req.GetRequestStream();
newStream.Write(byte1, 0, byte1.Length);
System.Net.WebResponse resp = req.GetResponse();
System.IO.StreamReader sr = new System.IO.StreamReader(resp.GetResponseStream(), Encoding.UTF8);
return sr.ReadToEnd().Trim();
}
değişken dönmüyor boş sayfa çıkıyor sebebi ne olabilir
config dosyasına
<configuration>
<system.web>
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>
</system.web>
</configuration>
kodunuda ekledim farklı bir işlem yapmam gerekiyormu?
DH forumlarında vakit geçirmekten keyif alıyor gibisin ancak giriş yapmadığını görüyoruz.
Üye Ol Şimdi DeğilÜye olduğunda özel mesaj gönderebilir, beğendiğin konuları favorilerine ekleyip takibe alabilir ve daha önce gezdiğin konulara hızlıca erişebilirsin.