|
hi,
check your spam folder, and your mail filters. It may actually work...
|
|
|
|
|
My guess is the server filters and rejects logging in and sending mail from random applications.
See: http://www.eggheadcafe.com/articles/20030316.asp*[^]
*Note: sending email without a SMTP server almost ALWAYS results in the mail being marked as spam. Though YMMV
-Spacix
All your skynet questions[ ^] belong to solved
I dislike the black-and-white voting system on questions/answers.
|
|
|
|
|
Hello,
i have a pc in a location A and a pc in a location B and i need to send to a server some files created by these 2 Pcs
what is the best method to do that?(sending these file to the FTP of the server or...
PLZ i need a help
dghdfghdfghdfghdgh
|
|
|
|
|
TCP/IP networking
-Spacix
All your skynet questions[ ^] belong to solved
I dislike the black-and-white voting system on questions/answers.
|
|
|
|
|
Hi m trying to copy image file from one location to other as below in openDialog box C#.net
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
string filename = System.IO.Path.GetFileName(openFileDialog1.FileName);
string fname = Application.StartupPath + "\\Temp\\" + filename;
File.Copy(openFileDialog1.FileName, fname, true);
}
I get Exception as
Unknown software Exception(0xe0434f4d) ocurred in application at location 0x7c59bcb1
It works for all files except for .bmp file
Ne help for it?
|
|
|
|
|
You should trap the exception in a Try Catch block and see what the actual error is. That exception's generic and it could be anything.
|
|
|
|
|
I have trapped the exception in try catch block.
|
|
|
|
|
The exception has a Message member. What is the message when you get this exception?
|
|
|
|
|
I don't see anything obviously wrong, so the next step should be to get more information about the bug.
See what the values are for OpenFileDialog.FileName and fname. If they look ok, put a try/catch around this, and display the message on the exception.
|
|
|
|
|
I have debugged the code i get proper values in filename and fname
|
|
|
|
|
Hi,
did you bother looking at the values of filename and fname?
IIRC OpenFileDialog.FileName returns a file path, so your fname would be garbage.
FYI: (sub)folders of a StartupPath may be write-protected.
You should consider using Environment.GetFolderPath()
|
|
|
|
|
I have debugged the code i get proper values in filename and fname.
Folders and file have all permissions
|
|
|
|
|
More of a FYI than an answer , but you should always put the checked for value first:
if (DialogResult.OK == openFileDialog1.ShowDialog())
{
string filename = System.IO.Path.GetFileName(openFileDialog1.FileName);
string fname = Application.StartupPath + "\\Temp\\" + filename;
File.Copy(openFileDialog1.FileName, fname, true);
}
that way if you mess up and only type one = you'll get an error during compile.
This show what I mean:
int num = 3;
if (num = 4)
{
} vs
int num = 3;
if (4 = num)
{
}
-Spacix
All your skynet questions[ ^] belong to solved
I dislike the black-and-white voting system on questions/answers.
|
|
|
|
|
asma_panjabi wrote: I get Exception as
Unknown software Exception(0xe0434f4d) ocurred in application at location 0x7c59bcb1
It works for all files except for .bmp file
Ne help for it?
And if you try another .bmp, same effect? Maybe the BMP is malformed or something.
Does the Temp directory exists?
|
|
|
|
|
Other bmp files work properly even the temp folder exists only some bmp files dnt work
|
|
|
|
|
This is the error m getting
System.UnauthorizedAccessException: Access to the path "C:\Documents and Settings\abc\Desktop\Debug\Temp\mani.bmp" is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String str)
at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite)
at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite)
|
|
|
|
|
All,
I would need to make an in memory copy of several datagridviews. Depending on a selection I need to check whether or not the list should be loaded from DB or (if already in memory) from memory.
Any good way to make a deep copy of your datagridview?
I can't believe you have to do it cell by cell... right?
thanks.
|
|
|
|
|
you can copy the dataTable that youve bound to the DataGridView, assuming thats where the data came from...
DataTable myNewDataTable = (DataTable)dataGridView.DataSource;
hope that helps
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
My bad, I forgot to mention that the source is loaded with an ancient ResultSet and the datagridview is built by setting the values, not via a DataTable or DataSet (which have Clone and Copy methods...)
thanks.
|
|
|
|
|
then ehy not build a DataTable with your result set and then bind it to the DataGridView?
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
more or less the road I'm heading to right now. thanks.
|
|
|
|
|
any time
good luck!
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
Anyone know how I can validate the Add method of a List<> property I have on a class short of overriding the Add method with a custom class?
e.g.
private List<string> stringList
public List<string> StringList
{
get
{
return stringList;
}
set
{
// Want to do validation here but isn't fired by Add method....
}
}
Thanks for any help on offer....
|
|
|
|
|
You need to create your class which wraps List<<>. Write your own "Add" method, do validation there before you add to underlying list.
RichardContact-1 wrote: set
{
// Want to do validation here but isn't fired by Add method....
}
This won't fire. When you call YourObject.StringList.Add() , get is executing, not set. get returns List<> instance and you add item to that. If you were doing YourObject.StringList = new List<string> , set will get executed.
|
|
|
|
|