Professional Web Applications Themes

deploying web service - ASP.NET Web Services

I have developed a webservice that my application uses .Both the werbservice and the application runs on local host . I have created reference to the webservice from my project.I can access the web service by giving the url as [url]http://Webdev/DALSvc/dalsvc.asmx[/url] .webdev is local machine . Now I have to deploy the application and the webservice on the production server . I tried to deploy the webapplication . I have also deployed the webservice on the webserver. When I run the application it throws exception . The webservice on the production server is NOT acccessible to the outside world by ...

  1. #1

    Default deploying web service

    I have developed a webservice that my application uses .Both the werbservice
    and the application runs on local host . I have created reference to the
    webservice from my project.I can access the web service by giving the url as
    [url]http://Webdev/DALSvc/dalsvc.asmx[/url] .webdev is local machine . Now I have to
    deploy the application and the webservice on the production server . I tried
    to deploy the webapplication . I have also deployed the webservice on the
    webserver. When I run the application it throws exception .
    The webservice on the production server is NOT acccessible to the outside
    world by doing something like [url]http://something.com/DALSvc/dalsvc.asmx[/url] but
    if I try to run the webservice on the PRODUCTION by using terminal services
    and doing [url]http://localhost/DALSvc/dalsvc.asmx[/url] It displays all the methods .
    SO that shows the webservice is working on the Production server.

    How do I change the webreference to point to Production server... Cos if i
    try to set the webreference from the project solution on my machine it gives
    me error message.

    Any help is appreciated

    Thanks in advance.

    Ken
    Ed Guest

  2. #2

    Default Re: deploying web service

    Hi Ken,

    What I do is create a proxy for the web service on my DEV machine, by
    running wsdl.exe.

    Then I add the proxy to my application.

    Then, after I've deployed the web service to my web server, I simply change
    the URL property of the proxy. (Near the top of the proxy code, you'll see
    something like Me.URL = [url]http://localhost/mywebservice.asmx[/url] and I change it
    to Me.URL = [url]http://mywebserver/mywebservice.asmx[/url].

    I hope this is what you are looking for.

    ---Selden


    "Ed" <Eddiscussions.microsoft.com> wrote in message
    news:26E61978-9413-4DBE-BB86-3E20CB96FD26microsoft.com...
    >I have developed a webservice that my application uses .Both the
    >werbservice
    > and the application runs on local host . I have created reference to the
    > webservice from my project.I can access the web service by giving the url
    > as
    > [url]http://Webdev/DALSvc/dalsvc.asmx[/url] .webdev is local machine . Now I have
    > to
    > deploy the application and the webservice on the production server . I
    > tried
    > to deploy the webapplication . I have also deployed the webservice on the
    > webserver. When I run the application it throws exception .
    > The webservice on the production server is NOT acccessible to the outside
    > world by doing something like [url]http://something.com/DALSvc/dalsvc.asmx[/url]
    > but
    > if I try to run the webservice on the PRODUCTION by using terminal
    > services
    > and doing [url]http://localhost/DALSvc/dalsvc.asmx[/url] It displays all the methods
    > .
    > SO that shows the webservice is working on the Production server.
    >
    > How do I change the webreference to point to Production server... Cos if i
    > try to set the webreference from the project solution on my machine it
    > gives
    > me error message.
    >
    > Any help is appreciated
    >
    > Thanks in advance.
    >
    > Ken

    Selden McCabe Guest

  3. #3

    Default Deploying Web service

    NEWBIE WARNING:

    I have a VB.Net web service that is working fine on my PC, but I need to
    deploy it on a server in our network. What's the easiest way to do this?

    --
    TFWBWY...A


    Bryan Guest

  4. #4

    Default Re: Deploying Web service

    Add a web deployment project to your solution and use it to deploy the
    web service to your server.

    Peter Kelcey

    Peter Guest

  5. #5

    Default Re: Deploying Web service

    Thanx for your help--that gets me started, but, if you'd indulge me, I have
    some more questions...

    How do I know where to tell it to install? How many levels of dependencies
    will the setup package create (one of the References to the WS has a
    Reference to another Assembly that I created)?

    Once I get the WS installed, how do I know how to reference it from another
    program (this WS will be called from a third party product--all internal to
    the server box)?

    "Peter Kelcey" <com> wrote in message
    news:googlegroups.com... 


    Bryan Guest

  6. #6

    Default Re: Deploying Web service

    Bryan,

    My comments below all assume you are using Visual Studio 2002 or 2003.

    By default, the installation package will install you web service to
    the default website in IIS. The installation routine will give your
    user the option of specifying a virtual directory within this web site.
    Here are the steps for setting the default value of this virtual
    directory.
    1) Right click the web setup project and select "VIEW->FILE SYSTEM"
    2) From the new screen that opens click on the folder labeled "Web
    Application Folder"
    3) In the visual studio properties window, you will see all the
    properties for your installation (i.e. virtual) directory.
    What I like to do for my installations, is setup the physical directory
    and virtual directory prior to installation. I.e. I create my physical
    folder first. D:\web projects\mywebserviceproject\ Then, in IIS, I
    create my new virtual directory and point it to this physical folder.
    Then when someone runs my installation routine they install to my new
    virtual directory and everything goes where I want it to.

    When you create your web setup project, you will need to tell it what
    you want it to install. To do this, right click on the project and
    select the "ADD->PROJECT OUTPUT" option from the pop-up menu. Using the
    project drop down box, select your web services project. The setup
    project. Next, select the content that you need installed from the
    listbox just underneath the drop down list. If you select "primary
    output" and "content files" then you assemblies, asmx files and all
    other primary content files will automatically be included. Any other
    assemblies that your project references will be considered primary
    output for the project and will be included. Any dependencies that your
    project have (such as the .NET runtime will also be included). Within
    the setup project, you will be able to see what assemblies have been
    included by looking in the "detected dependencies" folder
    Selecting "Source Files" will include your actual code files (I don't
    recommend this.) "Debug" will include your .PDB debug files (I don't
    recommend this either). "Localized Resources" will include your resx
    resource files.

    As for accessing your web service, you just need the URL of the virtual
    directory. Example, if you installed it to a machine called
    "Server1" and into a virtual directory called "Service1" you
    can access you service at
    http://Server1/Service1/webservicepagename.asmx This is the URL you
    would need to give to your third party. To access the WSDL description
    of you web service you use the same URL, but add the ?WSDL to the end.
    http://Server1/Service1/webservicepagename.asmx?wsdl

    I'd recommend checking out the MSDN doents on deployment projects
    at
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vbconDeploymentOverNetwork.asp
    The pages don't have a ton of information on them, but they are an
    okay starting place for information. You can do a lot more stuff with
    setup packages than I've mentioned here (and there are other
    deployment options), so I'd and reading as much doentation as you
    can and experimenting to find out what works for you.

    Hope that helps

    Peter

    Peter Guest

Similar Threads

  1. Deploying Web Service on Windows Server 2003
    By Kalem in forum ASP.NET Web Services
    Replies: 3
    Last Post: January 14th, 03:54 AM
  2. error deploying web service
    By Mark Finkel in forum ASP.NET Web Services
    Replies: 8
    Last Post: December 5th, 01:35 AM
  3. Problems in deploying the web service on other webserver
    By Rinoo Rajesh in forum ASP.NET Web Services
    Replies: 2
    Last Post: May 3rd, 04:48 AM
  4. Deploying Web App inside a DMZ
    By Paul P in forum ASP.NET Security
    Replies: 1
    Last Post: March 7th, 07:43 AM
  5. Problem deploying web service
    By Sky Fly in forum ASP.NET Web Services
    Replies: 0
    Last Post: July 29th, 08:26 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139