Vishal Jain
Vishal Jain

Reputation: 11

Not Able to Connect to my MS Sql Data Base on My Vps from my WCF Service Hosted on IIS7 on the same Vps

I have written a webservice from where i pass data to my localhost Ms Sql DB. It was working properly on my pc but when i hosted it on my godaddy Windows Vps there is an error:

Request Error

The server encountered an error processing the request. See server logs for more details.

Please also note that there was no MS SQL Server on my vps hence i have installed it manually using my RDP. Hence idont now if there is some server setting that is to be done or i have to change my VPS. Below is my web.config please tell me what is to be done as i am stuck cant find any resources online for this problem.

web.config

<?xml version="1.0"?>
<configuration>
  <connectionStrings>
    <add name="constr" connectionString="Data Source=IP-104-238-94-8;Initial Catalog=BaySideJournalDB ;Integrated Security=True" providerName="System.Data.SqlClient"/>
  </connectionStrings>
  <appSettings/>
  <system.web>
    <compilation targetFramework="4.0" debug="true"/>
    <httpRuntime/>
  </system.web>
  <system.serviceModel>
    <services>
      <service name="ShreeGanesh.BaySideService" behaviorConfiguration="ServiceBehavior">
        <endpoint address="" binding="webHttpBinding" contract="ShreeGanesh.IBaySideService" behaviorConfiguration="webHttp"/>
        <endpoint address="mex"
                binding="mexHttpBinding" contract="IMetadataExchange" />

      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="ServiceBehavior">
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
        <behavior>
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="true"/>
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
      <endpointBehaviors>
        <behavior name="webHttp">
          <webHttp/>
        </behavior>
      </endpointBehaviors>
    </behaviors>
       <serviceHostingEnvironment aspNetCompatibilityEnabled="false" multipleSiteBindingsEnabled="true"/>
  </system.serviceModel>
  <system.webServer>

    <directoryBrowse enabled="true"/>
    <defaultDocument>

      <files>`enter code here`
        <add value="BaySideService.svc"/>
      </files>

    </defaultDocument>
  </system.webServer>
</configuration>

Upvotes: 1

Views: 47

Answers (0)

Related Questions