I need to create temp file on the clint side So, i read that files can be created on the folder of internet temp file. how I can do that?how I can get the path of the temp folder?I need VB code
I 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 have static content like html,css javascript stored in DB. when a user requests for these i create a temp file in virtual directory and return the url. My web app is hosted on a IIS server. On some systems on creation of a file my IIS Application pool crashes and restarts. If i disable file-monitoring though the problem is resolved, but i dont have this luxury when i am deplying at the client end. Is there any way by which i can avoid app pool crash during file creation? If not is there any way by which i can serve static content like html, css, images, xml and js without creating temp files. I would need a generalized way of handling all these data types.
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>
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
That's maybe a strange subject but it was the best I could come up with. The thing is I need to upload a set of files from a web site into our CMS. I know how to do this via a file upload control but is it possible to do this when I've instead got URL's to the files? They are pictures by the way. Is it possible to get a file located on another server into a Stream?
in my project i would like to save pdf files in database, how to save pdf files in database ? along with that i would like to create create a search page to search for pdf files with PDF file names , how to accoplish these things
i have silverlight control in web page. and at every time i page load so 'New.xml' creating. but every time its show data when web load first time. becasue its store into Internet temporary files and reload previous file not new created. as other file like image and audio files. how can remove files from temprary folder or load new files? or any other method to load xml or other files ?
Actually we have series of images named 1.jpg, 2.jpg, 3.jpg, 4.jpg & 5.jpg.
when i delete 2.jpg, then i rename 5.jpg with 2.jpg. But all this happens on server & on page load it is displaying 2.jpg from temporary files, not from server.
Solution is in two ways:-
1. either I will make page not to save any images on client's system(in temporary internet files).
2. or i will have to delete all images from temporary internet files.
I have a problem only in IE where my JQuery filetree cannot be refreshed unless the browser is closed, or temporary internet files is deleted via Tools -> Internet Options
Anyone know of a way so that this particular page never gets cached into temp internet files?
I've tried putting this in the header
[Code]....
As described here: [URL]
Nothing seems to work :
Preferably a solution for both IE8 and IE6 (yes i still have to support that goddamned browser)
Currently our external customer submit all other data through our public web site, but submit some artifacts (.coc, pdf...) through email, then our administrators save those files come from email to our internal server. This is not efficient, because we cannot identify immdeately if our customer submitted their required documents before our administrator saved them to the server. I am seeking a technology that external customer can upload files through the public website toan intranet server that the external customer would not notice they are accessing intranet server.
I have used a external js file for a upload operation in my page.. once the file get loaded in temporary folder, it gets loaded from there even if new changes are made the old version that exist in temp folder gets loaded... i have writtenResponse.Cache.SetCacheability(HttpCacheability.NoCache); on my page But it still loads the js file in cache. When i cleared the temporary files manually it works fine...But i cannot ask my client to clear temp folder,,,Is there any solution to load js file not from the cache, ie reload every time page is loaded...
i'm creating a cookie with an expiration of 12 hours from now. when i run my solution locally and go into C:Users..AppDataLocalMicrosoftWindowsTemporary Internet Files and look at the expires property of my cookie the date and time are correct. However, when I deploy this to our web server and go to the website i notice the cookie that got created for it has an expiration date of 2 years from now, minus a day. So the cookie should be set to expire on 12/29/2010 8:00 PM for example instead shows 12/28/2012 8:00 PM. Here's the code i'm using to create the cookie, pretty basic. And yes, the date on the web server is correct. I really want the cookie to expire in 12 hours, not 2 years.
I manage a large asp.net site which has previously been converted from static html site to asp.net. For several reasons (mainly SEO) we decided not to rename all the files to .aspx back when we originally converted the site. This was very easy to do by simply adding the buildProvider and httpHandler to the web.config.
Now I am upgrading the site to use Asp.net WebPages with Razor cshtml files. I can rename all the files if necessary, and use url rewriting to make the urls stay the same, however it would be much easier if I could just configure the web.config to tell it to parse .html files as if they were .cshtml. I have searched around quite a bit, and could not find anything equivalent to the PageHandlerFactory for razor pages. It appears as though it is just an internal mechanism in the .net 4.0 ISAPI handler.
The site is currently running on Windows 2003 server and IIS 6. We will be upgrading to 2008/IIS 7.5 in the near future, but I'd prefer not to wait for that. Is there any way to get the .html files to be parsed by razor as if they were .cshtml files?
I basically want to do a reverse 'search in all files', so it returns files that don't contain "keyword".Does anyone know how to do this, or the regex used, etc?
I have an application that uses resource files to display items in multiple languages. My app uses quote a lot of javascript and the alerts need to display in the local language. To do this, I have created an http handler which will read the keys and values of the culture-specific resource file and write them to a JSON array which is then embedded in the page in a script tag, the messages can then be accesses using, for exmaple:
Message.Error (en-GB = "Error", fr-FR = "Erreur")
The messages http handler works great in development, however when I run the application on a test server, I get the error: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Resources.Alerts.resources" was correctly embedded or linked into assembly "App_GlobalResources.b0n9j90e" at compile time, or that all the satellite assemblies required are loadable and fully signed. The code that I use to acccess the resource file is:
Where Resources.Alerts is the type that contains my multi-lingual definitions. The build action for the Alerts.resx file is set to "Embedded Resource". Any ideas why this works locally but not on my test server, am I missing something?
Following the first site, it had worked but when I´ve moved the pages and files to other folders and set the web.config file on this folder, now it won´t work at all!!!
The file is an *.swf object. I did put the asapi.dll to map the extension on the website root, I´ve put the
[Code]....
on the web.config new folder and on the web.config website´s root.
It won´t work!!! I can access the file directly!!! on the web.config of the folder that contains the file, there is a <deny users="*" /> line.
I am not sure this is the forums but I dont know where to write this and this is an EMERGENCY ::I had windows 2003 server. on C: and I have installed windows 2008 server.I had SQL server installed and all of the database files stored inside c:program filessql server....PROBLEM is that after I installed 2008 server I can see 2 folders of program files one for x86 and the other for 64 bits.
I have a form with 10 file inputs. They can contain 10 random files with random sizes. If I send these files to ASP.NET server with this code:
var count = HttpContext.Current.Request.Files.Count; var TotalSize = 0; for (int i = 0; i < count; i++ ) { HttpPostedFile postedFile = HttpContext.Current.Request.Files.Get(i); TotalSize += postedFile.ContentLength; }
And as you can see I didn't save the files on the server, will this code just calculate the summary of files without need to receive the whole file from the client (And therefore it would be very fast)?
I am trying to open different types of files that I have uploaded on my sql server database. I would like to display all the list of files in Gridview. When user click the link it should open download dialog box and should be able to open its particular applications such as word, excel, browsers etc.
I need to populate a database (SQL Server) with some data from a templated excel document.Here are some approaches:
A) User upload a file.xls or file.csv that the server reads, checks and updates the database (cons:the uploaded file might be too big. file.* needs to be in correct format)
B) User downloads a tool.exe to read and upload file.xls (cons: maintenance of the tool.exe)
C) Use of a web service in excel? (don't know how to do it) but this article might give you a hint
Which one is the best to use? Are there any others?