Here is the trace:
Server was unable to process request. --Invalid mail attachment
'g:\\BVAN025'.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.
Exception Details: System.Web.Services.Protocols.SoapException: Server was
unable to process request. --Invalid mail attachment 'g:\\BVAN025'.
Source Error:
Line 148:
<System.Web.Services.Protocols.SoapDocumentMethodA ttribute("http://tempuri.org/SubmitEFTFileByMail",
RequestNamespace:="http://tempuri.org/",
ResponseNamespace:="http://tempuri.org/",
Use:=System.Web.Services.Description.SoapBindingUs e.Literal,
ParameterStyle:=System.Web.Services.Protocols.Soap ParameterStyle.Wrapped) _
Line 149: Public Function SubmitEFTFileByMail(ByVal pStrMessageBody
As String, ByVal pStrAttachment As String) As String
Line 150: Dim results() As Object =
Me.Invoke("SubmitEFTFileByMail", New Object() {pStrMessageBody,
pStrAttachment})
Line 151: Return CType(results(0),String)
Line 152: End Function
Source File: C:\VEHICLERENTALSYSTEM\Web\Web
References\EFTService\Reference.vb Line: 150
Stack Trace:
[SoapException: Server was unable to process request. --Invalid mail
attachment 'g:\\BVAN025'.]
System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)
EFTService.AirMilesEFTService.SubmitEFTFileByMail( String pStrMessageBody,
String pStrAttachment) in C:\VEHICLERENTALSYSTEM\Web\Web
References\EFTService\Reference.vb:150
WebForm1.Page_Load(Object sender, EventArgs e) in
C:\VEHICLERENTALSYSTEM\Web\WebForm1.aspx.vb:35
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
"Markus" wrote:
By the way, do I have to upload the file to the server and attached
the file locally? or I can attach file from network drive?
Well, if the server has access to the file - then you might consider to
leave all execution at the server.
Please review the stack trace for more information about the error
and where it originated in the code.
Can you give us the stack trace? Because the error can be manifold:
- SecurityException -No access to the File
- File Not Found Exception -Attachement file not found
- Some other coding error, nothing to do with the mail sending, but
causing the error.
However, from the main message, I believe that the path is wrongly
interpreted. Have you also tried the @ before the string?
@"G:\test.txt"?
.... waiting for your feedback
Markus