Click here to Skip to main content
15,886,578 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
i tried this link http://www.c-sharpcorner.com/uploadfile/rohatash/inserting-data-into-database-using-wcf-service/[^] to create wcf service but i am getting error when i am adding service reference in windows phone
Posted
Comments
Naz_Firdouse 30-May-14 3:13am    
what error you are getting???
Nandhini Devi 30-May-14 3:36am    
http://www.codeproject.com/Questions/779491/error-while-adding-service-reference?cmt=637575#cmt2_779491
i have posted about my problem there
Naz_Firdouse 30-May-14 3:55am    
clarify me some doubts...
is your service and phone app in the same project?
Nandhini Devi 30-May-14 3:59am    
no its not in same project .i tried to add in same solution but not able to access functions in service
Naz_Firdouse 30-May-14 4:03am    
ok ...since it is a separate project, are you able to run the service and browse it...

1 solution

To make your WCF service running , follow these steps

1) After creating a WCF Service application, if you hit f5, the service will run in browser.
2)Click on the service name in the list of items displayed in the browser(by default you will be able to see "Service1.svc";
3)Clicking on that link navigates to a page where it shows some text called "You have created a service. bla bla bla". Copy the browser url here. It will be something like this

e.g http://localhost:16679/Service1.svc[^]Now leave this project as it is(in running state)

Move to your phone app and add service reference to the running service</pre>

You will be able to access the service
 
Share this answer
 
Comments
Nandhini Devi 30-May-14 4:36am    
Thank you so much can you say how to make service run always ?
Naz_Firdouse 30-May-14 4:43am    
are you able to run the service in browser?
Naz_Firdouse 30-May-14 4:46am    
Keep the service project running ...don't stop the project ...
your service will be running until you stop the projct...i.e if you hit shift+f5, your service stops and you will not be able to access the service and you get errors in the phone app
Nandhini Devi 30-May-14 4:50am    
when i upload my app to store my project will stop running know ? how to solve that and i want to make service run always how to do that?
Naz_Firdouse 30-May-14 5:25am    
In that case, you need to run your service in IIS on a server and need to access that service from your app...
The service running in a server will be running all the time unless it is stopped manually...or the server is down

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900