Php IIS7服务器上的Web服务,用于Apache服务器上的网站
我们这里有几个服务器 我们的大多数Web服务器都是运行Apache和MySQL的Windows 2008 R2计算机,但我们也有运行SQL Server 2008数据库的IIS7 Web服务器 我要在web报告中使用的数据部分位于IIS7 web服务器的SQL数据库中,部分位于Apache web服务器的MySQL数据库中 一年多前,当我从Windows 2000服务器升级工作时,我在IIS7中被介绍到Web服务 我喜欢创建Web服务,并且我认为这是一条路要走。我在VisualStudio2010中看到的所有示例(我们在这里看到的)都只展示了如何在.NET3.5项目中实现这一点。如果.NET4.0中有一些东西,那么它必须被称为Web服务以外的东西 我想编写一个应用程序,从ApacheWeb服务器上的MySQL数据库读取数据,并将其与IIS7 Web服务器上的SQL数据库中的数据相结合 然后,我需要能够从ApacheWeb服务器上用PHP编写的网站读取这些数据 那么,我在问什么?我想该怎么办Php IIS7服务器上的Web服务,用于Apache服务器上的网站,php,mysql,sql-server,apache,visual-studio-2010,Php,Mysql,Sql Server,Apache,Visual Studio 2010,我们这里有几个服务器 我们的大多数Web服务器都是运行Apache和MySQL的Windows 2008 R2计算机,但我们也有运行SQL Server 2008数据库的IIS7 Web服务器 我要在web报告中使用的数据部分位于IIS7 web服务器的SQL数据库中,部分位于Apache web服务器的MySQL数据库中 一年多前,当我从Windows 2000服务器升级工作时,我在IIS7中被介绍到Web服务 我喜欢创建Web服务,并且我认为这是一条路要走。我在VisualStudio201
- 我应该在Visual Studio 2010中创建什么样的项目?从每个数据库中读取1个数据表很容易,但我需要知道如何最好地访问这些数据
- 如何通过PHP访问此数据?
是否有任何特定类型的服务我应该考虑?我不确定是否可以使用带有PHP代码的web服务。必须正确配置web.config文件才能从Microsoft的WCF读取。事实上,它似乎需要
binding=“basicHttpBinding”
以下是我所拥有的:
<system.serviceModel>
<services>
<service name="wcfLibrary.Dwgs" behaviorConfiguration="wcfLibrary.DwgsBehavior">
<endpoint address="" binding="basicHttpBinding" contract="wcfLibrary.IDwgs">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost/Dwg/" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="wcfLibrary.DwgsBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
<standardEndpoints>
<webHttpEndpoint>
<standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="true"></standardEndpoint>
</webHttpEndpoint>
</standardEndpoints>
</system.serviceModel>
VS2010项目必须使用完整的.NET4框架,而不是我使用的客户机配置文件
一旦我这样做了,并重新启动了项目,我就能够从引用列表中添加System.ServiceModel.Web
有关
部分的Web.config部分来自中的步骤8
这个答案正在进行中。当我了解到更多信息时,我会再加上一张。一张否决票和一张不加评论的结束票。瘸的