Web Service Currency Conversion Error

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hello all, Im working on a school class assignment and Ive followed the book step by step (MS Visual Basic 2010) and Im running into the following error, any ideas what the problem is?:
System.Web.Services.Protocols.SoapException was unhandled
Actor=""
HResult=-2146233087
Lang=""
Message=System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.IO.IOException: There is not enough space on the disk.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.FileStream.FlushWrite(Boolean calledFromFinalizer)
at System.IO.FileStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at System.IO.StreamWriter.Dispose(Boolean disposing)
at System.IO.TextWriter.Dispose()
at Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources)
at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources)
at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromSource(CompilerParameters options, String[] sources)
at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)
at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)
at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Type type)
at System.Web.Services.Protocols.SoapServerType..ctor(Type type, WebServiceProtocols protocolsSupported)
at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)
--- End of inner exception stack trace ---
Node=""
Role=""
Source=System.Web.Services
StackTrace:
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Currency_Conversion.net.webservicex.www.CurrencyConvertor.ConversionRate(Currency FromCurrency, Currency ToCurrency) in c:usersdustindocumentsvisual studio 2012ProjectsCurrency ConversionCurrency ConversionWeb Referencesnet.webservicex.wwwReference.vb:line 80
at Currency_Conversion.NAtoASconversion.btnConvertCurrency_Click(Object sender, EventArgs e) in c:usersdustindocumentsvisual studio 2012ProjectsCurrency ConversionCurrency ConversionNAtoASconversion.vb:line 28
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at Currency_Conversion.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
Here is my code:Public Class NAtoASconversion

Private Sub btnClear_Click(sender As Object, e As EventArgs) Handles btnClear.Click
Clears form, hides converted currency LBL
lblConvertedCurrency.Visible = False
cboASCurrency.Text = ""
txbxCurrencyAmount.Text = ""
cboNACurrency.Text = ""
End Sub

Private Sub btnConvertCurrency_Click(sender As Object, e As EventArgs) Handles btnConvertCurrency.Click
Dim wsMoney As New net.webservicex.www.CurrencyConvertor
Dim dblCurrentCurrency As Integer = Convert.ToInt32(txbxCurrencyAmount.Text)
Dim dblConversionAmount As Double
Dim strMoneyType As String = ""

If cboNACurrency.Text = "United States" And cboASCurrency.Text = "Japan" Then
dblConversionAmount = wsMoney.ConversionRate(net.webservicex.www.Currency.USD, net.webservicex.www.Currency.JPY)
strMoneyType = "Yen"
End If

If cboNACurrency.Text = "United States" And cboASCurrency.Text = "China" Then
dblConversionAmount = wsMoney.ConversionRate(net.webservicex.www.Currency.USD, net.webservicex.www.Currency.CNY)
strMoneyType = "Yuan"
End If

If cboNACurrency.Text = "United States" And cboASCurrency.Text = "South Korea" Then
dblConversionAmount = wsMoney.ConversionRate(net.webservicex.www.Currency.USD, net.webservicex.www.Currency.KRW)
strMoneyType = "Won"
End If

If cboNACurrency.Text = "Mexico" And cboASCurrency.Text = "Japan" Then
dblConversionAmount = wsMoney.ConversionRate(net.webservicex.www.Currency.MXN, net.webservicex.www.Currency.JPY)
strMoneyType = "Yen"
End If

If cboNACurrency.Text = "Mexico" And cboASCurrency.Text = "China" Then
dblConversionAmount = wsMoney.ConversionRate(net.webservicex.www.Currency.MXN, net.webservicex.www.Currency.CNY)
strMoneyType = "Yuan"
End If

If cboNACurrency.Text = "Mexico" And cboASCurrency.Text = "South Korea" Then
dblConversionAmount = wsMoney.ConversionRate(net.webservicex.www.Currency.MXN, net.webservicex.www.Currency.KRW)
strMoneyType = "Won"
End If

If cboNACurrency.Text = "Canada" And cboASCurrency.Text = "Japan" Then
dblConversionAmount = wsMoney.ConversionRate(net.webservicex.www.Currency.CAD, net.webservicex.www.Currency.JPY)
strMoneyType = "Yen"
End If

If cboNACurrency.Text = "Canada" And cboASCurrency.Text = "China" Then
dblConversionAmount = wsMoney.ConversionRate(net.webservicex.www.Currency.CAD, net.webservicex.www.Currency.CNY)
strMoneyType = "Yuan"
End If

If cboNACurrency.Text = "Canada" And cboASCurrency.Text = "South Korea" Then
dblConversionAmount = wsMoney.ConversionRate(net.webservicex.www.Currency.CAD, net.webservicex.www.Currency.KRW)
strMoneyType = "Won"
End If

Try
lblConvertedCurrency.Text = (dblCurrentCurrency * dblConversionAmount).ToString("F2") & " " & strMoneyType
lblConvertedCurrency.Visible = True

Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
End Try



End Sub
End Class

View the full article
 

Similar threads

Back
Top