Showing posts with label domain. Show all posts
Showing posts with label domain. Show all posts

Saturday, March 31, 2012

System.Drawing.Image.FromFile from URL?

can i create a system.drawing.Image from a url. using
http://www.domain.com/image.jpg instead of c:\image.jpg. ?
thanks!No, but you can use the WebClient or WebRequest classes to bring the
bytes to the local computer and then create the Image obect.
HTH,
Scott
http://www.OdeToCode.com
On 18 Sep 2004 09:23:29 -0700, jcharth@.hotmail.com (Joseph) wrote:

>can i create a system.drawing.Image from a url. using
>http://www.domain.com/image.jpg instead of c:\image.jpg. ?
>thanks!
As scott mentioned, you do not have any method that can directly read the
image from URL.
Use webclient and read it into a byte[] using DownloadData
then you Image class to load it
Regards,
Hermit Dave
(http://hdave.blogspot.com)
"Joseph" <jcharth@.hotmail.com> wrote in message
news:2f2b8b0b.0409180823.2a6f2f18@.posting.google.com...
> can i create a system.drawing.Image from a url. using
> http://www.domain.com/image.jpg instead of c:\image.jpg. ?
> thanks!

System.Drawing.Image.FromFile from URL?

can i create a system.drawing.Image from a url. using
http://www.domain.com/image.jpg instead of c:\image.jpg. ?
thanks!No, but you can use the WebClient or WebRequest classes to bring the
bytes to the local computer and then create the Image obect.

HTH,

--
Scott
http://www.OdeToCode.com

On 18 Sep 2004 09:23:29 -0700, jcharth@.hotmail.com (Joseph) wrote:

>can i create a system.drawing.Image from a url. using
>http://www.domain.com/image.jpg instead of c:\image.jpg. ?
>thanks!
As scott mentioned, you do not have any method that can directly read the
image from URL.
Use webclient and read it into a byte[] using DownloadData
then you Image class to load it

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
"Joseph" <jcharth@.hotmail.com> wrote in message
news:2f2b8b0b.0409180823.2a6f2f18@.posting.google.c om...
> can i create a system.drawing.Image from a url. using
> http://www.domain.com/image.jpg instead of c:\image.jpg. ?
> thanks!

Monday, March 26, 2012

System.Net.Mail

I need to send the email with an email address that is not in my domain, but it will not do that. Can this be done

Yes. But your server may not accept it. Tell us how you know "it will not do that."

Jeff


Hi,

The machine that is running your application and sending emails must be added to the list of the allowed hosts on the smtp server you are trying to use as a relay - of course if that smtp server has restricted access.

System.net.mail

Simple vb code, right?

Dim objSMTPAs New SmtpClient("mailserver.domain.com", 25)Dim objMsg asNew MailMessage("To@dotnet.itags.org.domain.com","from@dotnet.itags.org.domain.com","test","body testing")objSMTP.Send(objMsg)

When I run the above code, I get an authentication failure. I've tried using a non-default authentication like this:

Dim objMsgAs New MailMessage("from@dotnet.itags.org.domain.com","To@dotnet.itags.org.domain.com","Test","Body of message. Testing 1 2 3")Dim objSMTPAs New SmtpClient("mail.server.com") objSMTP.UseDefaultCredentials =False Dim objCredsAs New NetworkCredential objCreds.UserName ="username" objCreds.Password ="password" objSMTP.Credentials = objCreds objSMTP.Send(objMsg)
But I still get the same error. How do I give the mail server my username and password?

what about putting settings in the configuration file?

 <system.net><mailSettings> <smtp deliveryMethod="network"> <network host="mail.domain.com" userName="username OR DomainEmail" password="Password" defaultCredentials="true"/></smtp></mailSettings> </system.net>


have you tried like this ?

http://www.systemnetmail.com/faq/4.2.aspx

it's only slightly different

objSMTP.Credentials = New NetworkCredential("username", "secret")