Missing lines in web.config when consuming a webService with Atlas

When starting to use newly created Atlas features in .Net it took me a while to figure out error messages resulting from the Atlas examples when I used them in a real-life application (vs. in an Visual Studio Atlas Web Site).  The error message states that the web service reference has not been defined.

requestSimpleService = Quickstart.Samples.SimpleService.EchoString(
    "SomeText",     //params
    OnComplete,     //Complete event
    OnTimeout       //Timeout event

 … would result in the error message "'Quickstart' not defined" even though correctly declared in the ScriptManager.

At first i thought this had something to do with the order in which the <Atlas:ScriptManager/> is parsed relating to the JavaScript utilizing the service, but found out that there was some config info missing from the web.config.

      <section name="webServices" type="Microsoft.Web.Configuration.WebServicesSection"/>
and also on … 

    <webServices enableBrowserAccess="true" />
 Didn't find too much information guiding me on this one but there must be a lot of people running into this one as the error messages are a bit confusing.  To check if this might be the problem, visit the web service you are trying to consume and ad "/js" in the path trail (e.g  "http://myserver.com/myService.asmx/js&quot;) and the response should list the Atlas generated script used to access the service when declared inside the <Atlas:ScriptManager/> tag.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s