views:

1968

answers:

2

I have a web service implemented in ASP.NET 2.0 and have pre-compiled it using the aspnet_compiler.

I have no clue now how to deploy it to IIS, can someone point me in the right direction? I am using IIS 6.0 on a Windows Server 2003 machine.

I have placed the pre-compiled files into a virtual directory, when I access the service through the browser I get the following parser error message:

Parser Error Message: The page must have a 
<%@ webservice class="MyNamespace.MyClass" ... %> directive.

I then checked the .asmx file for said directive and the contents have been changed by the compiler to:

This is a marker file generated by the precompilation tool, and should not be deleted!

UPDATE: When I place the non-pre-compiled web app in the virtual directory it works fine, when I place the pre-compiled wen app in the virtual directory, I get the above errors.

Anyone have any ideas!?

+1  A: 

You can either copy the contents of the output directory into the virtual directory on IIS and it should all just work. You will need to set up the App Pool and configure the virtual directory for ASP.NET just like a non-compiled website. Make sure you delete everything from the virtual directory (if there was a previous non-compiled site there).

Also you can use Web Deployment projects, which can serve as an input to an MSI installer.

The ASMX file contents are correct. Are you sure you have configured the Virtual Directory with an Application? Open the properties window by right clicking on the virtual directory and ensure the "Application Name" (on the "Virtual Directory" tab) is set and is editable.

Also have chosen the correct ASP.NET version on the tab? Check this on the "ASP.NET" tab of the properties window"

Robert Wagner
I revised my original post, I have already tried placing the pre-compiled app into a virtual directory...
mmattax
I believe the virtual directory is set up correctly, it will serve the non-pre-compiled application fine, I just wanted to try to deploy a pre-compiled version...
mmattax
Not sure if it matters, but the virtual directory is being run under a .NET 1.0 application, but I have the virtual directory set to 2.0.
mmattax
That could be it, try it. The deploy process for a non-compiled project sets up the Application Pool,etc for you. Try deploying the non-compiled first, delete the files then copy the new ones in.
Robert Wagner
A: 

did you deploy the entire bin directory? You need to make sure the .COMPILED files created by aspnet_compiled are in your bin dir.

TonyB