Posts

Where are UnityContainerExtensions

Image
I had wrapped a Unity container in another class and then was using it to call Resolve and only got one option in intellisense like this: But I was wanting the Resolve(Of T) option like this: Then I discovered I was missing "Imports Microsoft.Practices.Unity" at the top of the class.  Once I added that then the UnityContainerExtensions became available.

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 ...

Using WCF with non-microsoft clients

The default wsdl that WCF creates isn't very friendly for human's and other non-microsoft clients to read. To remedy this you can intsall WCFExtras: http://wcfextras.codeplex.com/ To use it, in your endpoint declaration add a " behaviorConfiguration " element with a name something like " WsdlRedirect ". Then add an endpointBehaviors declaration something like this:       < behaviors >        < endpointBehaviors >          < behavior name =" WsdlRedirect " >            < wsdlExtensions location =" https://testwebservices.website.ca/SomeService.svc "                            singleFile =" True " / >          < / behavior >   ...

"An attempt was made to load a program with an incorrect format.” in IIS 7

Was working on an old website dev region that hadn't been used since we upgraded to IIS 7 and a 64-bit web server, and was getting this error: "An attempt was made to load a program with an incorrect format."   After some research I found the answer here: http://stackoverflow.com/questions/41449/i-get-a-an-attempt-was-made-to-load-a-program-with-an-incorrect-format-error-o The solution that worked for me was to enable 32-bit applications in the AppPool.

Apple iPad Facebook crash

My wife likes Apple she has an iPhone and she wanted something like the iPhone except a little bigger so she could manage her business social media content easier. So we got her a first generation iPad. It worked great until she went to share a link in Facebook using Safari and it would crash.  The crash log said it was a memory issue.  I did some research and tried the "disable all the iCloud stuff" and the problem continued.  Then I discovered this is a problem that started in Sep 2012 and it even happens with the newer iPad's so it can't be a memory problem. It is a problem with Safari on Facebook. So I tried a bunch of other browser's like Dolphin, and Opera and still the same problem.   Finally was about to start selling her on an Android tablet when didn't I find a fix.  Almost sort of wished I hadn't found a fix because I like Android. It's what I have for my phone. But here it is: the Atomic Lite browser(or pay for the full blown ve...

Visual Studio 2010 with TFS can't edit source code

Once in a while when I open a project in Visual Studio and get latest version of source from TFS and I go to type in a source code file it will not auto check out and will not let me type anything.  The quickest way I have discovered to fix this is to click on another source code tab(or open another source code file if there is only one tab available) then go back to the original source code and you should be able to start typing.