I am currently working on a c# asp.net web project and I am trying to install the soap service to be used in iis7.
I have used Visual Studio to build a deployment package by selecting Only files need to run the application in the package/publish settings window.
I have then copied the contents of the built package to a location within my website but when I trying and access the service using http://localhost/EmailSoapService/EmailSoapService.asmx but I am getting an error. The error I’m getting is
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not create type 'EmailSoapService.EmailSoapService'.
Source Error:
Line 1: <%@ WebService Language="C#" CodeBehind="EmailSoapService.asmx.cs" Class="EmailSoapService.EmailSoapService" %>
Source File: /EmailSoapService/EmailSoapService.asmx Line: 1
Version Information: Microsoft .NET Framework Version:2.0.50727.5456; ASP.NET Version:2.0.50727.5456
I don’t understand why it is saying it can’t find the .cs file. Admittedly this isn’t on the server but as I selected to only export what’s required to run the application, I assume the .cs file isn’t required on the webserver.
Thanks for any help you can provide.
A build package typically consists of a “bootstrap” executable that fires up an installer for the package. It sounds as though you copied the package, but didn’t install the package, hence the site thinks it needs the core .cs files to accommodate the request. You can’t just copy the build/deployment package – you typically need to deploy it to the destination server.
You might find some extra insight here. Hope this is helpful. Good luck!