Solved

Problems deploying WebService / WebApplication ... how to deploy an application?

Posted on 2004-11-02
1,214 Views
Last Modified: 2008-02-26
Hallo,

I developed a WebApplication and a WebService and want to deploy both to a different machine.
I did this by copying the projectfolders to the new machine (to %systemroot%/inetpub/wwwroot/...).
Afterwards I created a WebSite for each project in the new IIS.

If I try to create a proxy for the WebService with the wsdl.exe I receive an error: HTTP 404 - File not found.
Also it isn't possible to add a webreference to the webservice in Visual Studio. I can browse to the folder of the webservice in Visual Studio but receive an error (file not found) when I click on the .asmx file.

The WebApplication causes an error - acces denied to a file in "...\Temporary ASP.NET Files\root\...".
But the specified file does not exist!

Can anybody help solve the problems?
How to deploy an application to a different machine (never did it before)?

I developed the WebService / WebApplication with IIS 5 (W2000), the new machine is IIS 6 (W2003) -> can this fact cause the problems??

Thanx  ;-)

Andreas
0
Question by:new_user_xyz
    14 Comments
     
    LVL 28

    Expert Comment

    by:mmarinov
    Hi new_user_xyz,

    how do you set the path to the web service ? you have to set it ( in the property window of the web reference for the web service ) URL Behaviour = Dynamic and set the url reference

    also if you deploy web application you have to make the virtual directory for the site to be application

    Regards!
    B..M
    0
     
    LVL 69

    Expert Comment

    by:Éric Moreau
    You normally have to copy the .asmx (or .aspx) into the root folder of your application folder (inetpub/wwwroot/MyWS), in which you also create a bin folder to drop your DLL in.
    0
     
    LVL 28

    Expert Comment

    by:mmarinov
    emoreau,
    To create the virtual directory
    go to IIS console, right click on the directory, select Properties
    there click button Create
    B..M
    0
     

    Author Comment

    by:new_user_xyz
    Hi!

    I haven't set a path to the webservice at all. The only thing I tried is to move the webservice to another machine and then create the proy.dll using the wdsl.exe and csc.exe.
    When using wsdl.exe

    wsdl.exe /o:C:\Inetpub\wwwroot\myApp\bin\Debug\XYZProxy.cs http://msgp-sql/WSXYZ/XYZ.asmx?wsdl

    I receive the error HTTP 404 Status Code: Not Found.
    After that I tried to set a reference to the webservice in a test project (only to see if it works) but receive the same error.

    How can I make the virtual directory for the site to be application??
    Because I'm working with IIS 6 I cannot choose the directory in the IIS console in order to create the directory. I did it like that in IIS 5.
    0
     
    LVL 25

    Expert Comment

    by:nauman_ahmed
    Read the following MSDN article on how to deploy the XML Web Services:

    URL: http://msdn.microsoft.com/library/en-us/cpguide/html/cpcondeployingwebservices.asp

    To access the properties of your web site, right click on your web site/virtual directory,and select Properties.

    If you are setting up the web site properties, select the Home Directory Tab and select Create in the Application Settings section if the Application has not been created yet.

    If you are setting up the virtual directory properties, in the Virtual Directory tab, select Create in the Application Settings section to create the application.

    HTH, Nauman.
    0
     

    Author Comment

    by:new_user_xyz
    Hallo,

    I've encircled the problem. On the new machine doesn't exist a standardwebsite because an crm server is running on that machine which is the standard website. Therefore I've to create a new website for the webservice.
    I tried to do that but it doesn't work! It's not possible to create an proxy.dll via wsdl.exe or to add an webreference to the webservice in another project.
    Does anybody know how to create a new website and add the webservice to that site on an IIS 6??
    0
     
    LVL 3

    Assisted Solution

    by:dabitbol
    Hey, Here's the deal,

    In order for you to create a new website on a server that already has an active web site you have 2 choices:

    1. Create a new website and assign a different Port other than 80 ( as 8080). From then on you can access your site via that port. Works fine, we had the same problem. Don't forget to assign it as an Application though.

    2nd Option, install a 2nd Network card on a different IP (Public), create your website and tell it to answer on that particular IP only, and then tell your Sharepoint to do the same on the other IP.

    I suggest using Option 1 and if you have any kind of router tou can do some port forwarding. N-E ways. There you go!

    Good Luck
    0
     
    LVL 10

    Accepted Solution

    by:
    dabitbol:

    On the machine that already has the CRM, after you create the new site, right click the node in the tree for the site and select Properties.  The Web Site tab will be the default.  You will se a box for "IP Address" which should say "All Unassigned".  Click the Advanced button next to it.  The top section titled "Multiple Identities for This Website" may or may not have an entry with the port and host header.  If not, add one for the site.  You can leave the port at 80, but you will need to have a host header to differentiate this site from the crm site.

    A host header is something like this:

    crm.somedomain.com
    webservices.somedomain.com

    Here, "webservices" and "crm" are c-names that differentiate the two sites that are on the same server.  What you'll need to find out is how the crm is accessed by the users.  You can check the properties for the crm site and click the same Advanced button to see if there are any host headers the site is configured to answer to.  You could then create a similar, but different host header for your site and ask the network admin types to add that c-name (the first part) in the network's DNS so you can access the service via that host header.

    John

    0
     

    Author Comment

    by:new_user_xyz
    Hi at all ;-) ... thanx 4 answering ...

    allright - I created a new website and gave it the host header 'webservices.mydomain.com'. After that I created the DNS entry (Host A) for 'webservices'.
    For the webservice I created a virtuell directory called 'WSTest'.
    Unfortunately I cannot access the webservice from within the visual studio. The address I used to enter the WS was 'http://webservices/WSTest/WSTest.asmx'.


    My second approach was to create a website with a different port (8080).
    I could enter the webservice directory via the visual studio wizard but when I click on the .asmx file I receive the HTTP error 404: File not found.

    I need help ;-) !!
    0
     
    LVL 3

    Expert Comment

    by:dabitbol
    Did you specify it this way :

    http://localhost:8080/WSTest/WsTest.asmx

    Don't forget to write the http:// because if you don't you will get the 404 error!
    0
     
    LVL 10

    Expert Comment

    by:jnhorst
    I think you want to create a C-name DNS entry, not a A record, but I am wading out of my area of expertise.  I know the basic ideas behind DNS but by no means am I an expert on that.

    When you say you cannot access the webservice from within VS, do you mean access it as a project to edit?  Or do you mean set a web reference from a consuming app?  If you are trying to access it for editing in VS, I would recommend doing that on a dev box and then deploy to the server.

    If you are trying to set a web reference, do you have a virtual folder named WSTest in which WSTest.asmx lives?  Or does the asmx file live in the web's root?  If it is in the root and you are trying to set a web reference, it would be:

    http://webservices.yourdomain.com/WSTest.asmx.  

    If you have this in a virtual folder, it would be:

    http://webservices.yourdomain.com/WSTest/WSTest.asmx

    John

    0
     
    LVL 10

    Expert Comment

    by:jnhorst
    dabitol:

    Sorry I addressed you in my first post, I meant to address the author of the question.  My bad.

    John
    0
     

    Author Comment

    by:new_user_xyz
    Hi! ... I don't know what happend but know it's working!! ... I choosed the solution "Multiple Identities for This Website" and created a AHost DNS entry. At first it was not to possible to address the webservice, but when I tried today morning it 's working.

    Thanx for advise! I sugeest to split the points between you both dabitbol and jnhorst.


    Maybe you can answer one more question ;-)

    If I have an webapplication including a webreference to a webservice and I want to move both to a new environment. In this case the address of the webservice changes. Do I have to compile the webapplication again with the new address? Or is there a 'dynamic' way to change the address in the webapplication?

    Thanx ;-)
    0
     
    LVL 3

    Expert Comment

    by:dabitbol
    Yeah, if you go in Visual Studio, in Web Reference properties, you can set it to be dynamic, it will then be in your web.config file.
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Learn The Basics of Ethical Hacking & Pen Testing

    Computer and network security is one of the fastest growing and most essential industries in technology, meaning companies will pay big bucks for ethical hackers. This is the perfect course to leap into this lucrative career, learning how to use ethical hacking to reveal ...

    Suggested Solutions

    Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
    IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
    This video is in connection to the article "The case of a missing mobile phone (https://www.experts-exchange.com/articles/28474/The-Case-of-a-Missing-Mobile-Phone.html)". It will help one to understand clearly the steps to track a lost android phone.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    933 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now