locked
web services in not accessible from class but accessible in code behind!!! RRS feed

  • Question

  • User1269925535 posted

    hi

    i added the web services to my web sit.

    i can call and use this web service in testBank.aspx.cs but i cand use it in the classes in the app_code.

    this may testBank.aspx.cs file that work with web service with no problem:

    public partial class testBank : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            BPService.PaymentGatewayImplService bpService = new BPService.PaymentGatewayImplService();
        }
    }

    this my Class that hase problem

    public class Bank_
        {
    //here i get error
    public string PayRequest(long orderId, long amount, string AddData)
    {
    
       BPService.PaymentGatewayImplService bpService = new BPService.PaymentGatewayImplService();
    
    }
    
    //....
    }
    


    any idea?


    Wednesday, February 27, 2013 1:16 AM

Answers

  • User388626632 posted

    Make sure of "Using block" in both classes and you are using correct namespace for the service

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 27, 2013 3:13 AM

All replies

  • User388626632 posted

    What error you got ?

    Wednesday, February 27, 2013 2:20 AM
  • User1269925535 posted

    the type or namespace could not ve found....

    Wednesday, February 27, 2013 2:33 AM
  • User388626632 posted

    Make sure of "Using block" in both classes and you are using correct namespace for the service

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 27, 2013 3:13 AM