How to fix
Make sure your backup location is not in the Web application's root folder or sub-folder!
Make sure your backup location is not in the Web application's root folder or sub-folder!
While WCF also has built-in session
support, BasicHttpBinding doesn't support that.
So you need to use ASP.NET session instead. To
enable ASP.NET session on WCF, you need to turn
on ASP.NET Compatibility. Do the following:
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
HttpContext.Current.Session["YourName"] = something;
object something = HttpContext.Current.Session["YourName"];
<bindings>
<basicHttpBinding>
<!-- Configure basicHttpBinding with Transport security -- >
<!-- mode and clientCredentialType set to None.-->
<binding name="Binding1">
<security mode="Transport">
<transport clientCredentialType="None"/>
</security>
</binding>
</basicHttpBinding>
</bindings>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Browser;
namespace DiggSample
{
public partial class Page : UserControl
{
public Page()
{
InitializeComponent();
}
private void Button_Click(object sender, RoutedEventArgs e)
{
}
private void MyButton_Click(object sender, RoutedEventArgs e)
{
MyButton.Content = "按到了!" + DateTime.Now.ToLongTimeString();
//HtmlPage.Window.Alert(HtmlPage.Document.GetElementById("XCsp").version2);
ScriptObject myScriptObject = (ScriptObject) HtmlPage.Window.Eval("XCsp;");
if (myScriptObject != null)
{
HtmlPage.Window.Alert((string)myScriptObject.GetProperty("Version2"));
double bRdrReady = (double)myScriptObject.Invoke("ConnectReader");
if (bRdrReady == 0)
{
myScriptObject.Invoke("ListReaders");
double totalReaders = (double)myScriptObject.GetProperty("inor");
if (totalReaders > 0)
{
for (int i = 0; i < totalReaders; i++)
{
ReaderList.Items.Add(myScriptObject.GetProperty("caReader"+(i+1).ToString()));
}
}
else
{
HtmlPage.Window.Alert("請安裝讀卡機");
}
}
else
{
HtmlPage.Window.Alert("bRdrReader=" + bRdrReady.ToString());
}
}
}
}
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
//object refundAmt = DataBinder.Eval(e.Row.DataItem, "RefundAmt");
int refundAmt = ((usp_select_NetATM_logby_TransNoResult1)e.Row.DataItem).RefundAmt;
if (refundAmt > 0)
{
object OrderInfo = e.Row.FindControl("OrderInfo");
if (OrderInfo != null)
{
((Label)OrderInfo).Text += "
";
}
object RefundDetailLink = e.Row.FindControl("RefundDetailLink");
if (RefundDetailLink != null)
{
((HyperLink)RefundDetailLink).NavigateUrl = "javascript:MM_openBrWindow('RefundDetail.aspx?TransNo=" + e.Row.Cells[2].Text.TrimEnd() + "','NewWindow','width=850,height=600,toolbar=no, menubar=no,location=no')";
((HyperLink)RefundDetailLink).Text = "(已執行退費與沖正)";
}
}
http://www.pluralsight.com/tools.aspx
Fritz OnionTool to decode the ViewState in ASP.NET 2.0 pages. This version supports display of control state as well as view state. Screenshot
Fritz OnionTool to decode the ViewState in ASP.NET pages compatible with version 1.1 of ASP.NET Screenshot
http://blogs.msdn.com/rextang/archive/2007/05/25/2868250.aspx
<configuration>
<system.web>
<authentication mode="Forms" >
<forms loginUrl="login.aspx" name=".ASPNETAUTH" protection="None" path="/" timeout="20" >
</forms>
</authentication>
<!-- This section denies access to all files in this application except for those that you have not explicitly specified by using another setting. -->
<authorization>
<deny users="?" />
</authorization>
</system.web>
<!-- This section gives the unauthenticated user access to the Default1.aspx page only. It is located in the same folder as this configuration file. -->
<location path="default1.aspx">
<system.web>
<authorization>
<allow users ="*" />
</authorization>
</system.web>
</location>
<!-- This section gives the unauthenticated user access to all of the files that are stored in the Subdir1 folder. -->
<location path="subdir1">
<system.web>
<authorization>
<allow users ="*" />
</authorization>
</system.web>
</location>
</configuration>
iisreset /stop
C:\WINDOWS\system32\inetsrv\MetaBase.xml
in Notepad.Enable32BitAppOnWin64="TRUE"
iisreset /start
aspnet_regiis -i
should now work.