المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Problem to call method from a WebSercive...



C# Programming
07-01-2009, 03:10 AM
using System;
using System.Data;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.ComponentModel;
using VDSDKLib;

namespace PSWD_Server
{
///
/// Summary description for PSWD_WebService
///
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]

public class PSWD_WebService : WebService
{
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
[WebMethod]
public string Help()
{
return "Help";
}
}
}

After adding this webservice as Web Refrence in the win application


// Windows Application

PSWD_WebService WebSer = new PSWD_WebService();
TextBox1.Text = WebSer.HelloWorld(); // HelloWorld() here acceped and returns good.
TextBox1.Text = WebSer.Help(); // Help() here is not acceped and not readed
private void UnmountDisk()
{
CreateBtn.Enabled = true;
DestroyBtn.Enabled = false;
}



so how can make Help() in accepted..
and how can i call UnmountDisk() from the web service..

thanks http://www.barakasoft.com/script/Forums/Images/smiley_smile.gif