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


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

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Éric MoreauSenior .Net ConsultantCommented:
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.
To create the virtual directory
go to IIS console, right click on the directory, select Properties
there click button Create
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

new_user_xyzAuthor Commented:

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.
Read the following MSDN article on how to deploy the XML Web Services:


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.
new_user_xyzAuthor Commented:

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

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.



Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
new_user_xyzAuthor Commented:
Hi at all ;-) ... thanx 4 answering ...

allright - I created a new website and gave it the host header ''. 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 ;-) !!
Did you specify it this way :


Don't forget to write the http:// because if you don't you will get the 404 error!
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:



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

new_user_xyzAuthor Commented:
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 ;-)
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.