Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

SAP B1WS Login Service Program in C#


I have created the program in C# for LoginService.

public partial class Login : System.Web.UI.Page


    LoginServices.LoginService Lgvsrv = new LoginServices.LoginService();


    string DatabaseServer = "NIKUNJ-PC";

    string DatabaseName = "NewMaster";

    string LicenceServer = "NIKUNJ-PC";

    protected void Page_Load(object sender, EventArgs e)



    protected void Login1(string abc)


             string sessionID;

             Lgvsrv = new LoginServices.LoginService();

             sessionID = Lgvsrv.Login(DatabaseServer, DatabaseName, LoginServices.LoginDatabaseType.dst_MSSQL2008, true, "manager", "avr123",                                         LoginServices.LoginLanguage.ln_English, true, LicenceServer);



    protected void btnconnect_Click(object sender, EventArgs e)




                  MySample.GlbData.sessioniD = TextBox1.Text;

                  if (TextBox1.Text != "")


                      btnconnect.Enabled = false;          

                      btndiscon.Enabled = true;



    protected void btndiscon_Click(object sender, EventArgs e)


       // lblmsg.Text = "";



    protected void btnlogin_Click(object sender, EventArgs e)


        // this.Login();

        //  TextBox1.Text = Login

        //  MySample.GlbData.sessionID = TextBox1.Text;



But it give me error image like,

i attach image which give me error.




e2.jpg (364412 B)
e1.jpg (238715 B)
Former Member
Not what you were looking for? View more on this topic or Ask a question