Web Forms :: Get Data From Temp Folder
Mar 16, 2011In my asp.net project i have a folder which name is "temp"
View 2 RepliesIn my asp.net project i have a folder which name is "temp"
View 2 RepliesI am using alternatiff plugin to view tiff in web browser. But my main aim is to disable saving the copy of tiff file in temp internet files folder. and the second is to view some specific 2-3 pages from the entire tiff files. (SECURITY IS THE MAJOR CONCERN) or is there anything alternative which can help me out from thes.
I am working on this from last two days but couldnt get to the solution for this.
I have hosted some 5 applications on IIS in my server.
After sometimes I am getting System.OutOfMemoryException error due to out of memory in ASP.NET Temp Folder.
Is there any way to clear it automatically or any setting for this.
We have a client with a SBS 2003 server, very standard setup.
The ms.netframeworkv2.0.50727 emporary asp.net files oot folder is filling up with 590kb folders at the rate of around 6 per min.!
They seem to point at a sage CRM package (installed on the server) but Sage say its a problem with IIS and not them!
I got an error about asp.net cannot find window emp folder, so I created one and gave the right permission and the problem went away. Three days later same problem happened and I went in and couldn't find my temp folder. This is on a live server so is there a reason for my windows temp folder gone out of the blue? Is it possible that my server host company does some maintenance that cleans up the folder? Also, what is the difference between NT AUTHORITYNETWORK SERVICE and servernameNETWORK SERVICE?
View 1 Repliesin one on my page i am using to add the data from popup window to grid view without using the backend means databasethis is my popup window code
[Code]....
[Code]....
I am trying to populate a datagridview control using a stored procedure in SQL Server database. The stored procedure accepts a parameter value.The output is a select * from #temptableoutput . Since the columns of the #temptable can not be seen by VS since they do not exist yet how do I configure the datagridview control to use the yet to be "initialized" columns?I have not found any tutorials on using stored procedures to fill datagridview controls
View 2 RepliesI want to create a temp table to store data in a stored procedure and then then retrive it from the code.
I need to save the data in the begining before it is deleted.And then after the inserts are done I want to update the tblcontactlist by referring to the temp table.
[Code]....
i want fetch data from temp table in sql server stored procedur like below code
[Code]....
primary key is of uniqueidentifier in dataTable
how can i select data into temp table from another database in sql server 2000
View 2 Repliesi just create table simply like this: create table tblDemo
(
PK_intID int primary key identify(1,1),
intHits int not null
[code]...
I have one Store Procedure that generating report ..
For storing the data there , i used many temp. tables. There is many Select Query , little less insert and delete query.
Now if there is huge data around 1 lac in temp table my select query taking to much time and also may be insert and delete query
I added Primary key to all auto Increment Field in temp table. Also defined Clustered index on that primary key as unique Clustered index to improve the performance .
But there is not so much improvement in case of huge temp table.
Right now the whole Store Procedure is taking time to complete around 1.5 days or around 30 hours ..
So i want to increase the performance as much that it completes on nearly 3-4 hours.
have a FileUpload page where the user must upload an image, but what i want to do is when the user Click and Browse then select the image, there is an Image Control which will display immediately the Selected image,Note, the image is not yet uploaded.Question, it this possible? if yes, and i hope so it will, how?
View 13 RepliesI am using MS Chart Control in my Web App,after some time I got the issue "The temp directory in chart handler configuration is not accessible" in Live App,even though my web.Config file is containing every thing related to charts like...
<add key="ChartImageHandler" value="storage=file;timeout=20;" /> under <appSettings>
<add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
validate="false" /> under <httpHandlers>
[code]....
I am working on asp.net 3.5 in C#. In my application I have to Create folder and upload file in that folder, which works fine on my machine. I want help for create folder and upload file in that folder on other machine which is connected in LAN. code for create folder and Upload file on my machine
string FileName = FileUpload1.FileName;
I want to create a folder to store some web controls, so the site structure doesn't have a zillion files in the root.
Except that if I create an ordinary folder, that folder is also visible on the web site. MSDN said you cannot put it in App_Code, and it doesn't really make sense to put it in other special folder like App_Data or App_Theme.
I have a table of user ids that is huge.
I have an array of user ids that I want.
I have two tables that have a foreign user id key.
What is the best way to get this information performance wise?
Ideally in SQL the final result would be somewhat like this (null values if there is no user ID in one table but not the other):
userid table1value table2value
1 null 12
5 123 null
I am doing this in my stored proc. Creating a temp table. Dumping the select results into the temp table and then select the info where the search string is based on the status name info.
because of the temp table, it is taking long to excecute. How can I get rid of the temp table and still seach based on the CurrentStatusName
Create proc [dbo].[usp_GetRequestsInfoOnSearchString]
(
@SearchString varchar(100)
)
as
Create TABLE #Request(
[RequestId] [int] NULL,
[RequestDate] [datetime] NULL,
[RequestText] [varchar](500) NULL,
[CurrentStatusId] [int] NULL,
[RiskLevelId] [int] NULL
)
INSERT into #Request
([RequestId] ,
[RequestDate] ,
[RequestText] ,
[CurrentStatusId] ,
[RiskLevelId] )
SELECT [RequestId]
,[RequestDate]
,[RequestText]
,CurrentStatusName = dbo.udf_GetRequestStatusName(CurrentStatusId)
,[RiskLevelId]
FROM [dbo].[Request]
select [RequestId] as [Request Id]
,[RequestDate] as [Request Date]
,[RequestText] as [Request Text]
,[CurrentStatusName] as [Current Status Name]
from #Request
WHERE ([CurrentStatusName] like @SearchString OR len(@SearchString)= 0 OR @SearchString is null)
As I tested SQL temp table drops every time when sql connection from ASP.NET is closed/open. Is this only way using it, or it can be used depends on ASP.NET session as well? I'd need to access temp table from more separate selects on more different pages on the web site, if it is possible.
View 2 RepliesI had a page to update user picture and redirect user to login page, the problem is when a user re-login, the old picture is still available until user refresh the page.
notes: I have already use <%@ output> but not working with master page and also have used Response.Cache.SetCacheability(HttpCacheability.NoCache) and also not working
here is my code:
Protected Sub btnUpdate_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnUpdate.Click
'Updating User Pic
fuUserPic.PostedFile.SaveAs(Server.MapPath("~ImagesUserPic" & UserID & ".jpg"))
Response.Cache.SetCacheability(HttpCacheability.NoCache)
FormsAuthentication.SignOut()
FormsAuthentication.RedirectToLoginPage("msg=Please login again")
End Sub
what can I do to delete temp internet files to display picture after updating?
I am seeing temp files created in my wesite directory. The files are attributed to a page that I load from a txt file for more info. I beleive when I user clicks on the more info link and I read the textfile into the page it creates the temp file named somthing like this moreinfo.aspx~RF1630b1e.TMP does anyone know a way to clean these up other than a manual task? below is the code I use to read in the txt file
<script language="vb" runat="server">
Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
Dim strURLNAme As String
Dim MyFileName As String
strURLNAme = Request.QueryString("AdultInfo")
' Response.Write(strURLNAme)
If strURLNAme = "adult" Then
MyFileName = "AdultMoreInfo.txt"
ElseIf strURLNAme = "kids" Then
MyFileName = "KidsMoreInfo.txt"
End If
'Open a file for reading
Dim FILENAME As String = Server.MapPath(MyFileName)
'read the file
Dim objStreamReader As StreamReader
objStreamReader = File.OpenText(FILENAME)
'read the entire file into a string
Dim contents As String = objStreamReader.ReadToEnd()
Me.lblNicerOutput.Attributes.CssStyle.Add("text-align", "Left")
'We may wish to replace carraige returns with <br>s
lblNicerOutput.Text = contents '.Replace(vbCrLf, "<br>")
objStreamReader.Close()
End Sub
</script>
<add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:TempImageFiles;" />
is fine for development, but not so good for deploying on IIS. I found a forum post that mentioned you could drop the path altogether, which dumps the temp file(s) directly in the root of my project
Suppose I have a temporary table (Shown below). The table is defined and populated in my stored procedure. After it is populated, I need to go through every row in the table. Here is what I need to do :
Check if Amount2 > Amount1 If Amount2 > Amount1 then set Amount1 = Amount2
It feels a little akward for me to use the temp table.
[code]....
I can join with a regular SQL table fine but this won't work:
SELECT normalTbl.*, tmp.fld1 FROM normalTbl
LEFT JOIN #Temp tmp ON tmp.joinID = normalTbl.joinID
All tmp.fld1 values are shown as NULL even though fld1 contains valid values and the joinID matches the normalTbl (when I call SELECT * from #Temp). If I do the same exact thing with a regular table, fld1 shows the correct value. What am I doing wrong?
I create a pdf, then I set NavigateUrl with the path. The file is opened, but if I re-create it, ie open the temp file pdf, don't reload the new.. Only after some minutes (I don't refresh the page) ie re-download the new pdf..How can I force to open always the file on the server?
View 2 Replies