作者热门文章
- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我有一个将 Web 服务与 ASP.Net 结合使用的应用程序,我应该对其进行维护。所以我正在提高我在这个话题上的技能。我在使用 VS 2013 的 Window 中运行 Webservice 没有问题,但在单声道中有问题。
这是我运行代码时遇到的错误
System.ArgumentNullException
Value cannot be null.
Parameter name: path1
Description: HTTP 500.Error processing request.
Details: Non-web exception. Exception origin (name of application or object): mscorlib.
Exception stack trace:
at System.IO.Path.Combine (System.String path1, System.String path2) [0x00006] in <filename unknown>:0
at System.Web.Services.Configuration.WsdlHelpGeneratorElement.get_HelpGeneratorPath () [0x0000c] in <filename unknown>:0
at System.Web.Services.Protocols.DocumentationServerProtocol.Initialize () [0x001f1] in <filename unknown>:0
at System.Web.Services.Protocols.ServerProtocol.SetContext (System.Type type, System.Web.HttpContext context, System.Web.HttpRequest request, System.Web.HttpResponse response) [0x00022] in <filename unknown>:0
at System.Web.Services.Protocols.ServerProtocolFactory.Create (System.Type type, System.Web.HttpContext context, System.Web.HttpRequest request, System.Web.HttpResponse response, System.Boolean& abortProcessing) [0x00014] in <filename unknown>:0
这是代码
WebService1.asmx
<%@ WebService Language="C#" CodeBehind="WebService1.asmx.cs" Class="DemoService.WebService1" %>
WebService1.asmx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Xml;
namespace DemoService
{
/// <summary>
/// Summary description for WebService1
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
// [System.Web.Script.Services.ScriptService]
public class WebService1 : System.Web.Services.WebService
{
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
[WebMethod]
public XmlElement AddMe(int a, int b)
{
XmlDocument doc = new XmlDocument();
for(int i=0; i<5; i++)
{
XmlNode n = doc.CreateNode( XmlNodeType.Element, i.ToString(), "me.com.aisee");
for(int j=0; j<5; j++)
{
//n.AppendChild(doc.CreateElement(j.ToString()));
}
}
return doc.DocumentElement;
}
}
}
我不知道我在这里想念什么。据我所知,它应该可以正常工作。这是我的单声道版本
~$ mono --version
Mono JIT compiler version 4.3.0 (tarball Fri Jun 12 11:43:58 UTC 2015)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
最佳答案
Web 服务的文档页面似乎尚未实现。但是尽管有这个错误,网络服务应该可以工作。您可以通过在 url 末尾添加 ?WSDL
来查看它,即 http://localhost/WebService1.asmx?WSDL
关于c# - Web 服务在单声道 4 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30861762/
我想在我的 android 应用程序中播放 PCM 音频数据。网络上有很多示例,但仅用于单 channel ,我有 4 个 channel (如本问题标题所述)。 当我设置 AudioTrack au
我正在尝试通过 channelsplitter 将立体声音频路由到具有增益控制的 6 个 channel ,然后返回到 channelMerger,以控制 5.1 组的所有 6 个 channel .
我试图从 iPhone XS 的所谓立体声后置麦克风中获取两个 channel ,但在 AVAudioSession 的不同点上只能看到一个 channel 。和 AVAudioSessionPort
我是一名优秀的程序员,十分优秀!