Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


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

Posted on 2004-11-02
Medium Priority
Last Modified: 2008-02-26

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  ;-)

Question by:new_user_xyz
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 3
  • +3
LVL 28

Expert Comment

ID: 12472013
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

LVL 70

Expert Comment

by:Éric Moreau
ID: 12472114
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.
LVL 28

Expert Comment

ID: 12472127
To create the virtual directory
go to IIS console, right click on the directory, select Properties
there click button Create
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 12472436

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.
LVL 25

Expert Comment

ID: 12472485
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.

Author Comment

ID: 12474008

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??

Assisted Solution

dabitbol earned 1000 total points
ID: 12474682
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
LVL 10

Accepted Solution

jnhorst earned 1000 total points
ID: 12479022

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:


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.



Author Comment

ID: 12485022
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 ;-) !!

Expert Comment

ID: 12485087
Did you specify it this way :


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

Expert Comment

ID: 12489936
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:


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



LVL 10

Expert Comment

ID: 12489943

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


Author Comment

ID: 12502506
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 ;-)

Expert Comment

ID: 12504126
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.

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

596 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