URI Format Not Supported. [modified]
-
Well, spamming the whole site is just rude. Silverlight is the right forum. As I said in the outset, this has nothing to do with ASP.NET. The silverlight forum might be a little slower, you might wait a bit longer for a reply.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
I am Sending a Mail with attachemts for this I have Made A WCF Which works fine when I give the Network path of the file. but I need to host It And when I try to give a URL path It Says. URI format not supported please Help My Code in WCF
public List funSendMail(Mailcls m) { List result = new List(); try { /* Create a new blank MailMessage with the from and to adreesses*/ System.Net.Mail.MailMessage mailMessage = new System.Net.Mail.MailMessage(m.Sender, m.Receiver); /*Checking the condition that the cc is empty or not if not then * include them */ if (m.Cc != null && m.Cc != string.Empty) { mailMessage.CC.Add(m.Cc); } /*Checking the condition that the Bcc is empty or not if not then * include them */ if (m.Bcc != null && m.Bcc != string.Empty) { mailMessage.Bcc.Add(m.Bcc); } //Ading Subject to the Mail mailMessage.Subject = m.Subject; //Adding the Mail Body mailMessage.Body = m.Body; /* Set the properties of the MailMessage to the values on the form as per the mail is HTML formatted */ mailMessage.IsBodyHtml = true; /* Bigining of Attachment1 process & Check the all file for a attachment */ if ((m.AttachfilesPath != null) && (m.AttachfilesPath.Count > 0)) { foreach (string s in m.AttachfilesPath) { result.Add("Attaching File : " + s); System.Net.Mail.Attachment attach = new System.Net.Mail.Attachment(s); /* Attach the newly created email attachment */ mailMessage.Attachments.Add(attach); } } /* Set the SMTP server and send the email with attachment */ System.Net.Mail.SmtpClient smtpClient = new System.Net.Mail.SmtpClient(); // smtpClient.Host = emailServerInfo.MailServerIP; //this will be the host in case of gamil and it varies from the service provider
Hi, Have you tried this .. this is not my code .. I got it from net...
Dim client As New WebClient Dim strURL As String = "http://www.someurl.com/sendfile.php?file=myfile.gz" Dim strFilename As String = Server.MapPath("myfile.gz") client.DownloadFile(strURL, strFilename)
-
Hi, Have you tried this .. this is not my code .. I got it from net...
Dim client As New WebClient Dim strURL As String = "http://www.someurl.com/sendfile.php?file=myfile.gz" Dim strFilename As String = Server.MapPath("myfile.gz") client.DownloadFile(strURL, strFilename)
-
-
server.mappath is being used to generate a local path(local to the server) .. u can use absolute path.
-
Dim client As New WebClient Dim strURL As String = "http://www.someurl.com/sendfile.php?file=myfile.gz" //Dim strFilename As String = Server.MapPath("myfile.gz") Dim strFilename As String = "c:\inetpub\wwwroot\my_app\images\myfile.gz" client.DownloadFile(strURL, strFilename)
i wanted to suggested this workaround .. as server.mappath is not working. -
Dim client As New WebClient Dim strURL As String = "http://www.someurl.com/sendfile.php?file=myfile.gz" //Dim strFilename As String = Server.MapPath("myfile.gz") Dim strFilename As String = "c:\inetpub\wwwroot\my_app\images\myfile.gz" client.DownloadFile(strURL, strFilename)
i wanted to suggested this workaround .. as server.mappath is not working. -
-
Well.. im not aware of what wcf supports .. but there must be some way to find the current directory's path
-