WSE 2.0 (sp1 & earlier) - The mistory of error code WSE032
For some time now I've noticed a bug while working with
WSE 2.0 sp1, it seems that all my sample projects were
working fine while my comp. was connected to the net via
Net cable or Modem connection but as soon as I've
disconnected my comp. my apps stopped working and all i
got was the following error:
An unhandled exception of type
'System.Configuration.ConfigurationException' occured in
microsoft.web.services2.dll
Additional information: WSE032: There was an error
loading the microsoft.web.services2 configuration
section
I tried to dig some information from the web but there
wasn't much information regarding this WSE032 error so
I've decided to take it the hard way and find out what's
bothering my WSE.
It seems that as part of its loading WSE uses
System.Net.Dns.GetHostName(), when my comp. was
disconnected its hostname wasn't resolved so ...
(here comes the solution)
1. Open Dos Window (cmd) and enter the HOSTNAME command
to find out what is your hostname
2. Open for edit the file :
C:\WINDOWS\system32\drivers\etc\hosts
2. Change the following line :
Before:
127.0.0.1 localhost
After:
127.0.0.1 localhost
yourhostname
That's it... no more WSE032 error.... and you can
continue and develop WSE project even on a disconnected
laptop :-)