[HttpPost]
public void Index(HttpPostedFileBase file)
{
WebImage img = new WebImage(file.InputStream);
if (img.Width > 1000)
img.Resize(1000, 1000);
img.Save("path");
}
Above is the code i wrote on WCF service and deployed on server. The first time when I tried to call I got http.web.helpers.dll missing error i added it in bin...2nd time i got system.web.webPages.dll missing exception again i added it .. 3rd time i got
The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly.
The first 1024 bytes of the response were:
<!DOCTYPE html>
<html>
<head>
<title>Runtime Error</title>
<meta name="viewport" content="width=device-width"/>
<style>
body {font-family:"Verdana";font-weight:normal;font-size:.7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Consolas","Lucida Console",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold;color:navy; cursor:hand; }
@media screen and (max-width: 639px) {
pre { width: 440px; o'.}`
Below is my web.config
file details and configuration of service. Please check what I did wrong. I have even increased the timeout , message limit still getting the same issue..even locally its working fine .. no error I'm getting.
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_Iabcd" receiveTimeout="00:30:00"
sendTimeout="00:30:00" maxBufferPoolSize="2147483647" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true"/>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://abcd/abcd.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_Iabcd"
contract="abcd.Iabcd" name="BasicHttpBinding_Iabcd" />
</client>
Can any one please help me to fix it. I have updated my question and added the web.config
file