标签: windows-hosting

使用netTcp绑定时添加服务引用

我有一个WCF服务,我通过将其接口复制到示例客户端项目来测试.
现在我想通过添加服务引用来正常工作.
该服务托管在Windows托管(使用installUtil)中.
该服务有2个项目 - 外部(接口+数据交换)和内部(实现).
由于某种原因,它没有app.config所以我手动添加了一个:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.serviceModel>
    <services>
      <service name="ExecutionService" behaviorConfiguration="Default">
        <endpoint name="TCPEndpoint" address="" binding ="netTcpBinding" contract="Externals.IExecutionService"/>
        <host>
          <baseAddresses>
            <add baseAddress="net.tcp://localhost:3040/ExecutionService"/>
          </baseAddresses>
        </host>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="Default">
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="true"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
</configuration>
Run Code Online (Sandbox Code Playgroud)

尝试从我的示例客户端添加服务引用会导致以下错误:

Metadata contains a reference that cannot be resolved: 'net.tcp://localhost:3040/ExecutionService/Externals.IExecutionService'.
There was no endpoint listening at net.tcp://localhost:3040/ExecutionService/Externals.IExecutionService that could accept the message. This is often caused by an incorrect address or SOAP …
Run Code Online (Sandbox Code Playgroud)

wcf nettcpbinding windows-hosting

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

allowDefinition ='MachineToApplication' - MVC3 ERROR

我正在开发MVC3中的应用程序(http://www.colombiatrolley.com/sitrolley).在我的计算机中它运行正常,但当我将其上传到服务器(托管服务)时,我收到此错误:

分析器错误消息:在应用程序级别之外使用注册为allowDefinition ='MachineToApplication'的部分是错误的.此错误可能是由于未在IIS中将虚拟目录配置为应用程序引起的.

我知道这是一个非常常见的错误,但我还没有解决它.

错误捕获

windows-hosting asp.net-mvc-3

6
推荐指数
1
解决办法
2674
查看次数

在Windows主机上连接到godaddy数据库时,用户拒绝访问?

mysqli在Godaddy windows托管上与我的数据库进行简单的连接,我的代码如下:

<?php 

        error_reporting(E_ALL & ~(E_STRICT|E_NOTICE));

            $host = 'localhost'; 
            $user = 'root_user_name'; 
            $password = 'root_user_pass'; 
            $db = 'my_database'; 
            $cxn = mysqli_connect($host,$user,$password) or 
                     die(mysqli_connect_error()); // <<<<<< line 9
            mysqli_select_db($cxn, $db ) or die(mysqli_connect_error()); 


        die('test');
Run Code Online (Sandbox Code Playgroud)

我确定授予的用户名和密码以及数据库名称,我的所有凭据都是正确的,但我收到此错误:

警告:mysqli_connect():( HY000/1045):拒绝用户'root_user_name'@'localhost'(使用密码:YES)拒绝G:\ path \到\ file\index.php第9行访问被拒绝用户' root_user_name'@'localhost'(使用密码:YES)

我使用wamp服务器在localhost上使用相同的数据库名称和凭据,我没有太多进入IIS服务器和Windows托管..任何帮助将不胜感激.

php mysql mysqli windows-hosting

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