Web Forms :: Display File Is Locked Error Message When File Is Used By Another User
May 7, 2015
after i can copy my file to another folder i realised that if this webapplication is used by multiple users at once, then some users are going to get locked out because each one is trying to copy those files.
so how do i tell the user thats trying to use a file to wait untill the file is available.
I am trying to configure my web application to send emails to my email address in case of any error . Below is my coding in the web config file, I am following example from a book cuase I AMM A nOVICE TO VISUAL STUDIO AND .NET AND C#. THE NAME OF THE BOOK IS ASP.Net E-Commerce in C#. I am not sure what to put in for the MailForm value since the book did not say could someone tell me .
In my other configuration file under the App_Code folder I have this coding Below:
I've add MSChart to a webpage and I'm also using a Survey page I got from 4GuysFromRolla (http://www.4guysfromrolla.com/articles/061604-1.aspx). Both work on my development machine but when I move them to my hosting site there are issues.
With MSChart page the chart is not displayed although it's included the Page Source code: src="/ClubInformationTracking/ChartImg.axd?i=chart_3d90c53b0f844807a2491a1d79a636a1_0.png&g=75fecf0f14cf4121b623691d383263aa" alt="" style="height:300px;width:700px;border-width:0px;" />
And when I try to open the Survey page I get this:Parser Error Message: Could not load file or assembly 'sstchur.web.survey' or one of its dependencies. The system cannot find the file specified.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'sstchur.web.survey' could not be loaded.
WRN: Assembly binding logging is turned OFF.To enable assembly bind failure logging, set the registry value [HKLMSoftwareMicrosoftFusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.To turn this feature off, remove the registry value [HKLMSoftwareMicrosoftFusion!EnableLog].
The Hosting site is using Version 4.0 and the dll needed for the survey is in the BIN directory.
When I moved my files to the hosting site I had to change every instance when I referred to a file from: "~/FileName" To "FileName"
I've tried all of the "fixes" I could find for the MSChart that involved changes to the web.config file but because of the error messages associated with the Survey page I'm guessing this is the issue.
I'm uploading an excel file and viewing it in a grid. But if I need to upload the file again in a couple of minutes I get an error that the file is being used by another process, so I cannot upload the file again. The file is always the same name.
I have standard asp.net file upload control on a page. If a user try to upload large file they get all the cryptic error messages like page not found etc.I dont want them to be able to upload large files, but still want to show gracefull error message saying that file is too large to upload or something like that. Is there any way to do that?
I have created an application which runs fine in VS2010.Now i am trying to host that application using inetmgr.When i try to browse the page from inetmgr content view then i get the "Parser Error Message: Could not load file or assembly 'System.Web, Version=220.127.116.11, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified".If i browse the page from VS i am able to do it.I am not able to host the app. may be the reason is the above stated error.
On this page it generates a Excel sheet and allows user to download that. Even though there is a certificate error (trusting issue) it works fine with Firefox.(We can add the exception) But as shown below it does not work properly on IE (both 7 & 8) Is there any settings we can do on both client side or Server side. (I have turned off security for IE on server)
I have some pdf files that get attached to emails and are emailed out through a web application. Sometimes this causes the PDF files to get locked and I cannot delete them from the server (even after the email has gone out). I get the message "The process cannot access the file 'D:myfile.pdf' because it is being used by another process".
Below the code which should make the relation to the resourcefile en specify the error when the field is left empty.
when I save the file that is returned by Handler and try to open it I get the following message:"The file you trying to open, 'Users.xls', is in a different format than specified by the file extension. Verify that the file is not corrupt and is from a trusted source before opening the file. Do you want to open the file now?" How to fix this? Here the code of the handler:
Compilation Error Description:An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.Compiler Error Message: CVT1106: cannot write to file
An error occurred during the processing of a configuration file required to service this request. review the specific error details below and modify your configuration file appropriately.Parser Error Message: Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
I have a web page in my project that views a selected pdf file. The problem is the file stays locked with the process w3wp.exe which I assume is the adobe file reader or something. How I can release this process after viewing it? Or another way of viewing it without locking the file?
Here is how I am doing it:
Dim File1 As String = System.Configuration.ConfigurationManager.AppSettings("Report") Dim R1 As String = Page.Request.QueryString("r") If R1 <> "" Then Dim path As String = File1 & R1
I've just got an error message that was somewhat unexpected:
I've got an ASP.NET website that has abotu 10 projects makign it up which are compiled into DLLS and in the bin directory. ReportingContents is one of these projects. In the past I have had success in copying over a new version of the files (dll, pdb and xml) to the bin directory and recycled the app pool and it just picks up the new version on its own. This time I thought "I shouldn't have a debug version on the site" so I built as release and just copied up the dll and xml files and asked our deployment people to remove the pdb.When I was told it was all done I tried to access the site and got the above error message.The thing that surprises me is that the assembly it mentions is "Delete ReportingContents" and I don't know where the "Delete " might have come from in there.
Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'wamsilverlight.Web.Wam'.
Source Error: [Code]....
Version Information: Microsoft .NET Framework Version:2.0.50727.4952; ASP.NET Version:2.0.50727.4927
All of the following have been tried over and over again:
1.) Delete all existing .dlls
2.) Delete MasterPage File and recreate it.
3.) Delete MasterPage perform a clean rebuild then recreate
4.) Delete web.config file and recreate
5.) Delete web.config file perform a clean rebuild then recreate
6.) Destroy the entire project and start from scratch
7.) Before any of these steps were taken the project was built with Ctrl+Shift+B and again with F5
8.) Checked all of the namespaces to make sure nothing was conflicting
9.) Checked IIS7 to see which .NET Framework was being used and it is all listed under 2.0 and later at one point even trying to swithc it over to .NET 4.0
The problem is rather persistant, annoying, and frustrating and I would truly love to acquire some input on correcting this matter,issue occured out of the blue one minute working the next minute it errors out.
I have a page where users can upload an excel file and it is read into our system. I am using the Jet.OLEDB.4.0 provider to read the files. I access the file one time to read out the header names and then allow the user to select which field each column will be read into on import. For some reason after this read the file is locked and the next time I try to access it to do the data import I get the "File in use" message. Each time I open a connection it is closed so I am not sure why the file is being locked.