I am Developing one Windows Smart Phone - 6 Application using C# in .Net 3.5 Framework. And I have created one Webservice project using ASP.Net Web Service Application 3.5. Into this Webservice project I have define Service1.asmx. Now I would like to call Webmethod "HelloWorld" on Button Click. Here is code.
using System.Web.Services;
namespace WebService1
{
/// <summary>
/// Summary description for Service1
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
public class Service1 : System.Web.Services.WebService
{
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
}
private void button1_Click(object sender, EventArgs e)
{
WebService1.Service1 myService = new WebService1.Service1();
string str = myService.HelloWorld();
}
I am Getting Error On This Line
WebService1.Service1 myService = new WebService1.Service1();
Please Give Me Guidance As I am Very New In This.
Thanks In Advance
Pratik Bhatt
Problem Solved.
Error Was Occurring Because The Smart Device Emulator has No Access Permission for internet(network)so you have to install Microsoft Active Sync to connect emulator to network
Thanks Ralf Ehlert For Suggesting.....