Programming with .NET - Generalhttp://forums.silverlight.net//17.aspx/1?Programming+with+NET+GeneralGeneral discussions around authoring Silverlight .NET applications.Mon, 01 Jan 0001 00:00:00 -05001734663http://forums.silverlight.net//p/10909/34663.aspx/1?Add+web+reference+problem+silverlight+2+0+Add web reference problem(silverlight 2.0) <p>Hi! I have a problem<br> I build client server application on silverlight&nbsp; 2.0<br> I implement webService project - ChatService and asp.net project Chat.Display project<br> I need to use in Chat.Display the webService&nbsp; ChatService<br> How can i add web reference to Chat.Display project?<br> I can just Add Service Link not Add web Reference?</p> <p>Thanks&nbsp;</p> 2008-03-07T13:39:41-05:0034666http://forums.silverlight.net//p/10909/34666.aspx/1?Re+Add+web+reference+problem+silverlight+2+0+Re: Add web reference problem(silverlight 2.0) <p>Use the &quot;Add Service Reference&quot; function, it does effectively the same thing as the old familiar &quot;Add Web Reference&quot; used to do for other project types. :)<br> </p> 2008-03-07T14:06:13-05:0034685http://forums.silverlight.net//p/10909/34685.aspx/1?Re+Add+web+reference+problem+silverlight+2+0+Re: Add web reference problem(silverlight 2.0) <p>Understood<br> I add web service reference to my project</p> <p>web service contain just one method</p> <p>[WebMethod]<br> public string HelloWorld()<br> {<br> &nbsp;&nbsp;&nbsp; return &quot;Hello World&quot;;<br> }<br> &nbsp;</p> <p>Could you tell me or give me the code sample how to use this method from Page.xaml.cs code file please&nbsp;[:)]</p> <p>Thank you very much!<br> &nbsp;</p> 2008-03-07T14:32:36-05:0034697http://forums.silverlight.net//p/10909/34697.aspx/1?Re+Add+web+reference+problem+silverlight+2+0+Re: Add web reference problem(silverlight 2.0) <p>&nbsp;Assuming your Web service in your web project is named HelloWebService you'd do the following from your Silverlight Application project:</p> <ol> <li>Build the Web service project.<br> </li><li>Click &quot;Add Service Reference&quot;.</li><li>Click the Discover button and choose &quot;Services in Solution&quot;.</li><li>Select HelloWebService.asmx.</li><li>Enter a Namespace, e.g. &quot;Testing&quot;.<br> </li><li>Click OK.</li><li>Goto your Page.xaml.cs file and add a using class for your namespace.<br> </li><li>In a method or even the constructor Page() enter: &quot;HelloWebServiceSoapClient client = new HelloWebServiceSoapClient();&quot;<br> </li><li>This will instantiate an instance of the proxy class.</li><li>Next assign a callback event handler like this: &quot;client.HelloWorldCompleted &#43;= HelloWorldCompletedEventArgs&gt;(ClientHelloWorldCompleted);&quot; Use the code generator helper for this. i.e. press TAB.<br> </li><li>Call the method asynchronously: &quot;client.HelloWorldAsync();&quot;</li><li>Then in the ClientHelloWorldCompleted method inspect the e.Result.</li></ol> Simple isn't it?<br> 2008-03-07T15:06:25-05:0034706http://forums.silverlight.net//p/10909/34706.aspx/1?Re+Add+web+reference+problem+silverlight+2+0+Re: Add web reference problem(silverlight 2.0) <p>Yes it simple[:)]<br> But i have some error&nbsp;</p> <p>&nbsp;</p> <p>An exception of type 'System.ServiceModel.ProtocolException' occurred in System.ServiceModel.dll but was not handled in user code<br> Additional information: [UnexpectedHttpResponseCode]<br> Arguments:Not Found<br> Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&amp;Version=2.0.30226.2&amp;File=System.ServiceModel.dll&amp;Key=UnexpectedHttpResponseCode </p> <p>&nbsp;</p> <p>Code:</p> <p>public Page()<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InitializeComponent();<br> <br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ChatService.ChatSoapClient client = new Addition.Chat.Silverlight.ChatService.ChatSoapClient();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; client.HelloWorldCompleted &#43;= new EventHandler&lt;Addition.Chat.Silverlight.ChatService.HelloWorldCompletedEventArgs&gt;(client_HelloWorldCompleted);<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; client.HelloWorldAsync();<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //----------------------------------------------------------------------------------------------------------------<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; void client_HelloWorldCompleted(object sender, Addition.Chat.Silverlight.ChatService.HelloWorldCompletedEventArgs e)<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String s = &quot;&quot;;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p> <p>Do you have any idea?</p> <p>Thanks<br> &nbsp;</p> 2008-03-07T15:30:49-05:0034709http://forums.silverlight.net//p/10909/34709.aspx/1?Re+Add+web+reference+problem+silverlight+2+0+Re: Add web reference problem(silverlight 2.0) <p>That sounds like you are trying to call cross-domain. Create a clientaccesspolicy.xml file as per here (<a href="http://msdn2.microsoft.com/en-us/library/cc197955%28VS.95%29.aspx" target="_blank">http://msdn2.microsoft.com/en-us/library/cc197955(VS.95).aspx</a>) and put it in the root of the web site. Note this is not in the web service directory, but rather the root of the whole site. You should be able to access it using your web browser.</p> <p>Does that solve the problem?<br> &nbsp;</p> 2008-03-07T15:44:11-05:0034725http://forums.silverlight.net//p/10909/34725.aspx/1?Re+Add+web+reference+problem+silverlight+2+0+Re: Add web reference problem(silverlight 2.0) <p>&nbsp;Thank you - it works<br> </p> 2008-03-07T16:10:28-05:0040398http://forums.silverlight.net//p/10909/40398.aspx/1?Re+Re+Add+web+reference+problem+silverlight+2+0+Re: Re: Add web reference problem(silverlight 2.0) <p class="MsoNormal" style="margin:0in 0in 0pt"><font size="3"><font face="Times New Roman">Its not working for me ........ following is the exception for..</font></font></p> <p class="MsoNormal" style="margin:0in 0in 0pt">&nbsp;</p> <font size="3"><font face="Times New Roman">An exception of type 'System.ServiceModel.ProtocolException' occurred in System.ServiceModel.dll but was not handled in user code</font></font><font face="Times New Roman" size="3">&nbsp;</font><font size="3"><font face="Times New Roman">Additional information: [UnexpectedHttpResponseCode]</font></font><font size="3"><font face="Times New Roman">Arguments:Not Found</font></font> <p class="MsoNormal" style="margin:0in 0in 0pt"><font face="Times New Roman" size="3">Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&amp;Version=2.0.30226.2&amp;File=System.ServiceModel.dll&amp;Key=UnexpectedHttpResponseCode</font></p> <p>&nbsp;</p> 2008-03-24T11:47:01-04:0040450http://forums.silverlight.net//p/10909/40450.aspx/1?Re+Re+Add+web+reference+problem+silverlight+2+0+Re: Re: Add web reference problem(silverlight 2.0) <p>Please show your code<br> </p> 2008-03-24T13:54:19-04:0043228http://forums.silverlight.net//p/10909/43228.aspx/1?Re+Re+Re+Add+web+reference+problem+silverlight+2+0+Re: Re: Re: Add web reference problem(silverlight 2.0) <p>I continually have the Arguments Not Found error and I have been working on it all day to no avail. Nothing seems to have an impact. i even built an application completely from scratch, all localhost, all defaults, and the same thing happens.</p> <p>I am on IE7 and using VS2008 with Cassini for testing.</p> <p>Web service call:</p> <font size="2">ServiceReference1.</font><font color="#2b91af" size="2">Service1SoapClient</font><font size="2"> soap = </font><font color="#0000ff" size="2">new</font><font size="2"> SilverlightApplication3.ServiceReference1.</font><font color="#2b91af" size="2">Service1SoapClient</font><font size="2">();</font><font size="2">soap.HelloWorldCompleted &#43;= </font><font color="#0000ff" size="2">new</font><font size="2"> </font><font color="#2b91af" size="2">EventHandler</font><font size="2">&lt;SilverlightApplication3.ServiceReference1.</font><font color="#2b91af" size="2">HelloWorldCompletedEventArgs</font><font size="2">&gt;(soap_HelloWorldCompleted);</font><font size="2"> <p>soap.HelloWorldAsync();</p> <p>Web services are the default ASP.NET web services with Hello World.</p> <p>That is the whole program. I am stumped. It sure seems like i am hitting a configuration issue somewhere.</p> </font> 2008-04-02T01:28:37-04:0043254http://forums.silverlight.net//p/10909/43254.aspx/1?Re+Re+Re+Re+Add+web+reference+problem+silverlight+2+0+Re: Re: Re: Re: Add web reference problem(silverlight 2.0) <p>Ok, I pulled this completely out of Cassini and it worked. It didn't work when&nbsp;I tried it on 2 separate machines and I ran into the same error. I am going to put as much detail of this error here so it gets ht by the search engines and may help others.</p> <p>Also, adding in a clientaccesspolicy.xml file into localhost route had no impact. However, I didn't investigate in detail how Cassini operates so&nbsp;I probably placed it in the wrong location.&nbsp;</p> <p>Basically, publish both the services website and the Silverlight website&nbsp;to IIS under localhost. </p> <p>&nbsp;</p> <p>'e.Result' threw an exception of type 'System.Reflection.TargetInvocationException'</p> <p>{System.ServiceModel.ProtocolException: [UnexpectedHttpResponseCode]<br> Arguments:Not Found<br> Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See <a href="http://go.microsoft.com/fwlink/?linkid=106663&amp;Version=2.0.30226.2&amp;File=System.ServiceModel.dll&amp;Key=UnexpectedHttpResponseCode"> http://go.microsoft.com/fwlink/?linkid=106663&amp;Version=2.0.30226.2&amp;File=System.ServiceModel.dll&amp;Key=UnexpectedHttpResponseCode</a><br> &nbsp;&nbsp; at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)<br> &nbsp;&nbsp; at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)<br> &nbsp;&nbsp; at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)<br> &nbsp;&nbsp; at System.ServiceModel.ClientBase`1.ChannelBase`1.EndInvoke(String methodName, Object[] args, IAsyncResult result)<br> &nbsp;&nbsp; at SilverlightApplication3.ServiceReference1.Service1SoapClient.Service1SoapClientChannel.EndHelloWorld(IAsyncResult result)<br> &nbsp;&nbsp; at SilverlightApplication3.ServiceReference1.Service1SoapClient.SilverlightApplication3.ServiceReference1.Service1Soap.EndHelloWorld(IAsyncResult result)<br> &nbsp;&nbsp; at SilverlightApplication3.ServiceReference1.Service1SoapClient.EndHelloWorld(IAsyncResult result)<br> &nbsp;&nbsp; at SilverlightApplication3.ServiceReference1.Service1SoapClient.OnEndHelloWorld(IAsyncResult result)<br> &nbsp;&nbsp; at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)}</p> <p>{System.ServiceModel.ProtocolException: [UnexpectedHttpResponseCode]<br> Arguments:Not Found<br> Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See <a href="http://go.microsoft.com/fwlink/?linkid=106663&amp;Version=2.0.30226.2&amp;File=System.ServiceModel.dll&amp;Key=UnexpectedHttpResponseCode"> http://go.microsoft.com/fwlink/?linkid=106663&amp;Version=2.0.30226.2&amp;File=System.ServiceModel.dll&amp;Key=UnexpectedHttpResponseCode</a><br> &nbsp;&nbsp; at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)<br> &nbsp;&nbsp; at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)<br> &nbsp;&nbsp; at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)<br> &nbsp;&nbsp; at System.ServiceModel.ClientBase`1.ChannelBase`1.EndInvoke(String methodName, Object[] args, IAsyncResult result)<br> &nbsp;&nbsp; at SilverlightApplication3.ServiceReference1.Service1SoapClient.Service1SoapClientChannel.EndHelloWorld(IAsyncResult result)<br> &nbsp;&nbsp; at SilverlightApplication3.ServiceReference1.Service1SoapClient.SilverlightApplication3.ServiceReference1.Service1Soap.EndHelloWorld(IAsyncResult result)<br> &nbsp;&nbsp; at SilverlightApplication3.ServiceReference1.Service1SoapClient.EndHelloWorld(IAsyncResult result)<br> &nbsp;&nbsp; at SilverlightApplication3.ServiceReference1.Service1SoapClient.OnEndHelloWorld(IAsyncResult result)<br> &nbsp;&nbsp; at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)}</p> <p>&nbsp;</p> 2008-04-02T03:23:58-04:0043766http://forums.silverlight.net//p/10909/43766.aspx/1?Re+Re+Re+Re+Re+Add+web+reference+problem+silverlight+2+0+Re: Re: Re: Re: Re: Add web reference problem(silverlight 2.0) <p>Hi All,</p> <p>I am still facing the same error even though i had use clientpolicy xml file and publish the website</p> <p>any idea </p> 2008-04-03T10:58:08-04:0047295http://forums.silverlight.net//p/10909/47295.aspx/1?Re+Re+Re+Re+Re+Re+Add+web+reference+problem+silverlight+2+0+Re: Re: Re: Re: Re: Re: Add web reference problem(silverlight 2.0) <p>Hi,</p> <p>i tried using add service reference instead of add web reference.</p> <p>after i added that web service, in intellicence, it should show me the list of webmethods. its actually showing the methods but with &quot;async &quot; postfix.</p> <p>is&nbsp; it because these web methods are talking to backend data base? because this is only the case with methods returning some value, other void methods are perfectly working!!!</p> <p>needed help immedtley.</p> <p>Thanks,</p> <p>Lakshmi</p> 2008-04-17T09:42:29-04:0047304http://forums.silverlight.net//p/10909/47304.aspx/1?Re+Re+Add+web+reference+problem+silverlight+2+0+Re: Re: Add web reference problem(silverlight 2.0) <p>hi, i have created a silver light UI.</p> <p>There is a login page, which authenticates the user using a webmethod </p> <p>Authenticate(uname, pwd); which returs &quot;usercontext&quot; data object.but after i refered the webservice which contains this method, it just shows void as return type. not usercontext. why is it happening?</p> <p>&nbsp;</p> <p>&nbsp;</p> 2008-04-17T10:36:09-04:0047321http://forums.silverlight.net//p/10909/47321.aspx/1?Re+Re+Add+web+reference+problem+silverlight+2+0+Re: Re: Add web reference problem(silverlight 2.0) <p>Could you show your code?<br> </p> 2008-04-17T12:45:53-04:0047544http://forums.silverlight.net//p/10909/47544.aspx/1?Re+Re+Add+web+reference+problem+silverlight+2+0+Re: Re: Add web reference problem(silverlight 2.0) <font color="#0000ff" size="2"> <p>Hey thanks for the&nbsp;quick reply.. it was least expected.. actually :)&nbsp;</p> <p>&nbsp;the code is below:</p> <p>&nbsp;</p> public</font><font size="2"> Page()</font><font size="2"> <p>{</p> <p>InitializeComponent();</p> <p>}</p> </font><font color="#0000ff" size="2">private</font><font size="2"> </font><font color="#0000ff" size="2">void</font><font size="2"> UserControl_Loaded(</font><font color="#0000ff" size="2">object</font><font size="2"> sender, </font><font color="#2b91af" size="2">RoutedEventArgs</font><font size="2"> e)</font><font size="2"> <p>{</p> <p>&nbsp;</p> <p>rotateEllipse1.Begin();</p> <p>rotateEllipse1.Stop();</p> <p>&nbsp;</p> <p>rotateEllipse2.Begin();</p> <p>rotateEllipse2.Stop();</p> <p>&nbsp;</p> <p>rotateEllipse3.Begin();</p> <p>rotateEllipse3.Stop();</p> <p>&nbsp;</p> <p>rotateEllipse4.Begin();</p> <p>rotateEllipse4.Stop();</p> <p>&nbsp;</p> <p>}</p> </font><font color="#0000ff" size="2">public</font><font size="2"> </font><font color="#0000ff" size="2">void</font><font size="2"> validateUser(</font><font color="#0000ff" size="2">object</font><font size="2"> sender, </font><font color="#2b91af" size="2">RoutedEventArgs</font><font size="2"> e)</font><font size="2"> <p>{</p> </font><font color="#2b91af" size="2">RES_ServiceSoapClient</font><font size="2"> service = </font><font color="#0000ff" size="2">new</font><font size="2"> </font><font color="#2b91af" size="2">RES_ServiceSoapClient</font><font size="2">();</font><font size="2"></font><font color="#2b91af" size="2">UserContext</font><font size="2"> userContextData = </font><font color="#0000ff" size="2">new</font><font size="2"> </font><font color="#2b91af" size="2">UserContext</font><font size="2">();</font><font size="2"> <p>userContextData = service.AuthenticateAsync(user.Text, password.Text);</p> <p></font><font color="#0000ff" size="2">string</font><font size="2"> role = GetPrimaryRole(userContextData);</p> </font><font color="#0000ff" size="2">if</font><font size="2"> (role.ToUpper() == </font><font color="#a31515" size="2">&quot;HR&quot;</font><font size="2">)</font><font size="2"> <p>{</p> </font><font color="#2b91af" size="2">TransitionBase</font><font size="2"> transition = </font><font color="#0000ff" size="2">new</font><font size="2"> </font><font color="#2b91af" size="2">FadeTransition</font><font size="2">();</font><font size="2"></font><font color="#2b91af" size="2">NavigationHelper</font><font size="2">.Navigate(transition, </font><font color="#0000ff" size="2">new</font><font size="2"> </font><font color="#2b91af" size="2">SearchPage</font><font size="2">());</font><font size="2"> <p>}</p> <p>&nbsp;</p> <p>Here&nbsp;the method 'Authenticate' takes two&nbsp;parameters username, and password,and it&nbsp;is supposed to&nbsp;return &quot;usercontext&quot; which is a Dataobject.</p> <p>but the problems i am facing here is,</p> <p>1.&nbsp;in the intellicense i'm not getting 'Authenticate&quot;, but 'AuthenticateAsync&quot; instead.</p> <p>2.and&nbsp;its showing&nbsp;return type of the method as void(it should show &quot;usercontext&quot; instead.)</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> </font> 2008-04-18T10:53:33-04:0047548http://forums.silverlight.net//p/10909/47548.aspx/1?Re+Re+Add+web+reference+problem+silverlight+2+0+Re: Re: Add web reference problem(silverlight 2.0) <p>&nbsp;Hello, you can't use &quot;<font><font size="2">Authenticate</font></font>&quot; directly. Everything in Silverlight are in async-mode. Not sync-mode. </p> <p>You have to use async-mode like below. </p> <p>For example:</p> <p>{<br> <br> WebServiceProxy.ProductManagerSoapClient productMgrSoapClient = new SL2WebSrv.WebServiceProxy.ProductManagerSoapClient();<br> <br> productMgrSoapClient.RetrieveProductsAsync();<br> productMgrSoapClient.RetrieveProductsCompleted &#43;=<br> new EventHandler&lt;SL2WebSrv.WebServiceProxy.RetrieveProductsCompletedEventArgs&gt;(productMgrSoapClient_RetrieveProductsCompleted);<br> <br> }<br> <br> void productMgrSoapClient_RetrieveProductsCompleted(object sender, SL2WebSrv.WebServiceProxy.RetrieveProductsCompletedEventArgs e) {<br> if (e.Error == null)<br> &nbsp;&nbsp; displayData(e.Result);<br> }<br> &nbsp;</p> 2008-04-18T11:09:40-04:0047560http://forums.silverlight.net//p/10909/47560.aspx/1?Re+Re+Add+web+reference+problem+silverlight+2+0+Re: Re: Add web reference problem(silverlight 2.0) <p>Try to use code bellow</p> <p>&nbsp;It needs to replace {Service namespace }<br> </p> <p>private <font color="#2b91af" size="2">RES_ServiceSoapClient</font><font size="2"> service;</font> <br> </p> <p><font color="#0000ff" size="2">public</font><font size="2"> Page()</font><br> { <br> <font size="2"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InitializeComponent();</font><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; service = </font><font color="#0000ff" size="2">new</font><font size="2"> </font> <font color="#2b91af" size="2">RES_ServiceSoapClient</font><font size="2">();</font><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font size="2">service</font>.<font size="2">Authenticate</font>Completed &#43;= new EventHandler&lt;{Service namespace }.<font size="2">Authenticate</font>CompletedEventArgs&gt;(Service_<font size="2">Authenticate</font>Completed); <br> }&nbsp;</p> <p>private void Service_<font size="2">Authenticate</font>Completed(object sender, {Service namespace }.<font size="2">Authenticate</font>CompletedEventArgs e)<br> {</p> <p>&nbsp;&nbsp;&nbsp; if(null == e.Error)<br> &nbsp;&nbsp;&nbsp; {</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#2b91af" size="2">RES_ServiceSoapClient</font><font size="2"> </font><font color="#2b91af" size="2">UserContext</font><font size="2"> userContextData = </font><font color="#0000ff" size="2">new</font><font size="2"> </font><font color="#2b91af" size="2">UserContext</font><font size="2">();</font><br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font size="2">userContextData = e.Result;</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br> </p> <p><font color="#0000ff" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string</font><font size="2"> role = GetPrimaryRole(userContextData);</font></p> <font color="#0000ff" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if</font><font size="2"> (role.ToUpper() == </font><font color="#a31515" size="2">&quot;HR&quot;</font><font size="2">)</font><font size="2"> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p> </font><font color="#2b91af" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TransitionBase</font><font size="2"> transition = </font><font color="#0000ff" size="2">new</font><font size="2"> </font><font color="#2b91af" size="2">FadeTransition</font><font size="2">();</font><font color="#2b91af" size="2">NavigationHelper</font><font size="2">.Navigate(transition, </font><font color="#0000ff" size="2">new</font><font size="2"> </font><font color="#2b91af" size="2">SearchPage</font><font size="2">());</font> <p>&nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; } <br> }</p> <p>&nbsp;</p> <p><font color="#0000ff" size="2">public</font><font size="2"> </font><font color="#0000ff" size="2">void</font><font size="2"> validateUser(</font><font color="#0000ff" size="2">object</font><font size="2"> sender, </font><font color="#2b91af" size="2">RoutedEventArgs</font> e)</p> <p>{<br> <font size="2">&nbsp;&nbsp;&nbsp; service.AuthenticateAsync(user.Text, password.Text);</font><br> }</p> <p>&nbsp;</p> <p>[:)]&nbsp;</p> <p><font size="2"></font><font size="2"></font></p> <font size="2"></font><font size="2"></font> 2008-04-18T11:48:54-04:0047568http://forums.silverlight.net//p/10909/47568.aspx/1?Re+Re+Re+Add+web+reference+problem+silverlight+2+0+Re: Re: Re: Add web reference problem(silverlight 2.0) <p>Heyyyy, ! its built successfully with out any error, thanks a lot... :)</p> 2008-04-18T12:31:02-04:0047569http://forums.silverlight.net//p/10909/47569.aspx/1?Re+Re+Re+Add+web+reference+problem+silverlight+2+0+Re: Re: Re: Add web reference problem(silverlight 2.0) <p>You are welcome - Please,Mark as Answer<br> </p> 2008-04-18T12:35:53-04:00