小编Pet*_* K.的帖子

调试WCF Web服务故障

我正在尝试调试Web服务异常.我在Visual Studio 2010,C#,.net 4.0框架中以调试模式运行客户端和服务.

当我运行客户端,并让它调用Web服务时,我得到一个例外:

键入: System.ServiceModel.FaultException`1 [[System.ServiceModel.ExceptionDetail,System.ServiceModel,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089]] 错误消息: 'myService.Service'的类型初始化程序引发了例外.
资料来源: mscorlib

但是,该服务没有任何例外.

我得到的堆栈跟踪似乎表明调用已经完成,并且正在处理回复(即使回复是例外):

服务器堆栈跟踪:

在System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(消息回复,MessageFault错误,字符串操作,MessageVersion版本,FaultConverter faultConverter)

处于System的System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime操作,ProxyRpc和rpc)

. ServiceModel.Channels.ServiceChannel.Call(String action,Boolean oneway,ProxyOperationRuntime operation,Object [] ins,Object [] outs,TimeSpan timeout)

在System的System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall,ProxyOperationRuntime操作)

. ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage消息)

有人可以指出我需要做什么来调试这个吗?

我目前正在设置服务跟踪查看器工具,看看是否会告诉我更多信息.

wcf c#-4.0

4
推荐指数
1
解决办法
3万
查看次数

如何在android上的文本视图中为长文本进行文本换行

在我的应用程序中,我有长文本的文本视图.我需要文本包装,如在android模拟器 - >联系人 - >手机(屏幕短的拨号盘联系).

在此输入图像描述

但在我的应用程序中,我得到文本包装如下图所示: 在此输入图像描述

我尝试了几种不符合我要求的方法.我不需要文本视图右上角的"...".而不是那样,我想包装文本,如第一个图(android模拟器 - >联系人 - >电话).怎么做?请帮我.提前致谢.

android textview android-widget

4
推荐指数
1
解决办法
8514
查看次数

从.mp3或.wav文件计算频率?

我试图做一些笔记识别mp3wav文件.

问题是:如何在文件上使用FFT?

我更喜欢Java解决方案,但我很想提出建议.

java audio signal-processing fft pitch-tracking

3
推荐指数
1
解决办法
2万
查看次数

将TextView与RelativeLayout对齐

我有这样的布局:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:background="@drawable/bgr">
    <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_centerVertical="true"
            >
        <TextView android:layout_width="60dp" android:layout_height="wrap_content"
                  android:id="@+id/label"
                  style="@style/ConnectionPoint.Label"
                  android:text="Title"
                />
        <TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
                  android:id="@+id/code"
                  style="@style/ConnectionPoint.Code"
                  android:text="CODE"
                />
        <TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
                  android:id="@+id/name"
                  android:layout_toRightOf="@id/label"
                  android:layout_toLeftOf="@id/code"
                  style="@style/ConnectionPoint.Name"
                  android:text="Some text"
                />
    </RelativeLayout>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)

和风格:

<style name="ConnectionPoint.Text" parent="android:TextAppearance">
    <item name="android:layout_alignParentBottom">true</item>
</style>
<style name="ConnectionPoint.Label" parent="ConnectionPoint.Text">
    <item name="android:textColor">@color/from_to</item>
    <item name="android:layout_marginLeft">5dp</item>
    <item name="android:layout_marginRight">10dp</item>
    <item name="android:textSize">16dp</item>
</style>
<style name="ConnectionPoint.Name" parent="ConnectionPoint.Text">
    <item name="android:textSize">26dp</item>
    <item name="android:textStyle">bold</item>
    <item name="android:singleLine">true</item>
    <item name="android:ellipsize">end</item>
</style>
<style name="ConnectionPoint.Code" parent="ConnectionPoint.Text">
    <item name="android:textColor">@color/iata</item>
    <item name="android:textSize">18dp</item>
    <item name="android:singleLine">true</item>
    <item name="android:layout_alignParentRight">true</item>
    <item …
Run Code Online (Sandbox Code Playgroud)

android center textview relativelayout

2
推荐指数
1
解决办法
1万
查看次数

为什么Firefox 4中按钮的长度比IE9和Chrome 11更长,应该如何修复?

CSS:

button, button.btnBlue, button.btnRed, button.btnGreen, button.btnOrange, button.btnPink {
margin-left: 2px !important;
margin-right: 2px !important;
padding-top: 0px;
padding-right: 3px;
padding-bottom: 0px;
padding-left: 3px;
height:25px;
border-radius:3px;
  -moz-border-radius:3px;
  -webkit-border-radius:3px;
  cursor:pointer;
  white-space:nowrap;
  overflow:visible; /* fixes width in IE7 */
  outline:0 none /* removes focus outline in IE */
}

button::-moz-focus-inner, button::-moz-focus-inner.btnBlue, button::-moz-focus-inner.btnRed, button::-moz-focus-inner.btnGreen, button::-moz-focus-inner.btnOrange, button::-moz-focus-inner.btnPink {
border:none;
}
/* removes focus outline in FF */

button:hover, button:focus, button:hover.btnBlue,button:focus.btnBlue, button:hover.btnRed,button:focus.btnRed, button:hover.btnGreen,button:focus.btnGreen, button:hover.btnOrange,button:focus.btnOrange,button:hover.btnPink,button:focus.btnPink {
  box-shadow:0 0 3px rgba(0,0,0,0.4);
  -moz-box-shadow:0 0 3px rgba(0,0,0,0.4);
  -webkit-box-shadow:0 0 3px rgba(0,0,0,0.4); …
Run Code Online (Sandbox Code Playgroud)

css css3

0
推荐指数
1
解决办法
225
查看次数