I have two applications WPF - xBap one and ASP.Net one.
When I'm doing navigation from xBap to ASP.Net:
private void button1_Click(object sender, RoutedEventArgs e)
{
NavigationS开发者_运维百科ervice.Navigate(new Uri("http://localhost:14496/Default.aspx",
UriKind.Absolute));
}
Two navigation is occurred in the ASP.Net application:
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
File.AppendAllText("C:\\log.txt", DateTime.Now.ToString() +
"(SessionID: " + Session.SessionID + ")" +
Environment.NewLine);
}
}
The result in log.txt:
8/4/2011 10:45:53 AM(SessionID: jnvq2q5g0tt415hzxtdxrird)
8/4/2011 10:45:53 AM(SessionID: e0i13wsxwbpqyxtc3xrh5zcq)
This behavior causes a problem to me, any idea how to prevent that?
The environment:
Dot Net 4.0, IE 9
Check the AutoEventWireUp attribute in the Page directive.
Change it to False
then run it.
精彩评论