c# - Deleting Objects from any entities in WCF Data Service gives me an exception -
c# - Deleting Objects from any entities in WCF Data Service gives me an exception -
i have wcf info service has multiple entities. have problem deleting objects entity exception. service hosted cloud service in azure.
it gives me error message "401 - unauthorized: access denied due invalid credentials."
by way works while running wcf info service on local host. `
system.data.services.client.dataservicerequestexception unhandled hresult=-2146233079 message=an error occurred while processing request. source=microsoft.data.services.client stacktrace: @ system.data.services.client.saveresult.handleresponse() @ system.data.services.client.basesaveresult.endrequest() @ system.data.services.client.dataservicecontext.savechanges(savechangesoptions options) @ system.data.services.client.dataservicecontext.savechanges() @ testodataclient.program.main(string[] args) in e:\learn\my projects\visual studio projects\testodataclient\testodataclient\program.cs:line 238 @ system.appdomain._nexecuteassembly(runtimeassembly assembly, string[] args) @ system.appdomain.executeassembly(string assemblyfile, evidence assemblysecurity, string[] args) @ microsoft.visualstudio.hostingprocess.hostproc.runusersassembly() @ system.threading.threadhelper.threadstart_context(object state) @ system.threading.executioncontext.runinternal(executioncontext executioncontext, contextcallback callback, object state, boolean preservesyncctx) @ system.threading.executioncontext.run(executioncontext executioncontext, contextcallback callback, object state, boolean preservesyncctx) @ system.threading.executioncontext.run(executioncontext executioncontext, contextcallback callback, object state) @ system.threading.threadhelper.threadstart() innerexception: system.data.services.client.dataserviceclientexception hresult=-2146233079 message=<!doctype html public "-//w3c//dtd xhtml 1.0 strict//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/> <title>401 - unauthorized: access denied due invalid credentials.</title> <style type="text/css"> <!-- body{margin:0;font-size:.7em;font-family:verdana, arial, helvetica, sans-serif;background:#eeeeee;} fieldset{padding:0 15px 10px 15px;} h1{font-size:2.4em;margin:0;color:#fff;} h2{font-size:1.7em;margin:0;color:#cc0000;} h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;} #header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet ms", verdana, sans-serif;color:#fff; background-color:#555555;} #content{margin:0 0 0 2%;position:relative;} .content-container{background:#fff;width:96%;margin-top:8px;padding:10px;position:relative;} --> </style> </head> <body> <div id="header"><h1>server error</h1></div> <div id="content"> <div class="content-container"><fieldset> <h2>401 - unauthorized: access denied due invalid credentials.</h2> <h3>you not have permission view directory or page using credentials supplied.</h3> </fieldset></div> </div> </body> </html> statuscode=401 innerexception:
i found solution problem set usepostingtunneling true
http://msdn.microsoft.com/en-us/library/system.data.services.client.dataservicecontext.useposttunneling.aspx
http://social.msdn.microsoft.com/forums/en-us/ce63fde6-5547-447d-8d4d-e3699701d3e8/how-to-configure-iis-75-to-allow-inserts-and-deletes-with-wcf-data-services-put-and-delete?forum=adodotnetdataservices
c# azure wcf-data-services
Comments
Post a Comment