You can invoke a C# or a managed .Net dll from a Native application written in VC++ or C++ in several ways. Here are the three main ways you can use to achieve this.
Use a C++/CLI wrapper
Host CLR (Common Language Runtime)
Convert .NET assembly to a COM server, and call it from C++ through [...]
By default, Asp.Net specifies a limit for the input stream buffering threshold. This limit can be used to prevent denial of service attacks that are caused, for example by users posting large files to the server. The default value for this is 4096 kb. If the threshold is exceeded, you get a ConfigurationErrorsExeption with a [...]
23Apr
Posted by admin as .Net, C#, Visual Studio
There usually are several occasions where you might want to loop through all the controls in a container like a panel or a form etc.. looking for a particular type of control. For example, lets say you have a panel on your form which has several CheckBoxes in it, and you wish to find out [...]
Escaping XML text basically means we are trying to replace the “<”, “>” etc. characters that are used to construct the XML with the encoded values. Here are the 5 values that we care about
XML Value
Encoded Value
<
<
>
>
“
"
‘
'
&
&
There are several ways in which you can escape an XML file or string in .Net.
1. Using Regular [...]
If you are trying to troubleshoot problems occurred in you .Net application, especially if they are caused by ASP.net, you are now in luck. Microsoft recently released an extension for WinDbg that will allow you to diagnose high-memory issues, high-CPU issues, crashes, hangs and many other problems that might occur in a Asp.NET application. This [...]
21Apr
Posted by admin as .Net, Asp.Net, IIS7, Microsoft, Visual Studio, Web
It is very simple to get the name of the application pool current worker process is associated with in Asp.NET. You can simple use the server variables for that. For example, to display the app pool name on your web page you can simply use the below code snippet.
<%= Request.ServerVariables("APP_POOL_ID") %>
This is usually helpful when [...]
17Mar
Posted by admin as .Net, Asp.Net, Microsoft, Technology, Training
I just got this email from Microsoft. Hope this helps some one waiting to get certified for .Net Framework 4 Development. It seems slots are very limit, register asap.
You are invited to take part in one or more beta exams for Visual Studio 2010 and the Microsoft .NET Framework 4.
If you pass one of the [...]
You can use Microsoft.Web.Administration namespace to create a binding and set the certificate hash. Let us say you are trying to add a new binding to a website “MySite” with a new SSL certificate hash “MyCertHash”, here is what you have to do to achieve this
ServerManager serverManager = new ServerManager();
serverManager.Sites["MySite"].Bindings.Add("*.443:", MyCertHash, "MyCert");
The bindings member configures [...]
18Dec
Posted by admin as .Net, Asp.Net, Technology, Visual Studio, Web
On some occasions you might want to deploy the Asp.Net MVC application to avoid compiling it yourself etc. You can achieve this by following the below steps
Create an ASP.NET website project in Visual Studio
Add a reference to the System.Web.Mvc.dll (and any other DLLs that your application might need)
Copy the web.config from regular ASP.NET MVC project [...]
On some occasions you might want to use retail versions of Asp.Net JavaScript libraries while debugging your code. (For starters, when in debug mode in Visual Studio, you are not using the release versions, instead you are using debug versions of the libraries). To achieve this all you have do is set the ScriptMode property [...]