System.IO.FileNotFoundException: Could not load file or assembly ‘Assembly’ or one of its dependencies. The system cannot find the file specified

25 באוקטובר 2011

First step: check if the assembly is really in the bin folder. It’s there but you still get the error? There might be few reasons for the framework to fail when trying to load your assembly. To find the real one you can use nice tool from MS, called “Fuslogvw.exe” which is assembly binding log viewer you can use for your .NET application (it’s auto installed with VS). After opening this tool, start your application and wait for the exception to be thrown. go back to the tool, hit the...
2 תגובות

What Is It “Disposable Mail”?, Or: How To Confirm Activation Mails Using Temp Email Address

18 בינואר 2011

We don’t want that every site we’re registering to will have our real email. Place a comment on forum, watch members-only messages etc. require full registration to the relevant site, passing all the exhausting steps to create account. Except the long procedure, that site wants our email (for confirmation and spam us with the offers), maybe they’ll display it on their site and other spammers will get it and we’ll have to fight annoying emails every day. really don’t want it, right? This is where the temp mail address (or disposable mail) providers comes in :-) You can get a temporary...
20 תגובות

Change Table Schema (Or Any Other Database Object) Using Alter Schema, MS SQL Server

29 בדצמבר 2010

This week I was using a database that contains few different schemas. In the SPROC I was trying to execute some command on a new table I’ve just created but couldn’t find it on the SQL intelliSense. I thought it was intellisens cache issue so I refreshed it (using Ctrl+Shift+R), waited for few seconds and still couldn’t find it. After a minute or two I’ve noticed it is exist, but on the default dbo schema instead of the desired schema. bad. When you create a new DB object on a schema different than the...
תגיות: , ,
אין תגובות

Connect SQL Server Named Instance Using Specific Port Number

25 בינואר 2010

Recently I encountered an exception while trying to connect to SQL Server named instance. We have a main server with SQL Server 2005 installed on as the default instance and another SQL Server 2008 installed as a named instance. The connection string I used was: "Data Source=ServerName\InstanceName,1433;network library=dbmssocn;Initial Catalog=MyDataBaseName;Integrated security=SSPI"We are using TCP/IP as the underlying connection method in order to connect to SQL Server. This can be done by using the connection string network library property. When the connection is made over TCP/IP, you can specify the desired port number to connect to at the data source property (as you...
תגובה אחת

Override The XmlIgnoreAttribute When Using XmlSerializer

8 בנובמבר 2009

This post is about how to serialize type with properties that are decorated with XmlIgnoreAttribute (or any other XmlAttribute) using the XmlSerializer. When we will try to serialize an instance of type that one or more of its properties marked with XmlIgnoreAttribute, it will be unsurprising to find out that those properties are not shown at the serialized XML. We could just remove the XmlIgnoreAttribute from those properties, but what if the entity type declaration is out of our project scope or we can’t change it for some reason so the XmlIgnoreAttribute can’t be removed? Nice solution for this issue is by...
תגיות: , , ,
תגובה אחת

Generic List<T> Using svcutil.exe

16 ביוני 2009

When using the svcutil.exe in order to create WCF proxy, any reflected collection will be converted into System.Array by default. Good to know that this can be controlled using the svcutil.exe. You can define the output data type for collections using the "/ct:" keyword. For example, generating generic list collection (System.Collections.Generic.List<T>) will be done like that: svcutil.exe http://localhost/Services/Sample.svc?wsdl /ct:System.Collections.Generic.List`1 This brings us all of the generics advantages and it is much more comfortable for working then the old System.Array. You can choose other collection types like ArrayList, Collection etc. Dictionary output data type can be controlled either. When using Visual Studio 2008, there is ready...
תגיות: , , ,
תגובה אחת

Visual Studio Tips And Tricks

15 ביוני 2009

Visual Studio .NET Tips & Tricks is a very useful e-book you can download for free. Justifying its reputation, it contains a lot of useful tips and tricks about advanced using the IDE which makes coding much more comfortable and effective. I think that even experienced Visual Studio user will find it useful. Please note: even though it’s refers to the Visual Studio versions before the VS2008 it is still helpful as the most is the same across all the versions. As I mentioned before, it's for free so here is the download link. Enjoy, :-)Tamir Shlomi
אין תגובות

RadDock With RadToolTipManager / RadToolTip

31 במאי 2009

Will they dance together? Well, guess not that easy. When you are using RadToolTipManager and set its ‘AutoTooltipify’ property to “true”, every element on the page that has a 'title' attribute will be automatically “tooltify” with RadToolTip instead of the yellow default one. The RadToolTip and RadDock integration problem: The expected behavior is to have only one tool tip, the telerik’s one, absolutely not double tooltips (telerik’s and the default). Updated to the current version of the RadControls for ASP.NET (version #2009.1.430.35), when the RadDock control will be tooltify by RadToolTipManager he’ll have them both. Additionally, while the default tooltip is updated (as...
תגובה אחת

OwnerAttribute Or: How To Own Visual Studio 2008 Unit Test

30 באפריל 2009

When working on a large project with a lot of test methods, that each one of them might be under the responsibility of another developer, finding your own unit test methods in the endless list is just like finding a needle in a haystack. This can be easily become much simple. When creating unit test for a process, Visual Studio generates unit test method decorated with the TestMethodAttribute. Now, to “own” the unit test, just add new attribute named “OwnerAttribute” which specify the person responsible for the process behind that unit test. Sample: public void UnitTestMethod() { ... } Now, after you...
אין תגובות

Error: "Ajax client-side framework failed to load" After Login

23 באפריל 2009

“Ajax client-side framework failed to load”. If you encountered with the error message above after login to your site and you're using the ASP.NET membership framework (and you verified that MS AJAX is properly installed), you can add the following configuration section to your web.config: <configuration> ... <location path="ScriptResource.axd"> <system.web> <authorization> <allow users="*"/> </authorization> </system.web> </location> ... </configuration> This configuration setting allows any user accessing the ScriptResource.axd file who’s required for the...
תגיות: , , , ,
79 תגובות