Deploying a web service to remote machine

Last post 02-07-2008 2:46 PM by Tyto. 4 replies.

Sort Posts:

  • Deploying a web service to remote machine

    02-06-2008, 6:26 PM
    • Loading...
    • Tyto
    • Joined on 12-14-2005, 8:34 PM
    • Posts 23

    So I've written my new ASP.Net web service using Visual Studio Express 2008, tested it on my machine, and now want to deploy it to a remote machine I have Remote Desktop access to. Fortunately, VS 2008 includes a wondrous new Publish Wizard; I type the URL to the remote server, Publish, and ... nada. No errors. No files.

    OK, it can also use UNC names, so I'll just use that and ... nothing again.

    Right, publish to my local machine, zip up the files created, FTP them to the remote machine, expand them to the \inetpub\wwwroot folder, connect to the server with the path I just created.

    Of course that won't work, I have to create an IIS virtual directory for the web service on the remote machine, right? Done; Read access, Scripts and Executable permission, enable anonymous access, and voila ... HTTP 404.

    Can I connect at all? Make a test.htm file, connect, and success, I can connect. So why can't I connect to my web service? Are .asmx ISAPI extensions enabled? Yup.

    Google the problem ... wow, there sure are a lot of companies selling courses and consulting services for ASP.Net web services.

    I must be missing something fundamental, every web service in existence has to do this, it can't be this hard.

  • Re: Deploying a web service to remote machine

    02-07-2008, 11:14 AM
    • Loading...
    • sswanner1
    • Joined on 08-17-2005, 8:33 PM
    • Clackamas, OR
    • Posts 471

    I didn't have a lick of problems with the web service I created with Visual Studio 2008.  Make sure that the correct framework version is selected in IIS.  Make sure that the version of the framework is what you are expecting in visual studio (since you can target different version in 2008)

    Mark this post as the "Answer" if it was the answer.
  • Re: Deploying a web service to remote machine

    02-07-2008, 1:45 PM
    • Loading...
    • Tyto
    • Joined on 12-14-2005, 8:34 PM
    • Posts 23

    You are fortunate to have no problems deploying, but the fact that someone else successfully deployed does me no good. Did you try the Publish wizard to a remote machine and it worked?

    Only ASP.Net 2 is installed on the remote machine and it is selected in the VD Properties page.

    I tried deploying a variety of files to the remote server; .jpg, .gif, and .htm pages all load. .asp, .aspx, .asmx all return 404. Changing the extension of a .htm file to .asp prevents it from loading. All these file types are registered ISAPI extensions.

  • Re: Deploying a web service to remote machine

    02-07-2008, 2:41 PM
    • Loading...
    • sswanner1
    • Joined on 08-17-2005, 8:33 PM
    • Clackamas, OR
    • Posts 471

    Yes.  If an HTML files runs fine and you rename it to .aspx, then that tells me that something is wrong with your configuration in IIS.  I don't think it has anything to do with visual studio by what you've described...  Here are the typical things I would check for in this case:

     1) Make sure that the directory is configured as an application in IIS
     2) Make sure that the correct framework is selected in IIS
     3) Make sure you are targetting the .net 2.0 framework from visual studio and not 3.0 or 3.5
     4) Make sure you have given the ASP.NET account permission to the directory where your application resides (NETWORK SERVICE in windows 2003)

    After checking all these things, what happens?

    Mark this post as the "Answer" if it was the answer.
  • Re: Deploying a web service to remote machine

    02-07-2008, 2:46 PM
    Answer
    • Loading...
    • Tyto
    • Joined on 12-14-2005, 8:34 PM
    • Posts 23

    Good suggestions. The directory is an application, the correct .Net framework is installed and selected in IIS, and the ASP.Net account has permission to the VD location.

    I found it. The Web Service Extensions property for the IIS server on the remote machine had prohibited ASP.Net extensions. Enabling these allowed opening the pages.

Page 1 of 1 (5 items)
Microsoft Communities
Page view counter