Quantcast
Channel: Configuration & Scripting
Viewing all articles
Browse latest Browse all 780

Consuming WCF Service within ASP.NET causing problem at deployment end

$
0
0

Ok. This is bit ridiculous.

We've written WCF service and successfully consumed it within ASP.NET application. Everything works like charm at production environment. But, we are experiencing setbacks after deployment.

Here's brief Description:

Say service name is UserService.svc

We've added service reference in application and created service client and class as below:

UserService.UserServiceClient uc1 = new UserService.UserServiceClient();
UserService.User u1 = new UserService.User();

Web.config file looks like this:

<?xml version="1.0"?><configuration><system.web><compilation debug="true" targetFramework="4.0"/><customErrors mode="Off"/></system.web><system.serviceModel><behaviors><serviceBehaviors><behavior><serviceMetadata httpGetEnabled="true"/><serviceDebug includeExceptionDetailInFaults="false"/></behavior></serviceBehaviors></behaviors><serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true"/><bindings><basicHttpBinding><binding name="BasicHttpBinding_IUserService" maxReceivedMessageSize="2147483647" /></basicHttpBinding></bindings><client><endpoint address="http://domain.com/UserService.svc"
        binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IUserService"
        contract="UserService.IUserService" name="BasicHttpBinding_IUserService" /></client></system.serviceModel></configuration>

When we try to browse the page consuming WCF service, we are getting error as:

Server Error in '/' Application.

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. 

Compiler Error Message: CS0234: The type or namespace name 'User' does not exist in the namespace 'UserService' (are you missing an assembly reference?)

Any suggestions about what possibly can causing this would be a great help.

Thank you!


Viewing all articles
Browse latest Browse all 780

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>