I've read this article but it doesn't appear to use the ApplicationPool class described here. Feels like this is something simple I'm missing.
Also, in case anyone feels like being extra helpful, I'm trying to accomplish this in a PowerShell script that can basically take a list of application pool names and set their credentials using...
Hello,
I would like to know if there is a programmatic way of determining at run-time if the application was launched via the debugger or by launching an installed version of the application. My app is currently being deployed via ClickOnce.
There are certain settings I would like to alter when the app is run in debug mode vs productio...
The title is self-explanatory of what I want to accomplish. I have a COM-visible component built in 3.5 and my new projects are 4.0. Code very similar to the one below is what I want to run from the 3.5 component.
Assembly a = Assembly.LoadFrom(@"C:\MyCLR4.exe");
Type t = a.GetType("MyCLR4Class");
object o = Acti...
Hello,
We're trying to find a way to change the sessionState's sqlConnectionString (in SQLServer mode) at runtime. We're implementing a fail over for our SQL server and we want to catch when the sessionState fails to have access to my SQL server and tell it to fail over to my secondary server and initialize the site-wide fail over at th...
I am looking to achieve the fastest and scalable communication between several servers. I've developed a custom TCP socket server for this purpose with (IOCP) as I think it would be the fastest communication in .NET, but I don't know if it crashes on high load, or if my solution is the fastest communication channel for .NET applications....
I am a c# coder which came up throught the ranks of vb,vfp,fox, and dbase... I am considering on making the jump over to java, to expand my skillset. I don't really see any books on making this jump. I was wondering if someone could point me in the right direction on where to begin, and what to study.
...
I have memory problem in my application. Each time I fetch data from db and assign it to Grid, memory increases and sometimes when extensive searches are made the memory reaches to 1 G.B.
There can be other memory handling issues but to test that searching and binding data repeatedly consumes good amount of memory I have created a new w...
Hi guys - I'm well aware of the general pros (quick, fast, easy, codeless approach; support for paging & sorting) and cons (isolated data logic on presentation side) of ODSs, but I'm wondering about the pros and cons of using multiple ObjectDataSource objects on a page and the cost on memory/performance.
I'm currently building a page wh...
I'm using Topshelf to host a WCF Service as a Windows Service. Even when just running on the console, it takes an exceptionally long time to shut down after I send it a Ctrl-C, and this is mirrored when running as a service. On my local machine, it takes 1ms to call svcHost.Close(new TimeSpan(0)), but 10240ms between the end of my Stop...
Hello all,
in these days I'm going to evaluate pros and cons in choosing the software requirements of a web application wich will be potentially scale very faster (imagine a farm of 100 servers).
As you can imagine, a drive aspect of my choice is about the costs.
Here my own consideration:
[+] ASP.NET is a very robust, efficient and we...
I'm trying to create a WsHttpBinding entirely in code, within an SSIS Script Task.
The script task will not have access to an app.config file at run time so I need to create the binding manually and set the parameters in code:
WSHttpBinding binding =
new WSHttpBinding{
Security = new WSHttpSecurity{
...
How do I set Href to a file on a server (example: \myserver\test\a.txt) correctly? When I assign the path to Href, it adds the domain name in front (http://mydomain.com/myserver/test/a.txt) which is not the correct path.
...
How does something like System.IO.Compression.GZipStream have anychance of working? Doesn't something like GZip need to look at the contents of an entire unzipped file before it can start writing the zip file?
Does GZipStream buffer everything before it writes anything? If so, what is the point of implementing the stream?
...
Right now I have a Winform app with a SQL Server back end. The DAL is comprised of Linq to SQL. One of the complexities of this app is it's need to function offline.
I have accomplished this by using Merge Replication to keep there local SQL Express instances in sync with a central SQL Server. I have some logic that detects there c...
We have some code that we tried out on a WPF project in .net 4.0 and it worked with using Windows but we re started the project to combine everything together and now we have started to take advantage of the UserControls. My Window that worked with my previous code doesn't work with this new UserControl code and it says what I posted in...
Does anyone know how to construct a DateTime in .NET to be the first day of the current quarter?
...
if using code like the following to impersonate another user,
[DllImport("advapi32.dll", SetLastError = true)]
private static extern bool
LogonUser(string lpszUsername, string lpszDomain,
string lpszPassword, int dwLogonType,
int dwLogonProvider, ref IntPtr phToken);
var handle = IntPtr.Zero;
const int LOGON32_LOGON_...
I have a problem with getting above exception. I have a relatively simple structure separate in two dll.
First one contains a IEntityService, IEntity, with basic implementation. Second one contains the actual implementations as well as interfaces. so there is a IMachine service which implements IEntityService and MachineService which i...
I'm using a WebBrowser control and want to copy a particular image on the web page to the clipboard. I am aware that I can use the WebBrowser.Document.ExecCommand method to copy the currently selected region of the page but cannot work out how to direct the selection to cover a particular HtmlElement or region of the page.
Any help is m...
I've got a string that I'm fetching from LDAP for Active Directory group membership and I need to parse it to check if the user is a member of the AD group. Is there a class that can parse this for me?
Example:
CN=Foo Group Name,DC=mydomain,DC=com
...