Showing posts with label sp1. Show all posts
Showing posts with label sp1. Show all posts

Monday, March 26, 2012

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.

Visual Studio not playing nice with .NET AJAX

I downloaded SP1 for Visual Studio today (497 mb - ouch!). AJAX insisted on it. I can build and run a local page using AJAX. But when I publish and copy to my web host provider I get this error:

Parser Error Message:Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Source Error:

Line 27: <compilation debug="false">Line 28: <assemblies>Line 29: <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>Line 30: <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>Line 31: <add assembly="System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies>

'System.Web.Extensions' is a dll in the AJAX bin directory (along with AJAXExtensionsToolbox.dll - actually it's not in the exact same directory but I digress). I looked around on the web and it seems Visual Studio adds that <add assembly statement to the web config on its own. Same with the System.Web.Extensions.Design. I commented those two statements out and rebuilt and VS added two new ones - so that's true.

One site something about turning the "Get Specific Version" option for the toolkit to false. It also said something about VS grabbing everything in the reference hierarchy when it doesn't need to. I read that it could be the IIS implementation's fault but if it's in the bin at compile time then it shouldn't matter.

I've tried to add it as a reference in the project but after I navigate to it and select it the dialogue box just disappears and it doesn't get added.I've tried dropping it into the bin directory of the published site but that failed. I tried editing the "<add assembly" statement out of the published config file but that didn't work either.

Anyone have any ideas?

Thanks - Foolong

All you need to do, is copy the System.Web.Extensions.dll and system.web.extensions.design.dll to your websites bin directory on the web server.

On your local machine these live in the GAC but once they are on the server, unless Ajax has been installed directly on the server, they dont exist in the GAC and need to live in the bin.


Hi Bryan,

Thanks for your response!

I tried that both by dropping them in after publishing to a dir on my box and also dropping them into the project folder and then publishing. Still get the same error. I'm opening the folder on my web host provider's server up and the dll's are there. I even tried stripping off the 'version', 'culture', 'publickeytoken' params from the <add assembly tag.

Nothing seems to work.

This is too bad too because I just graduated w/ a BS in Computer Science and NOBODY hires unless you have at least three years of experience. I was hoping to use this stuff to to make my site (ergo my resume) look better.

Should have gone after an engineering degree :-(


Sorry you're having trouble with this. There is a point of interest that may affect your issue. You must be able to run your application in FULL TRUST on the server, for it to be able to use the ajax assemblies from the /bin folder. The other option is to have the MSI installer run on the server, which will put these into the GAC and should fix most of the problems.

Who is your host, and what is your servers availability to be modified / administered?

One other thing you may try, is changing all the lower case letters in your Public Key Token portion to Capital letters. It's fixed things in some cases.


I would venture to say that 5 will get you 10 that my web host provider has something to do with this! I just got off the phone w/ them asking

A) if they are making these files available globally - said yes but when I asked if the System.Web.Extension.dll and System.Web.Extension.Design.dll files were in the GAC - he didn't know for sure; and

B) when I told them I was including them in the bin directory and needed full trust he said they can't give that to custom dll's.

Oh well - I guess you get what you pay for.

I really apprreciate your help Bryan and will definitely post back when I get this figured out.

Thank again

Pat


The key is going to get them to install them in the GAC then if they wont give full trust to custom dll's. Of course, depending on how tight they have their security, you MAY be able to override your applicaiton or machine settings, by explicitly setting it in your web.config. Most of the time this will try to override a machine key though, and it will throw you an exception about it not being allowed, but it's always worth a shot.

Try putting this in your web.config under the system.web node

<system.web>
<securityPolicy>
<trustLevel name="Full" policyFile="internal" />
</securityPolicy>
<trust level="Full" originUrl="" />
</system.web>

Like I said, this doesnt usually work, but it's easy enough to give a shot. If it doesnt work you'll get a message about the Machine.config not allowing override.