You can get it at http://fiddlertool.com/fiddler/, basically it lets you inspect requests that the browser makes and look at the server responses, this will aid you greatly in seeing what's going on and what
might be going wrong...
Add a reference to "C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025\Microsoft.Web.Preview.dll". The dll should appear then in the 'Bin' folder of your webb app as Microsoft.Web.Preview.dll.
Hi everyone,
I need help with the beta2 to make working my bridge project that use Mappoint. The project works fine with the atlas assembly but not with the last CTP one (with the beta 2). Ive got an javascript error that say that my namespace
MapPointServices is undefined.
the problem seem that when .Net compiling the asbx files, He doesnt seem to care about the xml include tag in my asbx file:
to find this i have looked at the generated javascript that the asbx file return by the browser by calling it directly (http://project/asbxfile.asbx/js)
here the file generated with the old atlas assembly that work:
The next release of the bridge should have the issue with xmlinclude fixed. We replaced xmlinclude with GenerateScriptType, so to work around this issue, you need to manually put a GenerateScriptType attribute on your bridge code behind, i.e. something
like
[GenerateScriptType(typeof(Amazon.ItemSearch))]
public partial class YourBridge: BridgeHandler
HaoK
Participant
959 Points
185 Posts
Microsoft
Re: asbx support in AJAX ASP.NET
Nov 10, 2006 10:03 PM|LINK
You can get it at http://fiddlertool.com/fiddler/, basically it lets you inspect requests that the browser makes and look at the server responses, this will aid you greatly in seeing what's going on and what might be going wrong...
Hope that helps,
-Hao
rcrowe
Member
47 Points
11 Posts
Re: asbx support in AJAX ASP.NET
Nov 11, 2006 12:26 AM|LINK
That helped. Using Fiddler I was able to see that the .asbx buildProvider needed to be added to the web.config:
But it also includes this myterious message about:
and when I try to add that attribute, it fails with:
So I take it out, and then I run into:
I'm including Microsoft.Web.Preview.dll under ~/bin, which is thought was where the BridgeBuildProvider came from, but I guess not. Any ideas?
avmoldovan
Member
199 Points
41 Posts
Re: asbx support in AJAX ASP.NET
Nov 11, 2006 07:30 AM|LINK
In order to get this sample working I've did the following:
1) created an ASP.NET AJAX CTP enabled web site
2) I use this modified web config:
<configuration>
<configSections>
<sectionGroup name="microsoft.web" type="Microsoft.Web.Configuration.MicrosoftWebSectionGroup, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<sectionGroup name="scripting" type="Microsoft.Web.Configuration.ScriptingSectionGroup, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<sectionGroup name="webServices" type="Microsoft.Web.Configuration.ScriptingWebServicesSectionGroup, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="jsonSerialization" type="Microsoft.Web.Configuration.ScriptingJsonSerializationSection, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"/>
<section name="profileService" type="Microsoft.Web.Configuration.ScriptingProfileServiceSection, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"/>
<section name="authenticationService" type="Microsoft.Web.Configuration.ScriptingAuthenticationServiceSection, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"/>
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<system.web>
<pages>
<controls>
<add tagPrefix="asp" namespace="Microsoft.Web.UI" assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagPrefix="asp" namespace="Microsoft.Web.UI.Controls" assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagPrefix="asp" namespace="Microsoft.Web.Preview.UI" assembly="Microsoft.Web.Preview"/>
<add tagPrefix="asp" namespace="Microsoft.Web.Preview.UI.Controls" assembly="Microsoft.Web.Preview"/>
</controls>
<tagMapping>
<add tagType="System.Web.UI.WebControls.CompareValidator" mappedTagType="Microsoft.Web.UI.Compatibility.CompareValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.CustomValidator" mappedTagType="Microsoft.Web.UI.Compatibility.CustomValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.RangeValidator" mappedTagType="Microsoft.Web.UI.Compatibility.RangeValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.RegularExpressionValidator" mappedTagType="Microsoft.Web.UI.Compatibility.RegularExpressionValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.RequiredFieldValidator" mappedTagType="Microsoft.Web.UI.Compatibility.RequiredFieldValidator, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagType="System.Web.UI.WebControls.ValidationSummary" mappedTagType="Microsoft.Web.UI.Compatibility.ValidationSummary, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</tagMapping>
</pages>
<compilation debug="true">
<assemblies>
<add assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="Microsoft.VisualStudio.Shell, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies>
<buildProviders>
<add extension=".asbx" type="Microsoft.Web.Preview.Services.BridgeBuildProvider"/>
</buildProviders>
</compilation>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="Microsoft.Web.Script.Services.ScriptHandlerFactory, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET" path="ScriptResource.axd" type="Microsoft.Web.Handlers.ScriptResourceHandler" validate="false"/>
<add verb="*" path="*.asbx" type="Microsoft.Web.Script.Services.ScriptHandlerFactory" validate="false"/>
<add verb="*" path="atlasbatchcall.axd" type="Microsoft.Web.Services.MultiRequestHandler" validate="false"/>
</httpHandlers>
<httpModules>
<add name="WebResourceCompression" type="Microsoft.Web.Handlers.WebResourceCompressionModule, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="ScriptModule" type="Microsoft.Web.UI.ScriptModule, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</httpModules>
</system.web>
<microsoft.web>
<scripting>
<webServices enableBrowserAccess="true">
</webServices>
</scripting>
</microsoft.web>
<appSettings>
<add key="AWSAccessKeyId" value="-YOUR ACCESS KEY HERE--"/>
<add key="FlickrKey" value="--YOUR KEY HERE--"/>
</appSettings>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<add name="ScriptModule" preCondition="integratedMode" type="Microsoft.Web.UI.ScriptModule, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-ISAPI-2.0"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="Microsoft.Web.Script.Services.ScriptHandlerFactory, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET" path="ScriptResource.axd" type="Microsoft.Web.Handlers.ScriptResourceHandler" validate="false"/>
</handlers>
</system.webServer>
</configuration>
3) the js calls to the services are like this:
.....................
Samples.AmazonPox.Search(parameters, OnCompleteAmazonSearch, OnError, "Amazon Search via Get" ); ................ Samples.Flickr.Search(parameters, OnCompleteFlickrSearch, OnError, "Flickr Search via Get" );And everything works fine.
Do not forget to register for this web site the .asbx extension under IIS and to add your keys in the web.config under the <appSettings>.
rcrowe
Member
47 Points
11 Posts
Re: asbx support in AJAX ASP.NET
Nov 12, 2006 06:09 PM|LINK
Thanks very much, but I'm afraid it still doesn't work for me. I'm still getting "Samples is undefined", and Fiddler is telling me:
Parser Error Message: Could not load type 'Microsoft.Web.Services.BridgeRestProxy'.
I've registered .asbx in IIS and added my keys. I have a feeling that I'm missing some really basic step here, but I don't know what it could be.
avmoldovan
Member
199 Points
41 Posts
Re: asbx support in AJAX ASP.NET
Nov 13, 2006 06:40 AM|LINK
Add a reference to "C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025\Microsoft.Web.Preview.dll". The dll should appear then in the 'Bin' folder of your webb app as Microsoft.Web.Preview.dll.
Hope this helps
HaoK
Participant
959 Points
185 Posts
Microsoft
Re: asbx support in AJAX ASP.NET
Nov 13, 2006 05:18 PM|LINK
The BridgeRestProxy changed namespaces, its now under Microsoft.Web.Preview.Services.BridgeRestProxy...
Hope that helps,
-Hao
mallaire
Member
10 Points
2 Posts
Re: asbx support in AJAX ASP.NET
Dec 08, 2006 02:58 PM|LINK
Hi everyone,
I need help with the beta2 to make working my bridge project that use Mappoint. The project works fine with the atlas assembly but not with the last CTP one (with the beta 2). Ive got an javascript error that say that my namespace MapPointServices is undefined.
the problem seem that when .Net compiling the asbx files, He doesnt seem to care about the xml include tag in my asbx file:
<?
xml version="1.0" encoding="utf-8" ?><
bridge namespace="ADM.MapServices" className="FindService" partialClassFile="~/App_Code/DirectionRoutiere/FindService.asbx.vb" language="vb" ><
proxy type="MapPointServices.FindServiceSoap" /><
method name="Find"><
xmlinclude type="MapPointServices.FindSpecification" /><
xmlinclude type="MapPointServices.FindResults"/><
xmlinclude type="MapPointServices.LatLong"/><
input><
parameter name="FindSpecification" serverName="specification" /><
parameter name="Langue"/></
input></
method></
bridge>to find this i have looked at the generated javascript that the asbx file return by the browser by calling it directly (http://project/asbxfile.asbx/js)
here the file generated with the old atlas assembly that work:
Type.registerNamespace('ADM.MapServices');
ADM.MapServices.FindService=new function() {
this.appPath = http://syulvdev01/TurnByTurnRouteMapsVB/;
var cm=Sys.Net.ServiceMethod.createProxyMethod;
cm(this,"Find","args");
cm(this,"__invokeBridge","method","args");
}
var gtc = Sys.Net.WebMethod.generateTypedConstructor;
Type.registerNamespace('MapPointServices');
MapPointServices.LatLong=gtc("MapPointServices.LatLong");
MapPointServices.FindResults=gtc("MapPointServices.FindResults");
MapPointServices.FindResult=gtc("MapPointServices.FindResult");
MapPointServices.Location=gtc("MapPointServices.Location");
MapPointServices.Entity=gtc("MapPointServices.Entity");
MapPointServices.EntityPropertyValue=gtc("MapPointServices.EntityPropertyValue");
MapPointServices.Address=gtc("MapPointServices.Address");
MapPointServices.MapViewRepresentations=gtc("MapPointServices.MapViewRepresentations");
MapPointServices.ViewByScale=gtc("MapPointServices.ViewByScale");
MapPointServices.ViewByHeightWidth=gtc("MapPointServices.ViewByHeightWidth");
MapPointServices.ViewByBoundingRectangle=gtc("MapPointServices.ViewByBoundingRectangle");
MapPointServices.LatLongRectangle=gtc("MapPointServices.LatLongRectangle");
MapPointServices.FindSpecification=gtc("MapPointServices.FindSpecification");
MapPointServices.FindOptions=gtc("MapPointServices.FindOptions");
MapPointServices.FindRange=gtc("MapPointServices.FindRange");
Type.createEnum('MapPointServices.FindResultMask','LatLongFlag',1,'EntityFlag',2,'AddressFlag',4,'BestMapViewFlag',8,'MatchDetailsFlag',16);
You can see that the second one have no trace off the MapPointService namespace and the javascript was totally different from the first one.
anny idea of the problem?
HaoK
Participant
959 Points
185 Posts
Microsoft
Re: asbx support in AJAX ASP.NET
Dec 08, 2006 06:18 PM|LINK
The next release of the bridge should have the issue with xmlinclude fixed. We replaced xmlinclude with GenerateScriptType, so to work around this issue, you need to manually put a GenerateScriptType attribute on your bridge code behind, i.e. something like
[GenerateScriptType(typeof(Amazon.ItemSearch))]
public partial class YourBridge: BridgeHandler
Hope that helps,
-Hao
mallaire
Member
10 Points
2 Posts
Re: asbx support in AJAX ASP.NET
Dec 13, 2006 04:55 PM|LINK
Thanks, that solve my problem ;-)
-Marc
CVerdon
Member
2 Points
1 Post
Re: asbx support in AJAX ASP.NET
Dec 29, 2006 01:17 AM|LINK
Hi,
I managed to get the HDI-AtlasMashUp-Demo sample working. If anyone is interested in the final code just ask.
Anybody knows if it's supposed to be working in Firefox?
I get these errors:
Error: Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]
Source file: http://localhost:32842/AmazonFlickr/ScriptResource.axd?d=BPgOi1LeU_npczxEF_8_VLfnzeezGZEh1t-CYVoBKLii-pnZaxuPhjiwH-K2uBFUSJXQE0qRjd6K1my7RiB30U1KZe4UJZPBjUlM41776DE1&t=633021387920925000
Line: 4285
----------
Error: Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]
Source file: http://localhost:32842/AmazonFlickr/ScriptResource.axd?d=BPgOi1LeU_npczxEF_8_VLfnzeezGZEh1t-CYVoBKLii-pnZaxuPhjiwH-K2uBFUSJXQE0qRjd6K1my7RiB30U1KZe4UJZPBjUlM41776DE1&t=633021387920925000
Line: 4285
This is the line:
function Sys$Net$XMLHttpExecutor$get_statusCode() {
/// <value type="Number"></value>
if (arguments.length !== 0) throw Error.parameterCount();
if (!this._responseAvailable) {
throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, 'get_statusCode'));
}
if (!this._xmlHttpRequest) {
throw Error.invalidOperation(String.format(Sys.Res.cannotCallOutsideHandler, 'get_statusCode'));
}
return this._xmlHttpRequest.status; // <-- on this line