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

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

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!

5/7/2008 8:04:11 PM
asp.net.config-deploy 12495 articles. 0 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 11

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

DiscountASP.NET: Developer Ready ASP.NET Web Hosting
- Microsoft Gold Certified Partner
- Voted 2008, 2007, 2006 & 2005 Best ASP.NET Web Hosting by asp.netPRO Magazine
5/7/2008 11:20:57 PM

Please refer the below link,


Shah Dharnendra G
Sr.Analyst Programmer,
5/8/2008 9:46:53 AM

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.

5/8/2008 4:55:58 PM

Similar Artilces:

VS.NET 2005 is ignoring in web.config strict="true". I get no error when I try this: Dim x As Integer = "string"
Hello,I have this in my VS.NET 2005 web.config <compilation debug="true" strict="true" explicit="true">When I do this in my vb code:Dim x As Integer = "string"I get no error. When I hit compilation I also get no error. What am I doing wrong?Thanks for helping!Regards,J. Bauer It's a bug of some sort See this response by Scott Guthriehttp://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=3c1c9898-8076-4f69-a5e2-e99573d03c6e Unfortunately we don’t have a GUI based way to configure this. L It is something we will make sure gets added back in, though, with the next...

Web deployment project
I created a web deployment project - merge all files to singe assembly output. I am puzzled which files do I need to deploy.I end up with "release" folder and many files in it ,and a "bin" folder inside with my precompiled single assembly and again someadditional files.I do not see a web config file in this folder. So my question is do I need to deploy "release" or "bin" folder or just the precompiled single assembly to my remote web server ?? Also what happens to a web.config file in this case ??   Thanks     Did you choose &quo...

Is that need to upload "global.asax", "web.config" file to web server?
hi all...here is my problem......... Is that need to upload "global.asax", "web.config" file to web server? let say my asp.net main form is "WebForm1.aspx, after i upload WebForm1.aspx to webserver, Is that need to upload "global.asax", "web.config" or other file to the website? Hi, You need to upload your web.config file. If you are making use of your global.asax, then you need to upload the same. Making use, per say, you are storing some application variables etc., in the global.asax.vb or .cs files. Note that you don't nee...

Visual Studio 2005 Profiler "Launch Error: The web.config file xxx\web.config has been changed and backup information was lost."
Hi,  I am experiencing this error when trying to start a Visual Studio 2005 profiling session (Instrumentation) for my ASP.NET 2.0 web application.  I could not find any information regarding this issue and have no idea what might cause the problem, as the Visual Studio 2005 profiler already worked with that very same application, a couple of weeks ago. Anyone? Thanks in advance! Hello, Can you tell me if you found a solution for the issue because I'm experimenting the same issue ? Thanks !...

Error: Server Error in '/' Application. The "web.config" file is attached for your reference.
Dear All, I receive the following error & the web.config file is copied below for your reference. body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } ...

"type" attribute of "Section" element in web.config file
Hi, I want to create my custom section in web.config, but it dosn`t work and no exceptions are thrown My code: namespace Bus {   public class WebConfigurationSection: ConfigurationSection   {     public WebConfigurationSection()     {     }     [ConfigurationProperty("FromMail", IsRequired=true)]     public String FromMail     {       get { return (string)this["FromMail"]; }       set { this["FromMail"] = value; }   &nb...

What happened to the "Web Deploy" and "Web Deploy Options" menu items under C++ Builder 2007.
I've converted a C++ Builder v6 ActiveX project over to C++ Builder 2007 and the "Web Deploy" and "Web Deploy Options" menu items are no longer available under the "Project" main menu. This is in spite of the fact that the latest documentation indicates that they should be present. Any suggestions? Has this functionality been removed from latest release? I've tried doing both an installation repair and full re-install without success. Thanks James O'Brien Hello, Delphi7 and CBuilder6 were the last versions to have the Web Deploy f...

Please compare "web service" and "remote services"
Somebody, please tell me the different beetween "web services" and "remote services". So, "web services" and "remote services" which one is better? Please tell me This might provide some insight. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/dotnetremotearch.asp The really question at hand is what kind of project? Frank ...

PB11 .NET "smart client" PUBLISH ISSUE... "Error when transfering files."
Before I start I should state that I'm not the Microsoft server admin... I have gotten this to work as recently as two days ago, but then it mysteriously stops working without any reason. It pushes most of the files out to the server correctly, but I did notice thatthe "CONFIGURATION.XML" file is missing. The "Publish Application" takes a while before failing and eventually fails with the message... "Error when transferring files." PLEASE HELP. Here is a list of what it is able to put on the server... ../publish.htm ../setup.exe ../tes...

<allow users="*" verbs="enterSharedScope"/> in web.config file
Hi First time i am working with webparts in my application. Please can any one explain me the difference between "enterSharedScope" and "modifyState"  in web.config file <webparts> tag. It would be great help to me to understand if answer to my post with sample.<webParts> <personalization><authorization> <allow users="*" verbs="modifyState"/><deny users="*" verbs="enterSharedScope" />  </authorization></personalization> </webParts>  Thanks   ente...

Programmatically Populating the "mail.settings" section of "system.net" in web.config
I am fully aware that the system.net section of web.config typically looks something like this:  <system.net>    <mailSettings>      <smtp from="noreply@sample.com">        <network host="smtp_server_address" userName="myUsername" password="myPassword" />      </smtp>    </mailSettings>  </system.net>If web.config is so populated then this info is used for sending e-mails generally and al...

Can "Add Web Reference" if web service deployed to new web site, Can't add ref if deployed to Virt Server under Default web site (Sharepoint)
I have created a web service wich I can deploy successfully to a new IIS Web, but of course I have to set the port to something other than 80 (and I'd rather just use a virtual server under the Default web). If I try to deploy my web service under the Default Web as a new virtual server, and then try to "Add a web Reference" to the service, it fails with a 404: not found error. Notes: WServer 2003 My IIS server is running Sharepoint Portal Server (SPPS)sp2.  VS2005 Any ideas? /Bob C in GRR In Sharepoint Portal Admin I had to add a Path Exclusion.  Took me a whi...

File write error on file "acct" in module "GWEACCT".
--____HHJZYVOOFXDLYDIWHUSF____ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: base64 Content-Disposition: inline; modification-date="Tue, 24 Sep 2007 10:15:42 -0400" VGhlIG1vcm5pbmcgb2YgV2VkLiBTZXB0IDE5dGguIHdlIHN3aXRjaGVkIG91ciBHV0lBIG92ZXIg dG8gdmVyc2lvbiBHVzYuNSBTUDYgZnJvbSB2ZXJzaW9uIEdXNS41LiAgVGhlIG5leHQgbW9ybmlu ZyB3ZSBzdGFydGVkIGdldHRpbmcgdGhlIGZvbGxvd2luZyBlcnJvciBpbiBvdXIgR1dJQSBsb2cg ZmlsZTsNCg0KMDktMjAtMDcgMDg6MjI6MTAgMCBVbmtub3duLCBlcnJvciBjb2RlID0gODIxMA0K MDktMjAtMDcgMDg6MjI6MjEgMCBNU0cgNDAwIERlZmVycmVkIGRlbGl2ZXJ5IGZpbGUgbWVtb3J5 IGVy...

File write error on file "acct" in module "GWEACCT"
Getting this on GWIA 6.02 scrolling across the screen. Runs on a Win2ksp3 box. Searching TID's...... JG I'd probably whack most of the subdirs under gwia and let gwia rebuild. -- Michael J. Bell Novell Support Connection Volunteer Sysop Author of Guinevere (http://www.openhandhome.com) PLEASE: Do not e-mail me privately unless specifically asked. I'm a volunteer, not a Novell employee! All opinions and advice provided are MINE alone and NOT Novell's unless specifically identified as such. Novell does not officially monitor these forums. Enhance...

Web resources about - "The file [x] has not been precompiled" error with web service - asp.net.config-deploy

Resources last updated: 12/10/2015 11:07:27 AM