English 中文(简体)
页: 1
原标题:app.config being ignored?

我阅读了几个用户也存在这一问题的员额。 编辑后,顶楼无法从 app中装载任何资源。 即便在投影机上也出现这种情况。

具体来说,我有一个问题,即网络服务客户无法确定适当的终端配置,即使我静态地将这一配置汇编成象:

this.ws = new MyServicePortTypeClient("MyServicePort", "http://mysite.com/customer_portal/ws.php");

提出的例外是“系统”。 无效行动 例外: 找不到提及MyWebservice的违约终点要素。 My Service PortType, in the ServiceModel的客户配置科。 这可能是因为没有为你的申请找到组合文件,或者由于客户要素无法找到与合同相匹配的终点要素。

如果损失,我将不胜感激。

<><>Edit>: 页: 1

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <configSections>
    </configSections>
    <system.serviceModel>
        <bindings>
            <basicHttpBinding>
                <binding name="MyServiceBinding" closeTimeout="00:01:00"
                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                    allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                    maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                    messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
                    useDefaultWebProxy="true">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <security mode="None">
                        <transport clientCredentialType="None" proxyCredentialType="None"
                            realm="" />
                        <message clientCredentialType="UserName" algorithmSuite="Default" />
                    </security>
                </binding>
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://mysite.com/customer_portal/ws.php"
                binding="basicHttpBinding" bindingConfiguration="MyServiceBinding"
                contract="MyWebService.MyServicePortType" name="MyServicePort" />
        </client>
    </system.serviceModel>
</configuration>
最佳回答

我在每个人都提供的信息的帮助下,清楚地看到了这一点。

问题是安装。 反之,是试图利用自己的会议,而不是由服务公司创建。 在该案中,该公司试图装载C:WindowsMicrosoft.NETFrameworkv2.0......InstallUtil.config。

现在我已经指出这一点,我可以与我合作,让它正确工作。

感谢,但愿!

问题回答

EXE正在从FileName.exe.config而不是从T.config中选取环境。

FileName.exe.config <>/em>在编纂守则时应当自动生成,并与EXE本身一同放置。

检查一下你在哪里有EXE.,你在那里看到FileName.exe.config?

(由于时间长和格式安排而作为答案排列)





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签