Friday 22 August 2008

Provider (0x80004005) unspecified ASP

Provider (0x80004005) unspecified - ASP

0x80004005 errors are related to permission en security issues.

This could be the problem. You're opening the db twice.

There are two things you can do.

Check the connection state if the connection is already open why should you try to open it again?

or

Close the recordset and connection en set the objects to nothing at the end.


if objConn.state = 1 then
objConn.close
set objConn = nothing
end if

Tuesday 22 July 2008

Adobe Flex 3 Training from the source




Hi Yesterday I got some Books on Flex courtesy by my friend Ranjith. (Adobe Flex 3: Training from the Source (Paperback) and Flex 3 Cookbook: Code-Recipes, Tips, and Tricks for RIA Developers (Adobe Developer Library) [ILLUSTRATED] (Paperback))
Thanks Ranji. Hope I will give some nice RIA's.

Wednesday 28 May 2008

Flex Sites

http://www.mortgagenews2.com/
http://www.scion.com/

Monday 26 May 2008

Flex Accordian example - from blog.flexexamples.com




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.

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");
}
}

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>

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

Friday 1 February 2008

While Hosting Asp applications in Windows 2003 server. Change all #include file = "relativepath" directive to # include virtual = "virtulapath".

In the IIS click the windows services and change the default Prohibited to Allow against ASP.

Monday 28 January 2008


Found at http://support.microsoft.com/kb/899711

The page cannot be found HTTP 404 - File not found.

In SharePoint Portal Server 2003 portal site or a Windows SharePoint Services Web site

CAUSE
This issue occurs if you do not configure an exclusion for the path of the new virtual directory. If you do not want SharePoint Portal Server 2003 or Windows SharePoint Services to handle requests for content in the virtual directory, you must exclude the path of the virtual directory.

Back to the top
RESOLUTION
To resolve this issue, configure an exclusion for the path of the new virtual directory. Follow these steps:
1. Start Windows SharePoint Services Central Administration.
2. Under Virtual Server Configuration on the Windows SharePoint Services Central Administration page, click Configure virtual server settings.
3. On the Virtual Server List page, click the virtual server that you want to configure. For example, click Default Web Site.
4. Under Virtual Server Management on the Virtual Server Settings page, click Define managed paths.
5. In the Add a New Path area of the Define Managed Paths page, type the path that you want to exclude from Windows SharePoint Services in the Path box. For example, type /NameOfVirtualDirectory.
6. Under Type, click Excluded path, and then click OK.
7. Verify that the path that you excluded is listed in the Excluded paths area of the Define Managed Paths page.

Saturday 26 January 2008



Found in http://www.codetoad.com/xml/beginners_guides/newsfeed.asp
<%
dim objHTTP , objXML , objXSL
set objHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objHTTP.open "GET", "www.yourdomain.com/yourXmlfile.xml", false
objHTTP.send
set objXML = objHTTP.responseXML
set objXSL=Server.CreateObject("microsoft.xmldom")
objXSL.async=false

objXSL.load(Server.MapPath("style.xsl"))

if (objXSL.parseError.errorCode = 0) then

    Response.Write(objXML.transformnode(objXSL))
else
    Response.Write "Error: " & objXSL.parseError.reason & "<br> URL:" & objXSL.url
end if

Set objHTTP = Nothing
Set objXML = Nothing
Set objXSL = Nothing
%>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
    <xsl:template match="/">

<HTML>

<HEAD>
<TITLE>moreover...</TITLE>
</HEAD>
<BODY BGCOLOR="ffffff">

 <br/><br/>
<br/> 

<DIV ALIGN="center">
<TABLE BGCOLOR="ffffff" BORDER="0" CELLPADDING="4" CELLSPACING="0" WIDTH="100%">

      <xsl:for-each select="moreovernews/article">
       
         <TR VALIGN="middle">

           <TD ALIGN="left" BGCOLOR="ffffff">
             <B>
                   <A>
             <xsl:attribute name="HREF">
               <xsl:value-of select="url"/>
             </xsl:attribute>
             <xsl:attribute name="TARGET">

               _blank
             </xsl:attribute>
             <FONT FACE="Verdana, Arial,Helvetica, sans-serif" SIZE="-1" COLOR="000000">
               <xsl:value-of select="headline_text"/>
             </FONT>
           </A>

         </B>
         <BR/>
                 <A>
           <xsl:attribute name="HREF">
             <xsl:value-of select="document_url"/>
           </xsl:attribute>
           <xsl:attribute name="TARGET">

             _blank
           </xsl:attribute>
           <FONT FACE="Verdana, Arial,Helvetica, sans-serif" SIZE="-2" COLOR="666666">
             <xsl:value-of select="source"/>
           </FONT>
         </A>

                 <A>
           <xsl:attribute name="HREF">
           <xsl:value-of select="access_registration"/>
           </xsl:attribute>
           <xsl:attribute name="TARGET">
             _blank
           </xsl:attribute>
           <FONT FACE="Verdana, Arial,Helvetica, sans-serif" SIZE="-2" COLOR="666666">

             <xsl:value-of select="access_status"/>
           </FONT>
         </A>
         <FONT FACE="Verdana, Arial,Helvetica, sans-serif" SIZE="-2" COLOR="666666">
           <xsl:value-of select="harvest_time"/> GMT

         </FONT>
           </TD>
         </TR>
          
       </xsl:for-each>


</TABLE>
</DIV>
</BODY>

</HTML>
    </xsl:template>
  </xsl:stylesheet>

Monday 7 January 2008

Flash Source Files
Tutorials

I just found out about a really cool list of videos about Flex/Flex Builder. They are great for learning, especially about the new features for Flex 3.



http://labs.adobe.com/wiki/index.php/Flex_3:Feature_Introductions

 
© The contents of all personal web pages and blogs are published by me. Statements made and opinions expressed are strictly those of the me and not my employer.