CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2007
    Location
    South Africa
    Posts
    263

    [RESOLVED] Response brings back an Incorrect URL

    Good Day All
    I have an asp.net project that does the CC handling for me and if the cc comes from a certain application it redirects to the page in a certain application. In that Project there is a page named “Buycredit”

    That contains a Page_load that has this
    Code:
    if (!Page.IsPostBack)
                            {
                                //handle the response url
                                handleResponse();
                            }
    And the handleresponse Method is defined like this

    Code:
    private void handleResponse()
            {   
               // try
              //  {
                    //populate VCS object with values
                    DataAccess dataAccess = new DataAccess();
                    VCSResponse creditResponse = populateVCSObject();
    
                    //Temporary: Check if this needs to be forwarded to eCASH for processing
                    if (!string.IsNullOrEmpty(creditResponse.Misc))
                    {
                        string forwardAddy = string.Concat("http://111.111.11.118/Ecash/Ecashpos/PurchaseCredit.aspx?", Request.QueryString.ToString());
                        Response.Redirect(forwardAddy,false);
                    }
                    else
                    {
                        //Insert response values to the DB
                        dataAccess.insertReponsevalue(creditResponse);
    
                        //check if the response = approved
                        if (responseApproved(creditResponse.P3_AuthReponse))
                        {
                            //update the purchase history table with successfull credit purchase
                            dataAccess.insertPurchaseRecord((User)Session["UserDetail_Connector"], creditResponse);
                            //email the user the confirmation that credits were purchased
                            Emailer.sendCreditPurchaseMail("noreply@noreply.co.za", ((User)Session["UserDetail_Connector"]).Email, (User)Session["UserDetail_Connector"], creditResponse);
                            //Show on display the success purchase message
                            divNotify.Visible = true;
                            txtPromptMsg_Prompt.Text = "Credits were successfully purchased.";
                        }
                        else
                        {
                            //show user that purchase was not successful
                            divNotify.Visible = true;
                            txtPromptMsg_Prompt.Text = "Credits were not successfully purchased!";
                        }
                    }
                    
                //}
             //   catch (Exception ex)
             //   {
             //       throw ex;
            //    }
            }

    Now the page “PurchaseCredit.aspx” is the page in the Silverlight Project. On Debug mode, I can step through this project and it will finish and redirect to the “PurchaseCredit.aspx” in that IP and it will work fine, but when I publish it to IIS, the Page URL I get is different I get this URL


    Code:
    http://222.222.22.22:2211/BuyCredits.aspx?p1=4635&p2=ae385dcf-b2df-4090-a8f8-a&p3=294167APPROVED++&p4=&p5=Vuyo&p6=220.00&p7=Visa&p8=Purchase+credits&p9=&p10=00&p11=1105&p12=00&pam=&m_1=720&m_2=843&m_3=&m_4=&m_5=&m_6=&m_7=&m_8=&m_9=&m_10=&CardHolderIpAddr=196.212.103.91&MaskedCardNumber=424242******4242&TransactionType=Authorisation[/url]
    as you can see it is not going to the Page that has been set but  its poiting page to the “BuyCredit”
    What could be the problem here ?

    thanks
    Last edited by vuyiswam; May 30th, 2011 at 04:05 AM.
    Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."

  2. #2
    Join Date
    Jun 2005
    Location
    JHB South Africa
    Posts
    3,772

    Re: Response brings back an Incorrect URL

    you're code is if Not postback..
    Code:
    if (!Page.IsPostBack)
    but what if BuyCredits.aspx page is posting back to PurchaseCredit.aspx page ???...
    Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
    WPF Articles : 3D Animation 1 , 2 , 3
    Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
    Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
    All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.

  3. #3
    Join Date
    Dec 2007
    Location
    South Africa
    Posts
    263

    Re: Response brings back an Incorrect URL

    i have removed that part but still it does not work.
    Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."

  4. #4
    Join Date
    Dec 2007
    Location
    South Africa
    Posts
    263

    Re: Response brings back an Incorrect URL

    i have been give access. i will check tomorow morning and let you know

    thanks guys for your replies
    Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."

  5. #5
    Join Date
    Dec 2007
    Location
    South Africa
    Posts
    263

    Re: Response brings back an Incorrect URL

    Hi Guys

    There was nothing wrong on my code, the Problem is that , the URl worked only with an external IP and i was accessing it with an internal IP.

    Thanks for your help
    Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured