Web service and database connection

scusack
scusack used Ask the Experts™
on
We have a SharePoint 2010 webservice that is used to make calls to a database basically Microsoft Dynamics Navision.

The link for it is http://navdatas/Nav_Data.asmx in SharePoint.

It has various  GETPO GETORDER commands that it is calling.  We are moving the database of where these are talking to and I need to know how to repoint these to the new servername and database of the NAVISION DB.  

I have had no luck finding a connection string anywhere to talk to this DB.  Any ideas?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2013
Awarded 2012
Commented:
Hi,
is this a custom developed web service?
Could you perhaps post / attach the web.config which resides inside of the web service web application?
In 99.9 percent of all cases, the connection string is in there.

KR
Rainer

Author

Commented:
<?xml version="1.0"?>
<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>
  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>
</configuration>

Author

Commented:
I believe it was a custom application.
Announcing the Winners!

The results are in for the 15th Annual Expert Awards! Congratulations to the winners, and thank you to everyone who participated in the nominations. We are so grateful for the valuable contributions experts make on a daily basis. Click to read more about this year’s recipients!

Most Valuable Expert 2013
Awarded 2012

Commented:
Hm,
Looks not as usual/expected.
What's in the ASMX file?

Author

Commented:
<%@ WebService Language="C#" CodeBehind="NAV_Data.asmx.cs" Class="NAV_DATA.Service1" %>

Author

Commented:
Rainer,

There is a dll in the BIN file called Nava_data.dll.  I think this is a compiled application where maybe the settings are that point to the DB. installed a hex editor and took a look and I do see references to our Navision database.  Any idea how I would do this?




dll snipdll snip
Commented:
I downloaded /Net Reflector and decompiled the dll. There was a connection string within the NAV_DATA.Service1 code that needed to be updated.  Thank You for your help Rainer.
Most Valuable Expert 2013
Awarded 2012

Commented:
Hi,
that are not really good News, but just in case: there is a really useful tool where you can patch .NET dlls - and It could be really good in your Situation.
The tool is called ReflexIL - http://reflexil.net/

HTH
Rainer

Author

Commented:
Once I installed .Net Reflector and decompiled the dll file I was able to see the connection string to the DB.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial