lamp

Browse by Tags

Validation of viewstate MAC failed.
15 August 10 10:39 AM | Frederick.Chapleau | with no comments
Even if I didn’t search the root cause of the problem, a clear workaround is simply to disable mac validation on viewstate. <pages enableViewStateMac="false" enableEventValidation="false" viewStateEncryptionMode="Never">...
Filed under:
Screen Capture and Save to File
25 July 10 10:30 PM | Frederick.Chapleau | with no comments
A little code snippet that is doing a Screen Capture, saving it to a Jpeg file, and launch the default program associated to jpg to view it. Size s = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Size; string filename = Path.GetTempFileName() + "...
Filed under:
ServiceHost only supports class service types.
16 July 10 04:37 PM | Frederick.Chapleau | with no comments
In WCF, ServiceHost instantiate the class that your Service inherit, when you access the .svc file, which is not the interface, but the class itself. Check out the .svc file (open it with the XML or Text Editor) and validate that the inherited class is...
Filed under:
Start a process and follow the output in C#
11 July 10 05:56 PM | Frederick.Chapleau | with no comments
ProcessStartInfo psi = new ProcessStartInfo(@"c:\windows\system32\ping.exe"); psi.Arguments = "127.0.0.1"; psi.RedirectStandardOutput = true; psi.UseShellExecute = false; Process process = Process.Start(psi); process.WaitForExit();...
Filed under:
Google Reader API to check for Unread Article
09 July 10 04:26 PM | Frederick.Chapleau | with no comments
Everything you need to have a summary of unread item in your Google Reader account…! using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Net; using System.IO; using System.Xml; namespace Chapleau.GoogleReader...
Filed under:
The Best Generic-Lazy-Initialized Singleton implementation
01 July 10 09:23 AM | Frederick.Chapleau | with no comments
public abstract class Singleton<T>     where T: class, new() {     public static T Instance     {         get { return Nested.instance; }     }    ...
Filed under:
WCF Error : The token provider cannot get tokens for target
30 June 10 12:17 PM | Frederick.Chapleau | with no comments
The inner exception is a much better source for this error message. The underlying message was The NetworkCredentials provided were unable to create a Kerberos credential, see inner execption for details. And from this exception the inner one’s detail...
Filed under:
Download .NET Framework 4.0 – Direct Link
20 April 10 11:18 AM | Frederick.Chapleau | with no comments
http://www.microsoft.com/downloads/details.aspx?FamilyID=9cfb2d51-5ff4-4491-b0e5-b386f32c0992&displaylang=en It took me too long to find it (almost… 20 sec). I hope Google will index that first ;) -f.
Filed under:
Visual Studio setup cannot run in compatibility mode in VS2010
13 April 10 09:56 AM | Frederick.Chapleau | 1 comment(s)
The solution from Dluk, posted for the Beta2 Version of Visual Studio 2010 on 11/10/2009 and worked for me with the **released** version was…: Got it! 1. Rename following registry key before install (e.g. add _ to the name): HKEY_LOCAL_MACHINE\SOFTWARE...
Filed under:
Underscore prefix with C#, is it a best practice?
01 March 10 01:52 PM | Frederick.Chapleau | with no comments
I used this since the beginning, thinking that this was a best practice, but without searching a lot. I found this article containing a brief history on this practice... I’ll let you decide if it’s a best practice to you. http://blogs.msdn.com/sourceanalysis...
Filed under:
Get the Unread count of the Inbox of Exchange 2010/2007, using web services
02 February 10 09:28 AM | Frederick.Chapleau | with no comments
I searched a lot and, based on an article from SANDEEP APARAJIT , I was able to query for unread email from my Exchange mailbox inbox, in about 15 min. Thanks!   ServicePointManager.ServerCertificateValidationCallback = delegate(Object obj, X509Certificate...
Filed under:
Using WCF Webservices in .NET 2.0
14 September 09 01:00 PM | Frederick.Chapleau | with no comments
The default behavior of WCF Webservice is the new wsHttpBinding. This is not compatible with .NET 2.0, so to use it you must change the behavior with the basicHttpBinding. The basic one is not secured, so if it’s a critical piece, you must use it with...
Filed under:
This collection already contains an address with scheme http.
12 September 09 12:02 PM | Frederick.Chapleau | with no comments
When deploying a WCF service, this problem can occur This collection already contains an address with scheme http.  There can be at most one address per scheme in this collection. Parameter name: item This is caused by having multiple binding on...
Filed under:
404 Error when deploying a .net 3.0+ SVC File
12 September 09 11:49 AM | Frederick.Chapleau | with no comments
When deploying a .NET WCF Service on IIS 7, on might have a 404 error. This is because the ScriptsMaps are not registered, issuing the following command register them, to that they can be used. c:\Windows\Microsoft.Net\Framework\v3.0\Windows Communication...
Filed under:
The log cannot be rebuilt when the primary file is read-only.
08 July 09 06:27 PM | Frederick.Chapleau | with no comments
When mounting a SQL Server Express Database, the SQL Server Express engine is trying to rebuild the log files, using the same permissions as the AppPool that is configured for the website. So this account should have access to the underneath file system...
Filed under:
More Posts Next page »