I am new for WCF. I have created a simple wcf service. This service simply fetches data from my another application and returns in the form of dataset. In the same solution I have created a web application as a client to access this wcf service. Now in the
client application I have added a service reference from the solution itselrf and the service runs very well. it returns the data perfectly.
Now the problem occures when I have hosted the service in IIS (IIS 7). Now I have removed the existing service reference (which was from the same solution) and then added a new reference from the hosted service. Now when I run the client web application,
my client did not give any error / exception but did not fetch any data from the service. I am not sure why the service did not return any data after hosting in IIS.
In my client application i have this simple code only.
If you mean host the service in IIS, the simply way is creating a service with WCF Service Application template in Visual Studio, then create a client app to consume the service by "Add Service Reference".
If you mean publish the service to IIS and consume the service from a client, you can refer the steps in a MSDN document below to publish the service.
I have not considered it yet, but when I have tried with a simple method which returns true / false, I can call this method successfully and it returns the correct data as specified in the service.
Now the question remains that what happens to the dataset, which I am trying to return from the prior method?
Any clue guys?
Regards,
Girish
Thanks & Regards
Girish Nehte
If This post helps you to solve your problem please mark this as an answer.
Hey guys I have got the answer that why my service was not returning data as in the method I was trying to access some local sources i.e some file from temp folder but now another issue is that the service does not have access to the local path. Now how
to overcome this please help me.
Regards,
Girish
Thanks & Regards
Girish Nehte
If This post helps you to solve your problem please mark this as an answer.
My Service is running correctly now the issue I have written a code in my service that access temp folder. Now when I run this as a service my service returns an error saying that "No access for temp folder". How to oversome this?
Regards,
Girish
Thanks & Regards
Girish Nehte
If This post helps you to solve your problem please mark this as an answer.
After adding permission to the application Pool I have now acces sissue resolved. Now again i am facing another issue, I have a method GetData() in my webservice which used another dll which is loaded using reflection to get the data and return it to
the client. Now when I add the service reference from the solution it works file and return the data. But after hosting the sercvice to IIS on that perticular method I am getting stackoverflow exception. Any inputs on this behaviour? How I can find the reason
for this behviour or how I can fix this.
Regards,
Girish
Thanks & Regards
Girish Nehte
If This post helps you to solve your problem please mark this as an answer.
girishnehte
Member
76 Points
433 Posts
WCF service not working after hosting in IIS
Feb 20, 2013 02:33 AM|LINK
Hi Friends,
I am new for WCF. I have created a simple wcf service. This service simply fetches data from my another application and returns in the form of dataset. In the same solution I have created a web application as a client to access this wcf service. Now in the client application I have added a service reference from the solution itselrf and the service runs very well. it returns the data perfectly.
Now the problem occures when I have hosted the service in IIS (IIS 7). Now I have removed the existing service reference (which was from the same solution) and then added a new reference from the hosted service. Now when I run the client web application, my client did not give any error / exception but did not fetch any data from the service. I am not sure why the service did not return any data after hosting in IIS.
In my client application i have this simple code only.
Service1Client serCli = new Service1Client();
serCli.PerformInit("SAMPLE", "SAMPLE", "SAMPLE", "SAMPLE");
DataSet ds = serCli.GetData("Param1", "Param2", "Param3");
GridView1.DataSource = ds;
I am excpecting data in ds. Please let me know the probable issue or solution. Let me know if more info is required regarding this issue.
Regards,
Girish
Girish Nehte
If This post helps you to solve your problem please mark this as an answer.
farooque84
Participant
1358 Points
321 Posts
Re: WCF service not working after hosting in IIS
Feb 20, 2013 03:18 AM|LINK
Hi,
Please follow the below linq it will provides the steps for hosting the WCF and Web application in IIS.
http://forums.asp.net/t/1866807.aspx/1?Deploy+WCF+webservice+Windows+service+and+Website
girishnehte
Member
76 Points
433 Posts
Re: WCF service not working after hosting in IIS
Feb 20, 2013 04:57 AM|LINK
Thanks farooque,
I have already done all the settings, and while accessing the service I am not getting any error/exception
but my client is not getting any data from the service.
Girish Nehte
If This post helps you to solve your problem please mark this as an answer.
Haixia Xie -...
Contributor
3022 Points
294 Posts
Microsoft
Re: WCF service not working after hosting in IIS
Feb 22, 2013 01:14 AM|LINK
Hi,
If you mean host the service in IIS, the simply way is creating a service with WCF Service Application template in Visual Studio, then create a client app to consume the service by "Add Service Reference".
If you mean publish the service to IIS and consume the service from a client, you can refer the steps in a MSDN document below to publish the service.
#WCF Service Publishing
http://msdn.microsoft.com/en-us/library/bb924407.aspx
If you have published the service to IIS, can you call other functions( except the one used to return data) properly?
Best Regards,
Feedback to us
Develop and promote your apps in Windows Store
girishnehte
Member
76 Points
433 Posts
Re: WCF service not working after hosting in IIS
Feb 22, 2013 11:43 AM|LINK
Oh yes,
I have not considered it yet, but when I have tried with a simple method which returns true / false, I can call this method successfully and it returns the correct data as specified in the service.
Now the question remains that what happens to the dataset, which I am trying to return from the prior method?
Any clue guys?
Regards,
Girish
Girish Nehte
If This post helps you to solve your problem please mark this as an answer.
girishnehte
Member
76 Points
433 Posts
Re: WCF service not working after hosting in IIS
Feb 22, 2013 01:28 PM|LINK
Hey guys I have got the answer that why my service was not returning data as in the method I was trying to access some local sources i.e some file from temp folder but now another issue is that the service does not have access to the local path. Now how to overcome this please help me.
Regards,
Girish
Girish Nehte
If This post helps you to solve your problem please mark this as an answer.
sukumarraju
All-Star
16931 Points
2999 Posts
Re: WCF service not working after hosting in IIS
Feb 23, 2013 12:14 AM|LINK
From the description it is evident that the service is SOAP based one.
Application Architecture Guide 2.0
My Blog
Twitter
girishnehte
Member
76 Points
433 Posts
Re: WCF service not working after hosting in IIS
Feb 25, 2013 11:24 AM|LINK
Hi Sukumar,
My Service is running correctly now the issue I have written a code in my service that access temp folder. Now when I run this as a service my service returns an error saying that "No access for temp folder". How to oversome this?
Regards,
Girish
Girish Nehte
If This post helps you to solve your problem please mark this as an answer.
sukumarraju
All-Star
16931 Points
2999 Posts
Re: WCF service not working after hosting in IIS
Feb 25, 2013 01:00 PM|LINK
ASP.NET
http://social.msdn.microsoft.com/Forums/en-US/asmxandxml/thread/fbc5c85c-2001-4a54-ba15-1182ebac0387/
http://stackoverflow.com/questions/542312/asp-net-access-to-the-temp-directory-is-denied
Application Architecture Guide 2.0
My Blog
Twitter
girishnehte
Member
76 Points
433 Posts
Re: WCF service not working after hosting in IIS
Feb 26, 2013 11:33 AM|LINK
Thanks Sukumar,
After adding permission to the application Pool I have now acces sissue resolved. Now again i am facing another issue, I have a method GetData() in my webservice which used another dll which is loaded using reflection to get the data and return it to the client. Now when I add the service reference from the solution it works file and return the data. But after hosting the sercvice to IIS on that perticular method I am getting stackoverflow exception. Any inputs on this behaviour? How I can find the reason for this behviour or how I can fix this.
Regards,
Girish
Girish Nehte
If This post helps you to solve your problem please mark this as an answer.