Subscribe to Subscribers
Talk to Webmaster Tony John

Online Members

More...


Forums » .NET » WCF »

'System.ServiceModel.ServiceHost.ServiceHost()' is inaccessible due to its protection leve


Posted Date: 08 Nov 2011      Posted By:: dhanu     Member Level: Silver    Member Rank: 2398     Points: 3   Responses: 1



Dear friend

i have done a sample wcf service.
but when i debuging its asking

Error 1 'System.ServiceModel.ServiceHost.ServiceHost()' is inaccessible due to its protection level C:\Users\stpi020\Documents\Visual Studio 2008\Projects\DemoWcfService1\WcfConsoleApplication1\Program.cs 13 35 WcfConsoleApplication1


wats the problem

Thanks




Responses

#641082    Author: Anil Kumar Pandey      Member Level: Platinum      Member Rank: 1     Date: 09/Nov/2011   Rating: 2 out of 52 out of 5     Points: 2

Please make the class and the method you are trying to access as "PUBLIC" so that it can be accessible from outsode of the code.

I think the class is currently Private that's why you are unable to access it.

Thanks & Regards
Anil Kumar Pandey
Microsoft MVP, DNS MVM



 
Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.



Next : WCF created WSDL does not retrun value in SOAPUI
Previous : How to check port number of WCF running testservice?
Return to Discussion Forum
Post New Message
Category:

Related Messages



Follow us on Twitter: https://twitter.com/dotnetspider

Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
2005 - 2012 All Rights Reserved.
.NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
Articles, tutorials and all other content offered here is for educational purpose only.
We are not associated with Microsoft or its partners.