-
mvc windows authentication
If you want to use Windows Authentication with MVC : Step 1 : In web.config,put authentication mode windows Step 2 : in IIS disable anonymous Step 3 : go to Views\Shared\LogOnUserControl.ascx and remove logoff / logon links.
-
Optimizing EF4 and EDMGen2
Just reading (from Adrian Florea links ) how the EF4 could be optimized : http://www.codeproject.com/KB/database/PerfEntityFramework.aspx First modification is to “Pre-generated Your View”. For this you must have .ssdl,.csdl,and .msl files – so you change the “Metadata Artifact Processing property to: Copy to Output Directory.”. Then you process the .ssdl,.csdl,and .msl with edmgen in order to…
-
EF Profiler and investigating object context
Summary : EF Profiler worth his money ! Long Description : I have finished a application with Entity Framework and POCO – and custom generated (.tt) files. Now it was time to investigate performance – and it was a terrific problem. How EF Prof helped me : 1. Displaying number of ObjectContext created and disposed…
-
Error intercepting in MVC when saving data
I have seen many times in MVC the following code,when doing a post and saving data : Why is not good ? I will do a simple example : if some error occurs on the database level ( such as simple unique index on a name column ) or even some error occurs whenestablishing the…
-
Twitter Weekly Updates for 2010-11-07
privacy on internet times : http://www.attackvector.org/invasion-of-privacy/ # http://listverse.com/2010/11/04/10-strange-things-about-the-universe/ # Powered by Twitter Tools
-
path.combine idiosyncrasies
I have this small program : In what conditions,if I have an “C:\andrei” folder with a single file,the output will be the name of the file ? And where you want to be aware of this behaviour ? Hint : The output is : \andrei\New Text Document.txt
-
A programmer day with “That assembly does not allow partially trusted callers”
I make a website,works on local IIS. Performs user registration + uploading some zip files + generating custom feeds for those zip files. Using SharpZipLib_0860_Bin ( to unzip file ),StringTemplate.dll ( to perform custom feed generation ) and NUnit-2.5.7.10213 ( to perform tests). So far,so good. Moving into production . User registration works,upload works,trying feeds…
-
Find the Error
This code was written by me,in a late night moment,when copy paste seems the best option It started this way : So far,nothing special. Just open the url,read into an XML,return first nodes. Then I wanted more – next nodes. Nothing easier – why bother with recursion or proper variable names ? Just copy and…
-
Five common mistakes for ASP.NET (MVC) accesing resources : css,js,images,ajax
To have once for all the link to show to people,because too much makes the same error again and again. (From here – you can use ResolveUrl or Url.Content – it’s the same for me. I use ResolveUrl because I used first …) Case 1 The image does not display Please check you have the…
-
About programming – 7 points
So many times I see people saying : “I can not have time to follow the tutorials – but give me some fast acces to some tutorials that solve my problem”. I have Programming is not about code – programming is about decisions that you do about what code to write. Programming can not be…
I am ok , you are ok