<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="/styles/xslt/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:c9="http://channel9.msdn.com">
<channel>
	<title>Channel 9 Forums - Tech Off - Cant get webservice to work. Could not be loaded error</title>
	<atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/Forums/rss"></atom:link>
	<image>
		<url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url>
		<title>Channel 9 Forums - Tech Off - Cant get webservice to work. Could not be loaded error</title>
		<link>http://channel9.msdn.com/Forums</link>
	</image>
	<description>Channel 9 keeps you up to date with the latest news and behind the scenes info from Microsoft that developers love to keep up with. From LINQ to SilverLight – Watch videos and hear about all the cool technologies coming and the people behind them.</description>
	<link>http://channel9.msdn.com/Forums</link>
	<language>en</language>
	<pubDate>Mon, 20 May 2013 16:42:01 GMT</pubDate>
	<lastBuildDate>Mon, 20 May 2013 16:42:01 GMT</lastBuildDate>
	<generator>Rev9</generator>
	<c9:totalResults>3</c9:totalResults>
	<c9:pageCount>-3</c9:pageCount>
	<c9:pageSize>-1</c9:pageSize>
	<item>
		<title>Tech Off - Cant get webservice to work. Could not be loaded error</title>
		<description><![CDATA[<p>Hi,</p><p>I have this webservice;</p><p><pre class="brush: csharp">public class InfoSpreaderServices : System.Web.Services.WebService
    {

        [WebMethod]
        public void AddUser(int listRecno, string firstname, string lastname, string email) {
            if (!DataManager.EmailExists(listRecno, email)) {
                DataManager.CreateNewRecipient(listRecno, firstname, lastname, email);
            }
            
        }

        [WebMethod]
        public void RemoveUser(int recipientRecno, string email) {
            DataRow r = DataManager.GetListRecipient(recipientRecno);

            if (r[&quot;Email&quot;].ToString() == email) {
                DataManager.DeleteRecipient(recipientRecno);
            }
        }
    }</pre></p><p>&nbsp;</p><p>and I try to use the AddUser method like this;</p><p><pre class="brush: csharp">InfoSpreadServices.InfoSpreaderServicesSoapClient client = new InfoSpreadServices.InfoSpreaderServicesSoapClient();
client.AddUser(int.Parse(TextBoxListRecno.Text), TextBoxFirstname.Text, TextBoxLastname.Text, TextBoxEmail.Text);</pre></p><p>&nbsp;</p><p>But I always get this error;</p><p><strong>The operation 'AddUserAsync' could not be loaded because it has a parameter or return type of type System.ServiceModel.Channels.Message or a type that has MessageContractAttribute and other parameters of different types. When using System.ServiceModel.Channels.Message or types with MessageContractAttribute, the method must not use any other types of parameters.</strong></p><p>&nbsp;</p><p>&nbsp;</p><p>any ideas on how to fix this ??</p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/Cant-get-webservice-to-work-Could-not-be-loaded-error/1bdddef00e0c421bad8ea164013ffeb1#1bdddef00e0c421bad8ea164013ffeb1</link>
		<pubDate>Wed, 13 Feb 2013 19:25:03 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/Cant-get-webservice-to-work-Could-not-be-loaded-error/1bdddef00e0c421bad8ea164013ffeb1#1bdddef00e0c421bad8ea164013ffeb1</guid>
		<dc:creator>Stein Lundbeck</dc:creator>
		<slash:comments>3</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/steinster/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Cant get webservice to work. Could not be loaded error</title>
		<description><![CDATA[<p>You can fix this by reading the message, but more code is required.</p><p>You have decorated one or more objects with <strong>[MessageContract]</strong> instead of<strong> [OperationContract]</strong>. When you use this attribute you no longer pass individual parameters but the whole object instead. Please replace <strong>MessageContract</strong> with <strong>OperationContract</strong> or&nbsp;<em>only</em> pass in the class that has the <strong>MessageContract </strong>attribute</p><p>&nbsp;<pre class="brush: csharp">  
public void AddUser(Recipient recipient)
{

}

[MessageContract]
public class Recipient
{

}
</pre></p><p>&nbsp;</p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/Cant-get-webservice-to-work-Could-not-be-loaded-error/1e5a39609ba3489b8830a164014c0035#1e5a39609ba3489b8830a164014c0035</link>
		<pubDate>Wed, 13 Feb 2013 20:08:46 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/Cant-get-webservice-to-work-Could-not-be-loaded-error/1e5a39609ba3489b8830a164014c0035#1e5a39609ba3489b8830a164014c0035</guid>
		<dc:creator>Vesuvius</dc:creator>
		<slash:comments>3</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/vesuvius/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Cant get webservice to work. Could not be loaded error</title>
		<description><![CDATA[<p>ah ok, thanks ! <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9' alt='Smiley' /></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/Cant-get-webservice-to-work-Could-not-be-loaded-error/ba604ee597f64091b2c1a164015146fa#ba604ee597f64091b2c1a164015146fa</link>
		<pubDate>Wed, 13 Feb 2013 20:27:59 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/Cant-get-webservice-to-work-Could-not-be-loaded-error/ba604ee597f64091b2c1a164015146fa#ba604ee597f64091b2c1a164015146fa</guid>
		<dc:creator>Stein Lundbeck</dc:creator>
		<slash:comments>3</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/steinster/Discussions/RSS</wfw:commentRss>
	</item>
</channel>
</rss>