Hi, I have an aspx page which takes in a htmlinputfile and puts this into an object which is put on the session for the next page. The next page takes this off the session and saves the file. This works grand when I run it in debug mode in visual studio but when I copy it over to IIS IM getting the following error when I try to save the file Exception Details: System.ObjectDisposedException: Cannot access a closed file. Any ideas? Thanks in advance
niceguyeddie1999
Posts
-
Cant save a file -
C# AppHi, I have an aspx page that I want to accept 2 files. These two files in turn I wish to be parameter to a C# console App on the same webserver. Whats the best way of going about this? Also the main function Program.cs returns an int depending on results etc, how can I retrieve this? Thanks in advance,
-
Aspx page calling C# AppYeah, thats it
-
Aspx page calling C# AppHi, I have an aspx page that I want to accept 2 files. These two files in turn I wish to be parameter to a C# console App on the same webserver. Whats the best way of going about this? Also the main function Program.cs returns an int depending on results etc, how can I retrieve this? Thanks in advance,
-
Console AppHi, Im developing a console application in visual studio and I just want my project to produce a .exe like in C. Is this possible? I can run it from the start..debugging thing but I want the exe. Also how do you run from VS and pass in command Arguements? Thanks in advance
-
Difference between two tablesSorry I should have mentioned the two DB's are actually running on 2 different servers
-
Difference between two tablesHi, I have two identical tables in 2 seperate databases. 1 is the "central" DB and its contents can change. Basically I want to write a poece of code to run periodically to ensure the contents of table 2 are up to date with that of table 1. Id imagine this is a relativaly common task so I was wondering are there any smart ways of doing it or any existing code knocking around? Thanks in advance,
-
Password TextboxesNo need to get smart
-
Password TextboxesAre you sure? Im using mozilla and have entered passwords on other web pages and its never happened before
-
Password TextboxesHi I have a problem with password textboxes. I want someone to change their password, so I have a form with 2 textboxes and a button. The textboxes textmode is set to password. Heres the thing though, when I press my submit button, I get this pop up saying "Please confirm the user you wish to change password for" which I never asked for. Not only do I not want it, but even if i did, the list of users to change passwords for are wrong, so how can I turn this off? I never asked for it in the first place. Thanks in advance,
-
ASCII related problemsHow do you mean regular expression? You mean create a set of characters I dont want?
-
ASCII related problemsHi I have a textbox and I want to only accept ASCII characters. So if I enter something like ╥ it will fail. When I convert it to ASCII they get converted to question marks, which is no good, cos I cant just remove question marks. Basically I want to know if there are any things entered outside the ascii range. Any ideas? Thanks in advance
-
HtmlinputfileHi, How do I programmaticaly set the cssclass of a htmlinputfile control? Thanks in advance, Stephen
-
FTPhow do you do a put through IE?
-
FTPHi Thanks for your response, I tried using this but Im getting problems. I can connect to the ftp server and list directory ok, but when I try to upload a file I get "550 : Access is denied". The credentials I am using are the exact same as what I use when using all other ftp clients. Is there something I am missing? This is the code: FtpWebRequest ftpRequest = (FtpWebRequest)FtpWebRequest.Create(ftpLocation); ftpRequest.Method = WebRequestMethods.Ftp.UploadFile; ftpRequest.Credentials = new NetworkCredential(FTPUsername, FTPPassword); ftpRequest.UseBinary = true; StreamReader sourceStream = new StreamReader(pathOfFileToBeFTPd); byte[] fileContents = Encoding.UTF8.GetBytes(sourceStream.ReadToEnd()); sourceStream.Close(); ftpRequest.ContentLength = fileContents.Length; Stream requestStream = ftpRequest.GetRequestStream(); <-----Throws WebException
-
FTPHi, Im using c# to develop a web application and basically I need to ftp files over to a server. Is there any functionality in c# to do this or will I have to use an external library and if so any recommendations? Thank in advance Stephen
-
C# Stored ProcsThats the one, thank you
-
C# Stored ProcsSorry I dont know what you mean by do a select @RC
-
C# Stored ProcsHi, I have a stored procedure and it looks like the following ALTER PROCEDURE USP_NCUInsertContentCodeTest @var1 int, @var2 int etc AS DECLARE @RC int //Do stuff RETURN @RC I know how to execute the procedure in c# but I cant figure out how to get the return value. I know if I declared the @RC before the AS I could declare it as a parameter with parameterdirectio = output etc but I cannot change the stored procedure. How can I do it? Thank you in advance, Ed
-
SelectHi, I have the following SQL: select a.codeid, b.codeidalias from tblcodes a left outer join tblcodeslookup b on a.codeid = b.codeid where a.codeid not in (select codeidalias from tblcodeslookup) and it produces the following kind of data codeid codeidalias 1 null 2 3 2 4 2 5 6 7 6 8 6 9 10 null 11 12 11 13 14 null if you can see the pattern. I have been trying for hours to modify it but i cant . Basically, of the codeids that appear more than once, I just want the first appear, ie. 1 null 2 3 6 7 10 null 11 12 14 null Can anyone help? Thanks in advance Eddie