开发者

Visual Studio 2008 - ASP.NET Web Service Application - Cannot consume web service

I'm running on Windows 7 I have a ASP.NET Web Service Application project in Visual Studio 2008. I tried to test the Web Service(even with just the initial Hello World Method) : Build Solution, Start Without debugging -> The ASP.NET Development Server starts (localhost: 49345) but the browser (Chrome, Firefox, IE) says : could not find localhost:49345 (http://localhost:49345/Service1.asmx). I thought it might have something to do with IIS so I went into Control Panel -> Programs and features -> Turn Windows Features On and OFF and I selected the Internet Information Servicess clicked OK instaled and restarted the PC. Tried again but got the same error message. I don't know what the deal is. I've tried same thing on my Vista Laptop ( Control Panel -> Programs and features -> Turn Windows Features On and OFF -> Internet Information Servicess not insta开发者_Python百科lled ) and it worked flawless as it should. I read somewhere though, that these web services don't go through the IIS , instead they go straight through the ASP.NET Development Server in the Vistual Studio. Also I've tried to disable Windows Firewall. Still no go.

Any advice is welcomed and great. Please help as quickly as you can.

Thanks


http://localhost:49345 is different from http://localhost:49345/Service1.asmx.

I would suggest from the visual studio, right click on your asmx file and select view in browser. It would resolve the address of asmx and show you the asmx content. This would be a good start to see what is wrong (if something is really wrong)


I figured out what it was.The "hosts" file in the C:\Windows\System32\drivers\etc\ folder Had the problem : besides localhost there were several other things assigned to the 127.0.0.1 I commented all the other lines with 127.0.0.1 except for the 127.0.0.1 localhost. Saved the file. Tried again -> Worked like a charm.

Thaks guys for your help.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜