Monday, 26 May 2008
Tuesday, 22 April 2008
Request object error 'ASP 0104 : 80004005' AspMaxRequestEntityAllowed
Request object error 'ASP 0104 : 80004005'
Operation not Allowed
loader.asp error
------------------
CAUSE
This issue occurs if a Content-Length header is present and if the Content-Length
header specifies an amount of data that is larger than the value of the
AspMaxRequestEntityAllowed property in the IIS metabase.
The default value for the AspMaxRequestEntityAllowed property is 204,800 bytes.
Note Always back up the metabase before you edit it.
inetpub\adminscripts
at the command prompt
cscript adsutil.vbs set w3svc/ASPMaxRequestEntityAllowed [size]
[size max value 1,073,741,824 bytes.]
------------------------------------------------
You may receive a 403 error when you use an ASP request to upload a large file in Internet Information Services
View products that this article applies to.
Article ID : 327659
Last Review : December 3, 2007
Revision : 4.2
This article was previously published under Q327659
Important This article contains information about editing the metabase. Before you edit the metabase, verify that you have a backup copy that you can restore if a problem occurs. For information about how to do this, see the "Configuration Backup/Restore" Help topic in Microsoft Management Console (MMC).
SYMPTOMS
When you use an Active Server Pages (ASP) request to upload a large file to a computer where Microsoft Internet Information Services (IIS) 5.0, Microsoft Internet Information Services (IIS) 5.1, or Microsoft Internet Information Services (IIS) 6.0 is installed, the upload may fail. You may also receive a 403 error response or an error message that is similar to one of the following:
Error message 1
Request object error 'ASP 0104 : 80004005' Operation not Allowed :
Error message 2
007~ASP 0104~Operation not Allowed
When you post lots of form data to an ASP page, you may receive an error message that is similar to the following:
Error ’80020009’ Exception occurred
Additionally, the file upload may fail when you use the Response.binaryWrite method.
You experience one or more of these symptoms even though the same file upload worked in earlier versions of IIS.
Back to the top
CAUSE
This issue occurs if a Content-Length header is present and if the Content-Length header specifies an amount of data that is larger than the value of the AspMaxRequestEntityAllowed property in the IIS metabase. The default value for the AspMaxRequestEntityAllowed property is 204,800 bytes.
Note This metabase property was first included in the October 2002 cumulative update for IIS. This metabase property is included in a default installation of IIS 6.0.
Back to the top
RESOLUTION
Warning If you edit the metabase incorrectly, you can cause serious problems that may require you to reinstall any product that uses the metabase. Microsoft cannot guarantee that problems that result if you incorrectly edit the metabase can be solved. Edit the metabase at your own risk.
Note Always back up the metabase before you edit it.
To resolve this issue, modify the value in the AspMaxRequestEntityAllowed property to set the maximum number of bytes that are permitted in the entity body of an ASP request. To do this, follow these steps:
1. At a command prompt, type the following command, and then press ENTER:
cd drive:\inetpub\adminscripts
Note In this command to change folders, drive is a placeholder for the hard disk where IIS is installed.
2. At a command prompt, type the following command, and then press ENTER:
cscript adsutil.vbs set w3svc/ASPMaxRequestEntityAllowed size
Note In this command, size is a placeholder for the largest file size upload that you want to allow. The maximum value is 1,073,741,824 bytes. Set this value to the lowest possible value that allows for the functionality that you want.
3. At a command prompt, type the following command, and then press ENTER:
iisreset
Back to the top
MORE INFORMATION
The AspMaxRequestEntityAllowed property specifies the maximum number of bytes that are permitted in the entity body of an ASP request. If a Content-Length header is present and if the Content-Length header specifies an amount of data that is larger than the value of the AspMaxRequestEntityAllowed property, IIS returns a 403 error response. The AspMaxRequestEntityAllowed property applies only to PUT requests and to POST requests. The AspMaxRequestEntityAllowed property does not apply to GET requests. Because this metabase property applies only to ASP, other Internet Server API (ISAPI) extensions are not affected.
The AspMaxRequestEntityAllowed property is related in function to the MaxRequestEntityAllowed property. However, the AspMaxRequestEntityAllowed property is specific to ASP requests. You can set the MaxRequestEntityAllowed property to 1 megabyte (MB) at the World Wide Web Publishing Service (WWW Service) level. Then, you can set the AspMaxRequestEntityAllowed property to a smaller value if you know that your specific ASP applications handle a smaller amount of data.
Posted by
Unknown
at
10:51:00 am
Labels: Request object error 'ASP 0104 : 80004005' AspMaxRequestEntityAllowed 0 comments
Monday, 24 March 2008
Flex dot net example, Flex .net, Flex asp.net, Flex dotnet, Flex with asp.net, HTTPServices example
The asp.net code for the Previous Flex example. default.aspx I am just posting the body part of default.aspx
The User table has three fields UserId,UserName,email
<form id="form1" runat="server">
<div>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
id="Flex3" width="100%" height="100%"
codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
<param name="movie" value="FlexDotNet.swf">
<param name="quality" value="high">
<param name="bgcolor" value="#869ca7">
<param name="allowScriptAccess" value="sameDomain">
<embed src="FlexDotNet.swf" quality="high" bgcolor="#869ca7"
width="100%" height="100%" name="Flex3" align="middle"
play="true"
loop="false"
quality="high"
allowScriptAccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/go/getflashplayer"></embed>
</object>
</div>
</form>
------------------ Code behind code default.aspx.cs -----
using System;
using System.Configuration;
using System.Collections;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
displaydata();
}
public void displaydata()
{
SqlConnection con = new SqlConnection(@"Provider=SQLOLEDB.1;Persist Security Info=False;User ID=yourUserId;Password=YourPassword;Initial Catalog=YourDatabaseName;Data Source=yourServerName" );
con.Open();
SqlCommand cmd = new SqlCommand("select * from Users",con);
cmd.con.open();
da = new SqlDataAdapter(cmd);
ds = new DataSet();
da.Fill(ds, "Users");
mxmlStr = "<users>";
foreach (DataRow dr in myDataSet.Tables["EmployeeData"].Rows)
{
mxmlStr = mxmlStr + "<user><userid>" + dr[0].ToString() + "</userid><username>" + dr[1].ToString() + "</username><emailaddress>" + accessSqlArray(2,mxmLoop) + "</emailaddress></user>";
}
mxmlStr = mxmlStr & "</users>";
response.write(mxmlStr);
}
}
------------------------ Code Behind DeleteRequest.aspx.cs---------------------
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
public partial class deleteRequest : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
displaydata();
}
public void displaydata()
{
string mxmlStr;
string strUserId;
SqlConnection con = new SqlConnection();
con.ConnectionString = "Data Source=yourServerName;Initial Catalog=yourDataBase;User ID=yourUserId;Password=yourPassword;";
con.Open();
strUserId = Request.Form["user_id"];
if (Request.Form["user_id"] != "")
{
SqlCommand cmd = new SqlCommand("Delete from Users WHERE UserId =" + Request.Form["user_id"] , con);
cmd.ExecuteNonQuery();
}
Server.Transfer("default.aspx");
}
}
------- Code Behind for addRequest.aspx -----------------
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
public partial class addRequest : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
displaydata();
}
public void displaydata()
{
string mxmlStr;
string strUserName, strEmail, strMaxId;
Int32 intMaxId;
//SqlConnection con = new SqlConnection("User ID=yourUserId;Password=yourPassword;Initial Catalog=yourDataBase;Data Source=yourServerName");
SqlConnection con = new SqlConnection();
con.ConnectionString = "Data Source=ARULM;Initial Catalog=guest1;User ID=sa;Password=sa;";
con.Open();
strUserName = Request.Form["add_username"];
strEmail = Request.Form["add_email"];
if (Request.Form["add_username"] != "")
{
SqlCommand cmd = new SqlCommand("select max(UserId) as strMaxId FROM Users", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds, "Users");
mxmlStr = "
//DataRow dr = new DataRow();
//ds.Tables["
strMaxId = ds.Tables["Users"].Rows[0][0].ToString();
intMaxId = Convert.ToInt32(strMaxId) + 1;
SqlCommand cmd2 = new SqlCommand("insert into Users (UserId,UserName,email) values (" + intMaxId + ",'" + strUserName + "','" + strEmail + "')", con);
cmd2.ExecuteNonQuery();
}
Server.Transfer("default.aspx");
}
}
---------- SaveRequest.aspx.cs-------------
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
public partial class saveRequest : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
displaydata();
}
public void displaydata()
{
string mxmlStr;
string strUserName, strEmail, strMaxId;
string strUserId;
Int32 intMaxId;
SqlConnection con = new SqlConnection();
con.ConnectionString = "Data Source=yourServerName;Initial Catalog=yourDatabaseName;User ID=yourUserId;Password=yourPassword;";
con.Open();
strUserName = Request.Form["add_username"];
strEmail = Request.Form["add_email"];
strUserId = Request.Form["adduser_id"];
if (Request.Form["adduser_id"] != "")
{
intMaxId = Convert.ToInt32(strUserId);
SqlCommand cmd2 = new SqlCommand("update users set UserName ='" + strUserName + "',email ='" + strEmail + "' where UserId = " + intMaxId, con);
cmd2.ExecuteNonQuery();
}
Server.Transfer("default.aspx");
}
}
----- addRequest.aspx.cs -----
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
public partial class addRequest : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
displaydata();
}
public void displaydata()
{
string mxmlStr;
string strUserName, strEmail, strMaxId;
Int32 intMaxId;
SqlConnection con = new SqlConnection();
con.ConnectionString = "Data Source=yourServerName;Initial Catalog=yourDatabaseName;User ID=yourUserId;Password=yourPassword;";
con.Open();
strUserName = Request.Form["add_username"];
strEmail = Request.Form["add_email"];
if (Request.Form["add_username"] != "")
{
SqlCommand cmd = new SqlCommand("select max(UserId) as strMaxId FROM Users", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds, "Users");
mxmlStr = "
strMaxId = ds.Tables["Users"].Rows[0][0].ToString();
intMaxId = Convert.ToInt32(strMaxId) + 1;
SqlCommand cmd2 = new SqlCommand("insert into Users (UserId,UserName,email) values (" + intMaxId + ",'" + strUserName + "','" + strEmail + "')", con);
cmd2.ExecuteNonQuery();
}
Server.Transfer("default.aspx");
}
}
Posted by
Unknown
at
12:18:00 pm
Labels: Flex .net, Flex asp.net, Flex dotnet, Flex with asp.net, HTTPServices example 0 comments
Flex dot net example, Flex .net, Flex asp.net, Flex dotnet, Flex with asp.net, HTTPServices example
Source MXML
<mx:application mx="http://www.adobe.com/2006/mxml" xmlns="*" layout="absolute" creationcomplete="userRequest.send()"><mx:httpservice id="deleteRequest" url="deleteRequest.aspx" useproxy="false" method="POST"></mx:httpservice><mx:form x="22" y="10" width="493"><mx:hbox>
<mx:application mx="http://www.adobe.com/2006/mxml" xmlns="*" layout="absolute" creationcomplete="userRequest.send()">
<mx:script>
<!--[CDATA[ import mx.collections.ArrayCollection; [Bindable]-->
</mx:script>
<mx:httpservice id="userRequest" url="default.aspx" useproxy="false" method="POST">
<mx:request xmlns="">
<user_name>{username.text}</user_name>
<user_id>{dgUserRequest.selectedItem.userid}</user_id>
</mx:request>
</mx:httpservice>
<mx:httpservice id="saveRequest" url="saveRequest.aspx" useproxy="false" method="POST">
<mx:request xmlns="">
<adduser_id>{dgUserRequest.selectedItem.userid}</adduser_id>
<add_username>{dgUserRequest.selectedItem.username}</add_username>
<add_email>{dgUserRequest.selectedItem.emailaddress}</add_email>
</mx:request>
</mx:httpservice>
<mx:httpservice id="addRequest" url="addRequest.aspx" useproxy="false" method="POST">
<mx:request xmlns="">
<add_username>{frmName.text}</add_username>
<add_email>{email.text}</add_email>
</mx:request>
</mx:httpservice>
<mx:httpservice id="deleteRequest" url="deleteRequest.aspx" useproxy="false" method="POST">
<mx:request xmlns="">
<user_id>{dgUserRequest.selectedItem.userid}</user_id>
</mx:request>
</mx:httpservice>
<mx:form x="22" y="10" width="493">
<mx:hbox>
<mx:label text="Username">
<mx:textinput id="username">
</mx:textinput>
<mx:button label="Submit" click="showData()">
<mx:button label="Delete" click="deleteRow()">
</mx:button>
<mx:datagrid id="dgUserRequest" itemfocusout="updateRow()" itemeditend="updateRow()" dataprovider="{userRequest.lastResult.users.user}" x="22" y="140" width="493" height="225" editable="true">
<mx:columns>
<mx:datagridcolumn headertext="User ID" datafield="userid" editable="false">
<mx:datagridcolumn headertext="User Name" datafield="username" editable="true">
<mx:datagridcolumn headertext="E-Mail" datafield="emailaddress" editable="true">
</mx:datagridcolumn>
</mx:datagridcolumn>
<mx:form width="302" height="113" x="22" y="373">
<mx:formitem label="Name">
<mx:textinput id="frmName" width="200" text="{dgUserRequest.selectedItem.username}">
</mx:textinput>
<mx:formitem label="Email">
<mx:textinput id="email" width="200" text="{dgUserRequest.selectedItem.emailaddress}">
</mx:textinput>
<mx:formitem>
<mx:hbox>
<mx:button label="Update" click="updateRow()">
<mx:button label="Add" click="addRow()">
<mx:button label="Delete" click="deleteRow()">
</mx:button>
</mx:button>
</mx:button>
</mx:hbox><mx:application mx="http://www.adobe.com/2006/mxml" xmlns="*" layout="absolute" creationcomplete="userRequest.send()"><mx:form x="22" y="10" width="493"><mx:hbox><mx:label text="Username"><mx:button label="Submit" click="showData()"><mx:datagrid id="dgUserRequest" itemfocusout="updateRow()" itemeditend="updateRow()" dataprovider="{userRequest.lastResult.users.user}" x="22" y="140" width="493" height="225" editable="true"><mx:columns><mx:datagridcolumn headertext="User ID" datafield="userid" editable="false"><mx:form width="302" height="113" x="22" y="373"><mx:formitem label="Name"><mx:formitem label="Email"><mx:formitem><mx:label text="Username"><mx:button label="Submit" click="showData()"><mx:datagrid id="dgUserRequest" itemfocusout="updateRow()" itemeditend="updateRow()" dataprovider="{userRequest.lastResult.users.user}" x="22" y="140" width="493" height="225" editable="true"><mx:columns><mx:datagridcolumn headertext="User ID" datafield="userid" editable="false"><mx:form width="302" height="113" x="22" y="373"><mx:formitem label="Name"><mx:formitem label="Email"><mx:formitem><mx:hbox>
</mx:hbox></mx:formitem></mx:formitem></mx:formitem></mx:form></mx:datagridcolumn></mx:columns></mx:datagrid></mx:button></mx:label></mx:formitem></mx:formitem></mx:formitem></mx:form></mx:datagridcolumn></mx:columns></mx:datagrid></mx:button></mx:label></mx:hbox></mx:form></mx:application></mx:formitem></mx:formitem></mx:formitem></mx:form></mx:datagridcolumn></mx:columns></mx:datagrid></mx:button></mx:label></mx:hbox></mx:form></mx:application></mx:hbox></mx:form></mx:application>
Posted by
Unknown
at
12:02:00 pm
Labels: Flex .net, Flex asp.net, Flex dotnet, Flex with asp.net, HTTPServices example 0 comments
Friday, 14 March 2008
Very Nice Example of Flex Paging - Paging in Flex
http://www.brucephillips.name/flex/pagingdatagrid/bin/PagingDataGrid.html
http://www.brucephillips.name/blog/index.cfm/2006/11/29/Paging-Using-Next--Previous-Through-Records-Displayed-In-A-Flex-DataGrid
Posted by
Unknown
at
11:26:00 am
Labels: Flex Paging example 0 comments