"The file [x] has not been precompiled" error with web service

Last post 05-08-2008 12:55 PM by CynthiaD. 3 replies.

Sort Posts:

  • "The file [x] has not been precompiled" error with web service

    05-07-2008, 4:04 PM
    • Loading...
    • CynthiaD
    • Joined on 07-30-2002, 7:57 PM
    • Southern California
    • Posts 218

    I am trying to deploy a web service for the first time on our remote server.  This web service works fine locally.

    First I just moved the asmx and DLL, and I was getting the dreaded "The file has not been precompiled", so I created a Web Deployment Project and I DID precompile it into a single DLL.  However, I am STILL getting this error when I try to browse to it.

    On the server (Windows 2003 using IIS 6.0) I created a subdirectory of an existing web site, and made it into a virtual directory and an application.  I made sure it was using ASP.NET 2.0.  I made sure it was using the right Application Pool.  Then I moved up the following files to the server:

    asmx file
    web.config
    several datasets that it uses to connect to a database (xsd, xss, xsc files) 
    the DLL that it was compiled into (in the bin directory)
    PrecompiledApp.config

    When I attempt to browse to www.ourwebsite.com/WebServiceFiles/webservice.asmx, I get the "file webservice.asmx has not been precompiled" error. What is the trick to getting this to work?  All the documentation insists that deploying web services is a simple as toast, but I am not finding that to be the case!

    Cynthia
  • Re: "The file [x] has not been precompiled" error with web service

    05-07-2008, 7:20 PM
    • Loading...
    • Bruce L
    • Joined on 02-08-2007, 6:53 PM
    • Posts 734

    Well.. is your web site precompiled?  If not, remove the precompile.config (or something like that on the server)

    Bruce
    DiscountASP.NET: Developer Ready ASP.NET Web Hosting
    - Microsoft Gold Certified Partner
    - Voted 2007, 2006 & 2005 Best ASP.NET Web Hosting by asp.netPRO Magazine
  • Re: "The file [x] has not been precompiled" error with web service

    05-08-2008, 5:46 AM

    Please refer the below link,

    http://www.velocityreviews.com/forums/t120117-error-when-moving-a-vs-2005-precompiled-site-to-test-server.html 

    Shah Dharnendra G
    Analyst Programmer,
    GTL-Ahmedabad
  • Re: "The file [x] has not been precompiled" error with web service

    05-08-2008, 12:55 PM
    • Loading...
    • CynthiaD
    • Joined on 07-30-2002, 7:57 PM
    • Southern California
    • Posts 218

    Actually, I discovered the problem was, I was trying to reference the web service using the physical folder name instead of the virtual folder name. 

    Duh! Never mind -- all is well.

    Cynthia
Page 1 of 1 (4 items)