无法使用vb.net中的Web服务在服务器中上传我的数据

时间:2017-12-02 01:10:52

标签: sql-server vb.net web-services

  

由于内部错误,服务器无法处理请求。   有关错误的更多信息,请打开   IncludeExceptionDetailInFaults(来自ServiceBehaviorAttribute   或者从服务器上的配置行为)来发送   异常信息返回给客户端,或者按照开启跟踪   Microsoft .NET Framework SDK文档并检查服务器   跟踪日志。

如果问题来自服务器或系统

,我不知道

这是我的堆栈跟踪

System.ServiceModel.FaultException was unhandled
  HResult=-2146233087
  Message=The server was unable to process the request due to an internal error.  For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs.
  Source=mscorlib
  StackTrace:
    Server stack trace: 
       at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
       at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
    Exception rethrown at [0]: 
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at JRS_Online_Apps_III.ServiceReferenceBilling.IService.RequestGenerateBill(String rclid, String ruserid, String rbrid, String rdatefrom, String rdateto, String rduedate, String careof, Int64[] rairbillsids, Decimal rNet, Decimal rRvat, Int32 rstatement, String bir)
       at JRS_Online_Apps_III.ServiceReferenceBilling.ServiceClient.RequestGenerateBill(String rclid, String ruserid, String rbrid, String rdatefrom, String rdateto, String rduedate, String careof, Int64[] rairbillsids, Decimal rNet, Decimal rRvat, Int32 rstatement, String bir) in C:\Users\REGIME\Desktop\New folder\JRS_Online_Apps_III\JRS_Online_Apps_III\Service References\ServiceReferenceBilling\Reference.vb:line 254
       at JRS_Online_Apps_III.CreateBillingForm.Button1_Click(Object sender, EventArgs e) in C:\Users\REGIME\Desktop\New folder\JRS_Online_Apps_III\JRS_Online_Apps_III\Billing\CreateBillingForm.vb:line 238
       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 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
       at JRS_Online_Apps_III.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:
  

如果我错了,请纠正我......改变查询是否可以破坏整体   数据库,有关系,因为我改变了表,但我忘了设置   约束和关系

我尝试将代码放在我的项目中没有运气它总是给我错误  
https://ibb.co/ccLfUb  
https://ibb.co/eTghsw

1 个答案:

答案 0 :(得分:0)

美好的一天,我的这个问题需要回答已经很多年了。

所以……这里的问题是 Web Api 似乎是 reconfigured(当时我是新手,我不知道如何检查 Web API 因为我只做不使用 Web API 的离线基本应用程序,现在我知道 API 是如何工作的,问题是 API 没有被老程序员正确配置(顺便说一下,我只在该公司重新编程应用程序),

问题原因:

datatype-mismatch:从 intnvarchar 这是唯一的问题。我只更改了列的数据类型,问题就解决了。

当您的连接超时时,您还可以遇到另一件事。我也使用 Indexing 解决了这个问题。您可以将 IncludeExceptionDetailInFaults = false 更改为 true,以便您可以查看遇到的错误。