2013-01-15 16 views
0

我有asp.net網頁與網絡4.0和我做我的登錄頁面與asp.net登錄控制,當用戶登錄到我的網站,並希望去付款頁面並設置數據,然後按付費按鈕和回到我的網站,我的網頁在重定向到我的網站的主頁後自動註銷他。 我如何避免自動註銷?從銀行付款回來後自動禁用註銷?

//my code for payment button: 
PaymentGatewayImplService bpService = new PaymentGatewayImplService(); 
result = bpService.bpPayRequest(terminalId, UserName, 
PassWord, 
basketID*1000+tryForPayment, 
Int64.Parse(GetPrice()), 
PayDateTextBox, 
PayTimeTextBox, "", 
"www.sample.com/inpay.aspx", 
0); 

//my code in inpay.aspx load form: 
RefIdLabel.Text = Request.Params["RefId"]; 
ResCodeLabel.Text = Request.Params["ResCode"]; 
SaleOrderIdLabel.Text = Request.Params["SaleOrderId"]; 
SaleReferenceIdLabel.Text = Request.Params["SaleReferenceId"]; 
自動inpay.aspx我的網站登出

.....

+1

餅乾,會話ID等 – slugster

+0

謝謝,但我是新的asp.net.can你解釋更多? ;) –

+2

請向我們展示相關代碼 – Blachshma

回答

1

聽起來像你對我需要實現窗體身份驗證到您的網站。這裏有一個簡單的例子:http://msdn.microsoft.com/en-us/library/xdt4thhy%28v=vs.100%29.aspx

+0

** _非常感謝您的理由:)_ **。在我的網絡配置中,我使用了enableCrossAppRedirects =「true」,這意味着當頁面重定向到另一個頁面時cookie將被清除。謝謝回覆:D遵循以下**鏈接**:[msdn](http:// msdn。 microsoft.com/en-us/library/system.web.configuration.formsauthenticationconfiguration.enablecrossappredirects.aspx) –