Question

Right now I need to keep changing the line below. Is there a programmatic way to check if I am running the site locally vs. on production ?

The closest I got was this post but it seems to be referring to Silverlight and I am just calling from an asp.net site.

Silverlight application cannot accesss WCF services on other machines

<client>
  <endpoint address="http://www.punkoutersoftware.com/Service1.svc"
    binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService1"
    contract="ServiceReference1.IService1" name="BasicHttpBinding_IService1" />
</client>
Was it helpful?

Solution

OTHER TIPS

Is this for an ASP.NET application? If so, consider using VS2010's Web.config Transformation, which can alter your web.config based on your build type (Release, Debug, etc).


Here's a better introductory tutorial

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top