.NET is a software development framework created by Microsoft that provides a consistent programming model for building applications. It supports multiple programming languages, including C#, Visual Basic, and F#, allowing developers to build a wide range of applications, from desktop software to web applications and mobile apps. Here are some basics of .NET: Common Language […]
Single File Publishing
When you publish your programs probably you see bunch of other files along with your executable. You may want package your published files to single file. Here is how to do it: Edit your project file. Add these lines to your config file. <!– Publish single file settings –> <PublishSingleFile>true</PublishSingleFile> <SelfContained>true</SelfContained> <RuntimeIdentifier>win-x64</RuntimeIdentifier> <PublishReadyToRun>true</PublishReadyToRun> <!– Publish […]
No process is associated with this object
PS: English version is at the bottom. Bu hata mesajı ile ilk karşılaştığınızda biraz afallayabilir, hatta panik olabilirsiniz. Önceki view işleminde açık kalan uygulama var ise kapatıp tekrar deneyiniz. Kestrel yerine IIS Express ile çalıştırmak da sorunun yaşanmasını önleyebilir. — ENGLISH: When you first encounter this error message, you may be a little stunned or […]
Using clipboard with console applications
Clipboard is a windows object. If you want to use clipboard in your .NET framework console applications you must reference `System.Windows.Forms` and mark your main method with `STAThreadAttribute` attribute. Then you can use this class's methods e.g. Clipboard.SetText("some text to store in the clipboard"); Happy coding.
Enterprise Library 4.1 Data Application Block Integration Exception
if you are getting this exception "The type initializer for 'Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory' threw an exception." try to reference Microsoft.Practices.ObjectBuilder2.dll Happy coding…
C# and VB.NET Code conversion
We, the developers sometimes need work with different languages for some projects. Especially if you are a .NET developer you will need a conversion tool to convert C# to VB.NET or VB.NET to C#. Here is a useful free tools for that need. C Sharp to VB.NET VB.NET to C Sharp You can check other […]
ToLowerInvariant() and ToUpperInvariant()
According to business rule all footballer name and surname must be capitalized and not longer than 8 chars length. Very simple to develop. We develop a wrapper method for this job. Seems working fine. Until this morning. Game masters of the http://icanfootball.com noticed that some player names violates this business rule. After my first debuging […]
inherit In Child Applications
You can add the <location> element with the “inheritInChildApplications” attribute to the root web.config. This attribute will prevent child applications inherit some specified configuration from the root web.config. The attribute must be placed in the <configuration> section of the web.config. It looks like this: Referance: SectionInformation.InheritInChildApplications Property
How to use a method from class in other namespaces at .aspx pages
You can use using statement to inculde different namespaces in you code behind file. But still you can’t call methods from classes that live in other namespaces (Different from you page class namespace) from you content pages (.aspx). To make this work you must use import namespace directive after you page directive. This can be […]
How to clear all HttpContext Cache items?
“HttpContext.Current.Cache” has a metod to remove items one by one with their key names. If you want to remove all items from the cache you can use this little code snippet to achive this task: Happy coding… P.S.: This techique don’t effect the output cached pages.