0

Okay, this will probably get closed or get some negative replies, but I've been trying to get this going for 3 nights and I'm extremely frustrated.

I have a shared .net host (1and1.com). I'm trying to develop a webapp that primarily uses javascript/jquery. I have data in a MS SQL database. I cannot use Ajax to call a WCF service to do my database queries because there is some stupid limitation with multiple IIS hostheaders which affects people on shared hosts such as mine.

So, I'm looking for recommendations for alternatives. The really tricky part is that I'm not great at learning programming concepts; I'm really more of a copy/paste pirate (I do my job well and have hundreds of happy customers, for the record). But I do admit it's a major handicap. As such, it would be unbelievably helpful if any answers could include simple, yet complete, code examples.

I am using .net 3.5, the current version of JQuery and SQL Server 2005, and VB syntax (sorry).

Please and thank you.

ChrisF
  • 134,786
  • 31
  • 255
  • 325
  • 1
    Well, at least your honest I guess lol – Earlz Oct 19 '11 at 21:07
  • Yeah, blame it on my ADD, but when someone posts an answer like "Look up MethodX", I google it and read about 20 lines and then wake up an hour later drooling. Then I go back to find more sample code that does what I want. –  Oct 19 '11 at 21:16
  • Can you add a link to some article explaining the exact problem of WCF on shared hosting environments? – Remus Rusanu Oct 19 '11 at 21:16
  • @RemusRusanu: http://www.google.com/search?aq=f&sourceid=chrome&ie=UTF-8&q=This+collection+already+contains+an+address+with+scheme+http. –  Oct 19 '11 at 21:18
  • And remus, before you recommend BaseAddressPrefixFilters, please check this Q: http://stackoverflow.com/questions/7801674/wcf-services-on-shared-hosting-this-collection-already-contains-an-address-with –  Oct 19 '11 at 21:19
  • That wasn't supposed to sound as curt as it did :) –  Oct 19 '11 at 21:20
  • How about http://blogs.msdn.com/b/rampo/archive/2008/02/11/how-can-wcf-support-multiple-iis-binding-specified-per-site.aspx ? It includes 3.0 and 3.5 (there isa second step in 3.5, besides the baseAddressPrefix fix) – Remus Rusanu Oct 19 '11 at 21:22

1 Answers1

3

In my opinion, WCF is overly complex for simple web service scenarios. I would highly recommend using Page Methods instead. Dave Ward has a great article on how to do this on his blog.

http://encosia.com/using-jquery-to-directly-call-aspnet-ajax-page-methods/

jrummell
  • 42,637
  • 17
  • 112
  • 171
  • hmm, looks simple, other than the pagemethod itself being in C. I'll give it a go tonight, maybe look up sample vb page methods. Thanks. will accept later if appropriate. –  Oct 19 '11 at 21:14
  • I'm with you, but i'd say asp.net mvc is a much better way to go in most scenario's. It is so easy to do ajax with. – Paul Creasey Oct 19 '11 at 21:14
  • Ended up getting an ASMX to work. This got me there though and I'm sure it works (if you're not me) so I'll accept it. Thanks. –  Oct 20 '11 at 02:14