|
hi all
i am using asp.net 2.0, and code to zip a file
the code works for folder size 60 MB but if the folder size is more than 60MB then it throws me following error
"Insufficient system resources exist to complete the requested service"
i used ICSharp DLL to make zipped folder
I have 256 MB RAM on my machin
what should i do ???
is anybody has occoured this type of error while using ICSharp DLL
thankx in advance
If the message is useful for U then please Rate This message...
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
koolprasad2003 wrote: i am using asp.net 2.0, and code to zip a file
the code works for folder size 60 MB but if the folder size is more than 60MB then it throws me following error
What are you trying to Do? You are using ASP.NET Application to Zip a more than 60 MB file ?
Can you please tell me what is your actual requirement ?
|
|
|
|
|
koolprasad2003 wrote: i used ICSharp DLL to make zipped folder
Looks like some third part thing. Better ask details regaridng this in their forum.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Manas, Do you think it does makes any sense to zip a file with more than 60MB in ASP.NET web application ?
|
|
|
|
|
Abhijit Jana wrote: Manas, Do you think it does makes any sense to zip a file with more than 60MB in ASP.NET web application ?
Not very usual but yes, I have seen applications doing that.
This is more to do with how good you are in convincing the client to follow an alternate approach.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
|
The only possible website that may zip a file more than 60 mb are File hosting sites
|
|
|
|
|
Abhishek Sur wrote: The only possible website that may zip a file more than 60 mb are File hosting sites
|
|
|
|
|
I have never used ICSharp but I think the problem is it creates total ZIP in buffer, thus killing up the entire buffer size.
Code in such a way that it will always use the hdisk while doing the zip process.
|
|
|
|
|
hi
thanx for replies guys
i have a web applciation through which i ZIP a specific folder
i used ICSharpDLL for the same
but when i give folder more than 60 MB it gives me error as i said eariler
Insufficient system resources exist to complete the requested service
what i do ???
is their any other way to ZIP/Compressed it ???...
thankx in advance...
If the message is useful for U then please Rate This message...
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
I have created a class named records in app_code folder. In records there is a updaterecord method that i m using in my aspx.vb page.
now the problem in i need to use session in updaterecord method.
i am using asp.net 2.0
One person's data is another person's program.
--J.Walia
|
|
|
|
|
you can use session by adding System.Web dll to your project(if it is other than web project, ex a class library referenced to a web application)
then use the command below.
System.Web.HttpContext.Current.Session["User"]
|
|
|
|
|
set the session.
and then get where u want.
code listed below.
using System;
using System.Data;
using System.Configuration;
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;
public class SN
{
public SN()
{
}
public static string UserName
{
get
{
if (HttpContext.Current.Session["UserName"] == null || HttpContext.Current.Session["UserName"].ToString().Trim() == "")
return "";
return HttpContext.Current.Session["UserName"].ToString();
}
set { HttpContext.Current.Session["UserName"] = value; }
}
}
Be afraid of a gentleman when he is hungry, and of a mean person when his stomach is full.
Zafar
|
|
|
|
|
Try to using :
HttpContext.Current.Session["SessionVariable"]
|
|
|
|
|
Hey guys need help with this
My web config file
<compilers>
Line 15: <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4" compilerOptions="/warnaserror-">
Line 16: <providerOption name="CompilerVersion" value="v3.5"/></compiler>
Line 17: <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" compilerOptions="/optioninfer+">
Line 18: <providerOption name="CompilerVersion" value="v3.5"/></compiler></compilers></system.codedom>
Source File: \\shared.hosting.local\nfs\cust\0\09\78\787900\web\web.config Line: 16
Any solution ?
Thanks Thanks
KaKaShi HaTaKe
|
|
|
|
|
Please make sure that any code is in pre tags.
this
<providerOption name="CompilerVersion" value="v3.5"/>
appears twice in your web config
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi all,
I have to create dynamic menus that are coming from database. Im using asp:menu control , xmldatasource and xslt file. But im not getting the menus on my page. Can anyone help me where im wrong and what should i do/
I code used is:
<br />
CODE IN .ASPX<br />
<br />
<asp:Menu ID="Menu1" DataSourceID="xmlDataSource" runat="server" <br />
DynamicHorizontalOffset="2" StaticDisplayLevels="1" Orientation="Horizontal" ItemWrap="false" DynamicEnableDefaultPopOutImage="False" StaticEnableDefaultPopOutImage="False" ><br />
<DataBindings><br />
<asp:MenuItemBinding DataMember="MenuItem" <br />
NavigateUrlField="NavigateUrl" TextField="Text" /><br />
</DataBindings><br />
<StaticMenuItemStyle CssClass="popup" /><br />
<DynamicHoverStyle CssClass="popup" /><br />
<DynamicMenuStyle CssClass="popupd" /><br />
<DynamicSelectedStyle CssClass="popup" /><br />
<DynamicMenuItemStyle CssClass="popupd" /><br />
<br />
</asp:Menu><br />
<asp:XmlDataSource ID="xmlDataSource" TransformFile="~/TransformXSLT.xsl" <br />
XPath="MenuItems/MenuItem" EnableCaching="false" runat="server"/><br />
<br />
CODE IN ASPX.CS<br />
<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
if (!Page.IsPostBack)<br />
{<br />
bindMainMenu();<br />
}<br />
}<br />
<br />
private void bindMainMenu()<br />
{<br />
SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["cs"].ConnectionString.ToString());<br />
SqlCommand comm = new SqlCommand();<br />
SqlDataAdapter da = new SqlDataAdapter();<br />
DataSet ds = new DataSet();<br />
conn.Open();<br />
comm.Connection = conn;<br />
comm.CommandType = CommandType.StoredProcedure;<br />
comm.CommandText = "getMenuItems";<br />
<br />
da.SelectCommand = comm;<br />
da.Fill(ds);<br />
<br />
ds.DataSetName = "Menus";<br />
ds.Tables[0].TableName = "Menu";<br />
DataRelation relation = new DataRelation("id", ds.Tables["Menu"].Columns["nodeid"],<br />
ds.Tables["Menu"].Columns["parentid"], true);<br />
relation.Nested = true;<br />
ds.Relations.Add(relation);<br />
xmlDataSource.Data = ds.GetXml();<br />
<br />
comm.Cancel();<br />
conn.Close();<br />
}<br />
<br />
TransformXSLT.xsl file is<br />
<br />
<?xml version="1.0" encoding="utf-8" ?><br />
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><br />
<xsl:output method="xml" indent="yes" encoding="utf-8" /><br />
<!-- Find the root node called Menus <br />
and call MenuListing for its children <br />
--><br />
<xsl:template match="/Menus"><br />
<MenuItems><br />
<xsl:call-template name="MenuListing" /><br />
</MenuItems><br />
</xsl:template><br />
<!-- Allow for recusive child node processing <br />
--><br />
<xsl:template name="MenuListing"><br />
<xsl:apply-templates select="Menu" /><br />
</xsl:template><br />
<br />
<br />
<xsl:template match="Menu"><br />
<br />
<MenuItem><br />
<!-- Convert Menu child elements to MenuItem attributes <br />
--><br />
<br />
<xsl:attribute name ="Text"><br />
<xsl:value-of select="nodeName" /><br />
</xsl:attribute><br />
<br />
<xsl:attribute name="NavigateUrl"><br />
<xsl:text>/CMSsite/pages/</xsl:text><br />
<xsl:value-of select="url" /><br />
<xsl:text>.aspx</xsl:text><br />
</xsl:attribute><br />
<br />
<!-- Call MenuListing if there are child Menu nodes <br />
--><br />
<xsl:if test="count(Menu) > 0"><br />
<xsl:call-template name="MenuListing" /><br />
</xsl:if><br />
</MenuItem><br />
<br />
</xsl:template><br />
</xsl:stylesheet><br />
|
|
|
|
|
What makes you think you are 'going wrong' ? What do you expect, and how is this code not doing what you want ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
hi im not getting any errors but im not getting the menus displayed. data is coming from database. xml with relation is generated. But im not getting the menus
|
|
|
|
|
Hi,
How to block editing directly in the textbox of FileUpload control.
Thankyou,
YPKI
|
|
|
|
|
I doubt you can. You may be able to write some javascript which doesn't allow typing in the textbox, but the file upload as a rule is pretty heavily sandboxed, because it is a security risk.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Add the following code to the code behind of the page.
protected void Page_Load(object sender, EventArgs e)
{
FileUpload1.Attributes.Add("onKeyDown", "if((event.keyCode == 8 ) ||(event.keyCode == 9) || (event.keyCode == 12) || (event.keyCode == 27) || (event.keyCode == 37) || (event.keyCode == 39) || (event.keyCode == 46))return true;else return false;");
}
|
|
|
|
|
Hi,
I need help regarding displaying small popup message when user mouse over the pointer the hyperlink, I have created this with javascript and it is showing the required popup onmouseover and onMouseOut it is hiding the popup using kill() method given below in code snippest but problem is whenever u scroll the page the popup msg will get displayed at the top and not on the hyperlink(onMouseOver)..
If anyone is having any idea of setting the mouse pointer to desired location or any alternate solution to show onHover popup using javascript.
Plz see code below:
//Hover Text for SSN
Xoffset= 20 //-10; //-60; // modify these values to ...
Yoffset= -25 //-150; //20; // change the popup position.
var old,skn,iex=(document.all),yyy=-1000;
var ns4=document.layers
var ns6=document.getElementById&&!document.all
var ie4=document.all
if (ns4)
skn=document.dek
else if (ns6)
skn=document.getElementById("dek").style
else if (ie4)
skn=document.all.dek.style
if(ns4)document.captureEvents(Event.MOUSEMOVE);
else
{
skn.visibility="visible"
skn.display="none"
}
document.onmousemove=get_mouse;
function popup(msg,bak)
{
var content="<TABLE WIDTH=250 BORDER=1 BORDERCOLOR=#01244E CELLPADDING=2 CELLSPACING=0 "+
"BGCOLOR="+bak+"><TD ALIGN=left style='padding-left:5px;font-size:8pt;font-family:Arial;color:#01244E'>"+msg+"</TD></TABLE>";
yyy=Yoffset;
if(ns4){skn.document.write(content);skn.document.close();skn.visibility="visible"}
if(ns6){document.getElementById("dek").innerHTML=content;skn.display=''}
if(ie4){document.all("dek").innerHTML=content;skn.display=''}
}
function get_mouse(e)
{
var x=(ns4||ns6)?e.pageX:event.x+document.body.scrollLeft;
skn.left=x+Xoffset;
var y=(ns4||ns6)?e.pageY:event.y+document.body.scrollTop;
skn.top=y+yyy;
}
function kill()
{
yyy=-1000;
if(ns4){skn.visibility="hidden";}
else if (ns6||ie4)
skn.display="none"
}
|
|
|
|
|
My first google hit for javascript scroll position gave me this:
To save the last scroll positions (horizontal and vertical):
var hscroll = (document.all ? document.scrollLeft : window.pageXOffset);
var vscroll = (document.all ? document.scrollTop : window.pageYOffset);
then when you swap in the new form just scroll to those positions:
window.scrollTo(hscroll, vscroll);
So, you need to use the values being used in this code, to offset your menu by the scrollbar position.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
hi,,
I'm new in .Net, any one help me...
how to add multiple rows on the single datatable. without using SQL-Server.
I need to add the multiple textbox values to the Datatable.
Thanks.
|
|
|
|