Showing posts with label documentation. Show all posts
Showing posts with label documentation. Show all posts

Monday, March 26, 2012

VirtualEarchMap Control

Where can I find detailed documentation as to what the API is for the xml-script for the virtualEarthMap control.

I've looked at Jonathan Hawkins' Mashup example (http://blogs.msdn.com/jhawk/archive/2006/03/26/561658.aspx) and it is an excellent starting point but now I'm interested in doing more and I'm not sure what else is supported in the xml script.

Thanks

Hi,

check the url in my signature, it's a mashup based on Virtual Earth.You can download the source code.

hello.

the class is defined on the atlasuimap.js file. if you look at the getDescriptor method, you'll get all the propertties, events and methods that can be used from xml-script.

Visual Basic Examples Echo Name on web and in documentation down load does not work

I have done a clean reinstall of Visual Studio 2005, the SP1, The vs2005 Vista Update (Home Premium Vista), and IE 7.00..

One of the four Simple Web Service examples in the documentation download did not work, and as Mr. Murphy acknowledges, it's the one I am interested in.

I made sure not to touch any code .. just install and then debug..

http://localhost:49160/aspDocumentation/Samples/Sys.Net.SimpleWebService/vb/SimpleWebService.aspx

did not echo

This example also does on work on theasp website.

http://localhost:49160/aspDocumentation/Samples/Sys.Net.PageMethod/vb/PageMethod.aspx

did echo

http://localhost:49160/aspDocumentation/Samples/Sys.Net.SimpleWebService/cs/SimpleWebService.aspx

did echo

http://localhost:49160/aspDocumentation/Samples/Sys.Net.PageMethod/cs/PageMethod.aspx

did echo

Thanks!




Hi,

Can you tell me which documentation are you referring to?

Look forward to your reply.


http://ajax.asp.net/docs/tutorials/ExposingWebServicesToAJAXTutorial.aspx

Simple Echo works in C# but not in VB


Can you be more specific about your vb sample doesn't work? And how is it related to Vista?

It will be better if you canshow me a sample.


1. Go tohttp://www.asp.net

2. Click on AJAX.

3. You are now at the page titled:

"AJAX: The Official Microsoft ASP.NET AJAX Site

4. Click on "Docs"

5. Click on "Open The Online Documentation"

6. On The ASP.Net AJAX Roadmap page go to the fifth section titled "Web Services" and click

on the second item "Exposing Web Services To A Client Script"

7. On the top right side of the page select C# as the "Preferred Sample Language"

8. Go to the middle of the page to the paragraph that is titled:

Exposing Web Services to Client Script in an ASP.NET Web Page

9. At the bottom of the paragraph are two buttons, a run it button and a script button.

10. Click on Orange Button "Run It"

11. Enter your name and click on echo

12. close the "Simple Web Service" window

13. You have returned to the Exposing Web Services to Client Script in an ASP.NET Web Page

14. On the top right side of the page select Preferred Sample Language and select Visual Basic

15. Click on the same "run it" option that you did in step 10.

16. Enter your name and click on echo

17. Nothing happens.. Why?


Thanks for your clear explanation.

Now I've noticed it too, and I copy and paste the vb source code into a local project, it works.

And this sample should already give you an idea of how to expose webservice to client side.


You must be doing something in your local project setup, or your config file, or something.. why doesnt it work on the web?

In addition, when you download the "tutorial" the example, like the web, it does not work. Why?

If Microsoft has a "official" AJAX tutorial, one would think their examples would work. At least I think they should work..

Why does the C# example work and the VB example not work?

Could you locate the group that put together this "example" and tell them it doesnt work?

Thanks


Thanks for your feedback. I have checked the document and I found thatthe service entry registered in the ScriptManager has a invalid path.

<asp:ScriptManager runat="server" ID="scriptManager">
<Services>
<asp:ServiceReference path="SimpleWebService_VB.asmx" /> <%--should be SimpleWebService.asmx--%>
</Services>
</asp:ScriptManager>

To feedback this document issue in a formal way, could you go to our Connect portal site and submit it? http://connect.microsoft.com/ Every feedback submitted will be evaluated carefully by our engineers and document writers. They will let you know their comments further through that portal. It would be great if you can also paste the link to the submitted feedback here, so that other community members can see it as well.

Wednesday, March 21, 2012

WCF problem with June CTP on WinFX Beta 2

The documentation states that "The WCF support in this version of "Atlas" requires Beta 2 of .NET Framework version 3.0."

Unfortunately, when I run the wcf_cs/Simple.aspx from the Atlas Documentation website (run as a filesystem) on Beta 2 (on XP SP2), I get the following stack trace:

[InvalidCastException: Unable to cast object of type 'System.Web.Compilation.BuildResultCustomString' to type 'System.Web.Util.ITypedWebObjectFactory'.] System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +161 System.Web.Compilation.BuildManager.GetCompiledType(VirtualPath virtualPath) +36 System.Web.Compilation.BuildManager.GetCompiledType(String virtualPath) +81 Microsoft.Web.Services.WebServiceData.GetWebServiceData(String virtualPath, Boolean failIfNoData) +271 Microsoft.Web.Services.WebServiceData.GetWebServiceData(String virtualPath) +30 Microsoft.Web.UI.ScriptManager.BuildScriptElement(String servicePath) +399 Microsoft.Web.UI.ScriptManager.GetScriptReferences() +979 Microsoft.Web.UI.ScriptManager.RenderXmlScript(TextWriter writer) +110 Microsoft.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e) +663 System.EventHandler.Invoke(Object sender, EventArgs e) +0 System.Web.UI.Page.OnPreRenderComplete(EventArgs e) +96 System.Web.UI.Page.PerformPreRenderComplete() +32 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4796

Is there anyway to fix or workaround the above problem? Is there a configuration in which WCF will work with ATLAS?

Thanks, Jack

I was able to get the simple service WCF sample to work by pulling the relevant files out into a newly created Atlas enabled test website. I then quickly discovered that navigating (instead of trying to directly view or set simple.aspx as the start page in VS) to the simple service form in the Atlas Documentation website also worked. I'm not sure why -- I nested the service files in my test website and was still able to view it directly. As time permits, I'll see if I can find a cause.

At any rate, WCF appears (I've only tried the samles) to work with the June CTP of Atlas on WinFX Beta 2.

Web Server Controls - Basic Requirements To Work with AJAX.NET

Is thereany documentation showing what is required to equip a server-side WebControl to work with AJAX.NET?

I have some VERY simple WebControls that fire "Click" events. One of them consistantly causes the entire page to refresh, while the other doesn't. But they are both doing the same thing. For some reason, one seems tonot work with AJAX.NET, while the other does. Both of them are wrapped inside an UpdatePanel and ContentTemplate - but behave differently under AJAX.NET. Mysterious.

I can't tell if the examples showing ScriptControlDescriptor.AddEvent are relevent for what I'm doing or not. This seems to be related to very specific client side javascript voodoo - I just want to have a generic control that can fire events that will postback to the code-behind (like a normal ASP.NET button, for example - I can drop one of these on a page, use the event, and it just works - but how to do this properly with a custom WebControl - RELIABLY?).

If there is a plain-jane, simple example of a WebControl and the proper way to have it fire events (__doPostBack) without causing the entire page to refresh, that would be VERY helpful.

Thanks.

There's lots of examples of how to do this outside the webcontrol, so to do it inside a webcontrol all you really have to do is embed the javascript in the assembly and make sure that it ends with the if(Sys && Sys.Application) Sys.Application.notifyScriptLoaded(); statement. The easiest way to wire up interaction between your C# class and the javascript is by following the pattern described in the tutorials on custom extenders. children of ScriptControl follow the same basic pattern.

I've looked at the examples. There are too many things illustrated just aren't exlained. Sorry. I just don't have time to read the "Gone With the Wind" to get an answer to a simple question.

Do I have to write special javascript beyond the standard "_doPostBack" to get a postback executed without causing a page update? Why does it work for an asp:Button without doing anything out of the ordinary? Is some kind of magic support wired into ASP.NET for the standard .NET controls?

SIMPLE QUESTION (YES/NO):

Can I write a WebControl that fires events - like I would for a NON-AJAX application - and have it work under AJAX.NET without refreshing the entire page?

I thought that any postbacks generated inside an UpdatePanel/ContentTemplate would be AUTOMATICALLY handled by AJAX.NET. This is what it says in the documentation. Is this true or no?

This is just a YES/NO question.

Thanks (frustrated - about to punt on AJAX.NET and just work with web callbacks...)

Web Service Calls From AJAX - No Cross Domain? NOT!

The AJAX 2.0 documentation states that Web Services can not be called "cross domain". This is a browser side restriction, so says Microsoft support. While one might disagree, I think of cross-domain as meaning between machines on different internet domains (i.e. machine1.bigcompany.com and machine2.bigcompany.com are on the same domain while machine3.yourcompany.com is on a different domain). This is not what Microsoft means. The use of the term "cross domain" in the documentation means that machine1.bigcompany.com and machine2.bigcompany.com are on different domains and AJAX web service calls between them can not be made successfully . At least this is what MS support tells me. I have found however that I can create a page on machine1.bigcompany.com and call a web service on machine2.bigcompany.com. To do this requires that four conditions be true:

1) You use IE 7 as your browser;

2) do not select the "inline script" option on the scriptmanager/services attribute

3)call set_path in your javascript to set the endpoint of the web service to machine2;

4) both machine1.bigcompany.com and machine2.bigcompany.com are defined as within the INTRANET ZONE in IE 7.

Firefox has no option like "intranet zones" so I have been unable to get this to work with Firefox. I am still working on this.

By the way if you have the same AJAX web page deployed on two different machines (meeting the conditions discribed above) with AJAX "PageMethods" defined, you can call set_path on the

PageMethod using Javascript and make calls between machines for PageMethods also.

Hope This Helps

dlr

You can implment this for Cross Domain issue:
http://weblogs.asp.net/rashid/archive/2007/09/28/implement-jsonp-in-your-asp-net-application.aspx