Posts

Showing posts with the label webservice

How to upgrade a web service to ASP.NET 4.0 with out affecting other services

After you have installed .NET 4.0 on the server open a command window and run: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -norestart -s W3SVC/ID/root/ Replace ID in the line above with the Identifier of the Web Service.  The Identifier can be found by starting the IIS snap in and clicking on the "Web Sites" folder and looking in the right pane.  

How to correctly call a web service in .NET

I came across a problem with calling web services that I had never heard about before. I was creating the client with a Using statement like so: Dim xml As XDocument = TestXml Dim actual ( ) As Byte Using proxy As New My WebService .My ServiceClient actual = proxy . GenerateForm ( xml . Root ) End Using Assert . IsNotNull ( actual ) This is apparently a no no, as it can mask the real error.  For me I was getting this error: "System.ServiceModel.ChannelFactory`1[MyLibrary.PNetTServices.PNetTServicesSoap],  cannot be used for communication because it is in the Faulted state." When in reality when I switched to the recommended client call( http://msdn.microsoft.com/en-us/library/aa355056.aspx ): Dim xml As XDocument = MyXml Dim actual ( ) As Byte Dim proxy As My WebService .My ServiceClient = Nothing Try proxy = New My ...