Answered by:
Error found while using iis hosted wcf service

Question
-
User277211842 posted
I'm getting Error after hosting WCF service in IIS and then consuming it.Please help me.
please look at Stack Trace:
[FaultException`1: Object reference not set to an instance of an object.] System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +10618895 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +336 ServiceReference1.IService.AllCustomerDetails() +0 ServiceReference1.ServiceClient.AllCustomerDetails() in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\website1\5534c725\60dc92b3\App_WebReferences.ogjxwiqx.0.cs:216 _Default.BindUserDetails() in d:\ap\Extraction\WebSite1\Default.aspx.cs:31 _Default.Page_Load(Object sender, EventArgs e) in d:\ap\Extraction\WebSite1\Default.aspx.cs:18 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +188 System.Web.UI.Control.OnLoad(EventArgs e) +162 System.Web.UI.Control.LoadRecursive() +164 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3610
Thanks in advance!!
Friday, June 21, 2013 3:14 AM
Answers
-
User503812343 posted
Are you able to test your service libary using WCFTestClient, if yes then problem is in endpoint which is not able to access by clients.
For more details I suggest you to catch FaultContracts.
Click here to see how to handle your wcf exceptions using FaultContract
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, June 21, 2013 10:19 AM
All replies
-
User-488622176 posted
This error is thrown from the AllCustomerDetails methods. You'll need to debug, or provide NULL checks in your code...
Friday, June 21, 2013 10:03 AM -
User503812343 posted
Are you able to test your service libary using WCFTestClient, if yes then problem is in endpoint which is not able to access by clients.
For more details I suggest you to catch FaultContracts.
Click here to see how to handle your wcf exceptions using FaultContract
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, June 21, 2013 10:19 AM -
User-1678381114 posted
Is service runing perfectly form IIS without aany error ?. Did you ran it seperatly ?
http://yourdomain.com/yourservice.svc
Try to run seperatly as above.
Form you post error is occur in '
AllCustomerDetails() method
If possible can you post the code to help more on it...
Friday, June 21, 2013 4:36 PM