|
I would tend to use my isp's mail server instead of trying to make my own work.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Dalek Dave wrote: Failure to connect to remote server
{"No connection could be made because the target machine actively refused it 127.0.0.1:25"}
I have tried changing host to Dim smtp As New SmtpClient("localhost") but this does nothing.
This tells me that your machine isn't running an SMTP server, or there is no hole in the firewall allowing connections on port 25. Either way, you really can't use a server on your machine because no SMTP server is going to trust your machine and forward its mail. You have to use either your corporate mail server or your ISP's.
|
|
|
|
|
Thanks for the pointer, I got hold of them this morning (I was writing app last night in bed!) and have put there smtpclient details in.
Ta Da! It works.
I think it is a PITA that I cannot run localhost.
You were right that Port 25 won't let it in, but speaking to the Tech Guy from our ISP this is because all the arses out there spamming and mass mailing have ruined it for the rest of us! (Which we all knew anyway, but he ranted for about 5 minutes on it anyway!)
Still, nice to get a resolution.
------------------------------------
"I am always serious about what I do, not necessarily about how I do it."
Tom Baker
|
|
|
|
|
I've got a problem that I can't figure out. I have the below section of code running over and over again (probably 10k-15k times). The variables are as follows:
Wd = a single word passed to the function for checking
SkipList = a list of string patterns to use 'like' with (i.e. "##.#[a-z]") - currently 570 strings.
ct = a counter I just put in to make sure it was running through the whole list (it is).
If SkipList.Contains(Wd) Then
Return Nothing
Else
For Each s As String In SkipList
ct += 1
If Wd.ToLower Like s Then
Return Nothing
Exit Function
End If
Next
End If
The code runs, but at seemingly random intervals it runs slow. I put some code in my function to find out where the overall application was running slow and narrowed it down to this block. The strange thing is that it runs through the whole SkipList in 0 milliseconds most of the time, but here and there it comes up with 15.627 milliseconds. The really strange thing is that it's not in the same place every time. I can use the same function, the same list of words (in the same order), and the same SkipList, and the 15.627ms comes up on different words every time I run it, and it's always exactly 15.627ms.
Can anyone tell me what's going on? Or hints as to what else I can do to speed this up?
|
|
|
|
|
Hi,
first of all your observations lack precision. You are relying on the system clock, and that one only advances every 15 milliseconds on your system; if you want to know more about that, read my timers article.
To get more precise measurements, use a better timer (a StopWatch in VB.NET; or a MultiMedia Timer).
Rather than observing say ten times 0 msec, once 15 msec; you will then see say eleven times 1.4 msec
BTW: what is the Exit Function doing in your code?
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
The code isn't taking exactly 15.627 milliseconds every time it "fails". Unless you're using the high resolution timers, this is the minumum resolution of the timing method you're using.
The problem you have is that you're using 570 different compares against a single word. You need to turn this around and make it so you can do a lookup of the one word on a known list, if at all possible.
Another possibility would be to pre-test the single word to narrow it down to a small number of filters that might apply. If you have a word that starts with a letter, there's no sense in testing a bunch of rules that all start with a number.
But, in the end, it sounds like your code is being stopped by the Garbage Collector while it does it's work. Normally, the GC will stop all threads in your process, walk the object graph looking for things to collect, do it's cleanup work, then resume your threads. Depending on the app, this can take a couple dozen milliseconds, making it look like your code hung for a brief time.
Why is thing happening?? Well, since you're obviously parsing out individual words, you're creating String object after String object, one for each and every word you test. These String objects are dropping out of scope at some point, and the GC has to spend time cleaning them up every once in a while.
|
|
|
|
|
|
I have a small app for a site manager, (so it has to be simple, right?).
I require a Date, Supplier and Load to be sent to another manager.
I have done this as a Form with a DateTimePicker and two ComboBoxes.
Once the selection is made from these boxes, hit the SEND button and the data is to be emailed to the other manager.
I do not want to go through outlook, just email the data.
I have SD1 as Date, SD2 and SD3 as Text.
Is there some way of just sending SD1, SD2 and SD3 to a single fixed address in as few lines of code as possible and without opening outlook?
(I want the site manager to just choose and click).
Thanks
------------------------------------
"I am always serious about what I do, not necessarily about how I do it."
Tom Baker
|
|
|
|
|
System.Net.Mail namespace has what you're looking for. Documentation[^]
|
|
|
|
|
There are other ways but which ever way you choose you will need access to an SMTP server (well at least I think you do!). Do you have a server with IIS installed? Because there is a virtual SMTP server component with IIS.
If you have access to an SMTP server look at System.Net.Mail. Very simple to send emails with very few lines of code.
|
|
|
|
|
Hi,anybody knows where i can find a source code to motion detection in Visual Basic 6 for a IP axis cam?
Thanks
|
|
|
|
|
|
Since VB6 is long since dead, and doesn't do a good job of image processing, I seriously doubt you're going to find any code for this in VB6. It's more likely that you would find components written in other languages, like C++ or C#, that do a much better job of processing images with much better performance.
|
|
|
|
|
|
from Bob
or in other words, what are you trying to do, where is your code that fails, how does it fail, whats the error etc etc
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
no,i want to know whether i can add reponse.redirect url in vb6.0 or not like in asp.net ,if yes then plz provide me the sample code.
thanks
prem
|
|
|
|
|
What are you using in VB6 to write your web-based app?
|
|
|
|
|
In the time its taken you to post this question you could have tried it and found out, so why don't you?
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
hai all,
i am new to .net.is it possible to print datas in horizontal in crytal report.i want to print names in horizontal.
for ex,
i have one tablename as student.
table student contain 3 columns are name,age,place.
values are:
name age place
dinesh 22 salem
ramu 25 coimbatore
sekar 26 trichy
balaji 28 chennai
i want to print names in horizontal in crystal report.
in my crystal report,
names are printed in vertical like below in crystal report
name
dinesh
ramu
sekar
balaji
but i want to print names in horizontal like below
name:dinesh,ramu,sekar,balaji
how to print names in horizontal?
|
|
|
|
|
Use Cross Tab to print Data Horizontally.
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
Hi All,
I am changing Trial Days Period of my software using Registry.Every thing is right but when i m running application using GUEST account.Then it's not working properly because HKEY_LOCAL_MACHINE not accessable by Guest Account.
So Please Help me how to set Trial days for All Users in XP and Vista Configuration.
Thanks
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
Unfortunately, the Guest isn't allowed in that part of the registry. There are two alternatives available;
- Use some other account with more privileges than the Guest account
- Store your data in some other place
Sorry
I are troll
|
|
|
|
|
Pls Suggest me which area is sutable for Saving information.
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
I don't know if a Guest is allowed to use the internet, otherwise it would probably be best to store it remotely.
See, if a guest can write information to your system then anyone (since guest is anonymous) could start writing to your computer, effectively filling up all your harddisk-space. I doubt that there is a location on your system where the guest-account is allowed to write, but I could be mistaken - you could check with a network-administrator to verify this.
I are troll
|
|
|
|
|
Guest is allowed to use the internet.My application is for local machine not for web purpose.If Remotely means any Disk area then please Suggest me where??
mailto: anubhava.prodata@gmail.com
|
|
|
|