i have an ASP.NET Webapplication running in IIS. Now i want to generate/create a webservice which just does the same things as the ASP.NET Webapp. I need this service for an Android Client, which i have to develop. Basicly the Webservice needs just to delegate the android client request down to the Webapp and give me the requested data in SOAP or JSON back to the client. I would prefer JSON here but if this is not posible SOAP would do the job for me to.
So is this even posible to generate a webservice automaticly from the ASP.Net Webapp with Visual Studio?
Can someone point me to a tutorial how to achiev this? I am really new to the ASP.NET and Webservice world, and i dont know how exactly i have to solve this problem.
Thank you very much.
For that you need to learn About webservice. You just create a webservice in asp.net and It call from the Android with URl. suppose the webservice url like :
localhost:1452//<ApplicationName>/<yourAsmxFile.asmx>please refer below url to help on it.
You can added new .Asmx file in your project Or You can seprate webservice project to commuinicate with others like mobile plateform..
After creating new webservice project or added .asmx file in current web application.
There is a HelloWorld() Webmethod found in that file.
also you should added below keys in web.config to test webservice in your localhost.
more information you can refer : http://support.microsoft.com/kb/819267
If you have added new file for example :
Test1.asmxthen you can run it on web browser.You can test your webmethod. for example:
your localhost url: http://localhost/myWebServiceProject/Test1.asmx
when you run this service file then page will shows the all web methods.
then you can easily get response all the web methods by clicking perticular methods over there..