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

x
?
Solved

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

Posted on 2004-11-02
14
Medium Priority
?
1,233 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
Comment
Question by:new_user_xyz
[X]
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
14 Comments
 
LVL 28

Expert Comment

by:mmarinov
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

Regards!
B..M
0
 
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.
0
 
LVL 28

Expert Comment

by:mmarinov
ID: 12472127
emoreau,
To create the virtual directory
go to IIS console, right click on the directory, select Properties
there click button Create
B..M
0
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

by:new_user_xyz
ID: 12472436
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
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.
0
 

Author Comment

by:new_user_xyz
ID: 12474008
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
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
0
 
LVL 10

Accepted Solution

by:
jnhorst earned 1000 total points
ID: 12479022
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
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 ;-) !!
0
 
LVL 3

Expert Comment

by:dabitbol
ID: 12485087
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
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:

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
ID: 12489943
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
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 ;-)
0
 
LVL 3

Expert Comment

by:dabitbol
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.
0

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