Tuesday, September 22, 2009

VS2008: Adding Web Service Reference, not hosted at default 80 port

Today I come across an issue while trying to consume a third party web service for B2B integration project. The web service has been hosted on some port i.e. 8097 other then default 80 port for IIS. When I try to add the web service reference in to my VS 2008/ ASP.Net 2.0 project it gives me this error:

Metadata contains a reference that cannot be resolved: 'http://test.org/myservice/service.asmx?wsdl'.
There was an error downloading 'http:// test.org/myservice/service.asmx?wsdl '.
Unable to connect to the remote server

The web service i have been trying to include in my project was hosted at 'http://test.org:8097/myservice/service.asmx'

I 'Binged' the problem, but I can't find anything, lot of people have put this problem but I didn't found any solution..

Here are the steps I took in order to resolve this problem:

  1. Add this web reference 'http://test.org:8097/myservice/service.asmx?wsdl' instead of default, it will generate the proxy but still you won't be able to call the web service.
  2. Next step is to go to Settings.settings in property folder of you project, open it you'll find a URL entry for your web service, its type is 'Web Service URL'. Go and change its value to 'http://test.org:8097/myservice/service.asmx'
  3. Now check the web.config entry for your web service URL and make sure that it points to the correct URL with port included in it. [you need to do this step if the web service URL behavior is 'dynamic' ]

Happy Coding!

Tuesday, September 08, 2009

Web.Config: <authorization> Element

Here is the web.config snippet to allow access to only one user to web site or web service and deny access to all other users either authenticated or anonymous.

Allow Access to only one domain user

Allow access to any autheticated domain user

<authentication
mode="Windows"/>


<authorization>

<allow
users="basit"/>

<deny
users="*"/>

</authorization>

<authentication
mode="Windows"/>


<authorization>

<allow
users="basit"/>

<deny
users="?"/>

</authorization>


It will enable windows authentication and only allow user "basit" to access the web site or web service. It will deny access to all other users.


It will enable windows authentication and allow user "basit" and any other authenticated user to access the web site or web service. It will deny access to any anonymous user.

Thursday, September 03, 2009

Translation as a Service: Microsoft; Bing Translator vs. Google Translator

I just come across Bing Translator from Microsoft; I have been working on a multilingual web portal, so I have been using Google Translate quite extensively. I have also placed a code snippet in my previous post that can help anyone to translate variable names, web service response and error messages at run time from Google supported languages to English.

Today for the first time I come across Bing Translator and the first impression to this service I awesome, I really liked its auto detect feature, I tried it and amazingly it worked fine, WOW, so as predicted Bing is going to give hard time to Google. Competition always helps companies to grow and at the same time provide better services to the end users.

An early look at the Bing Translator shows that it provide a lot more features as compared to Google Translator.


It has tools for end users, providing lot of good quality services like you can add an MSN blog for translation, that's really cool.


It also provides cool tools for the web master and last but not the least, tools for Developers J to build cool multilingual applications using any of the available options, good things is that it has support for JavaScript through AJAX Interface API. I look forward to lot of cool applications written on top of it.

I believe there is a huge potential in this regard building translation as a service, and I think Microsoft is right on track this time!


GMail goes down once again!

Gmail is down again, and what's the excuse this time :)

But this error seems unfair to the user, there should be a specific error message for it going down.

Tuesday, September 01, 2009

Gmail Account Lockdown for 24 hours! Reasons Unknown!

I come across an interesting situation today, while I was going through my emails on Gmail after three daysJ. My Gmail account is locked down for 24 hours without any reasons! That's bad, so anyone have any idea what might be the reason for that.