.net

Is it secure to store something in a component?

In the .net framework, I want to store some info inside of a component. Assuming that info isnt publicly exposed as a property, is it secure? Can someone see exactly HOW a component/control is configured? (with regards to the properties panel) Short of decompiling, is there any way this could be insecure? I know it isn't the most secur...

What's the reason for not being able to use static methods, instance methods, etc as a argument to an attribute in .NET?

What's the reason for not being able to use static methods, instance methods, etc as a argument to an attribute in .NET? Why doesn't C# allow this? ...

Any way to override .NET Windows Service Name without recompiling?

I have a windows service executable that I know is written in .NET which I need to install under a different service name to avoid a conflict. The install doesn't provide anyway to specify a service name. If I only have access to the binary, is there anyway to override the service name when I install it with installutil? ...

Can i use Cursor within userdefined function In sql server 2005 manage code?

By using cursor i want to make one virtual table. and after that using function i want to use that virtual table format and pass value of original table and then.. i show.. virtual table.. into output.. ...

Programmatically using Outlook "voting" functionality

Is there a way to programmatically access the "voting" feature of Outlook email? I'd like to be able to send emails with voting enabled, and also get the replies (preferably without polling). Thanks! ...

How should I call this native dll function from C#?

Here's the native (Delphi 7) function: function Foo(const PAnsiChar input) : PAnsiChar; stdcall; export; var s : string; begin s := SomeInternalMethod(input); Result := PAnsiChar(s); end; I need to call this from C#, but the name of the dll is not known at compile time - so I must use LoadLibrary to get to it. This is what ...

What is the difference between DateTime.ToUniversalTime and TimeZoneInfo.ConvertTimeToUtc

Hi, I'm just starting to think properly about rolling out a webapp that will need to do things to users at the start of their day, say 6am. Also at the end of their days. Everywhere I've been reading about people saying a lot just to use .ToUniversalTime to store the time in UTC, but when I tried this (as I suspected) it didn't work, a...

Is my process waiting for input?

I am using the Process class to run an exe. The exe is a 3rd party console application that I do not control. I wish to know whether the process is waiting for input on the command line. Should it make any difference, I intend to kill the application should it be waiting for input. There are suitable events for when there is output f...

How do I Fake UpdateModel for ASP.Net MVC?

I am trying to unit test a controller action that uses UpdateModel but I am not correctly mocking the HttpContext. I keep getting the following exception: System.InvalidOperationException: Previous method 'HttpRequestBase.get_Form();' requires a return value or an exception to throw. To mock the HttpContext I am using some thing ...

How does BasePage.GeneratePassword in .net works?

Hi I am using BasePage.GeneratePassword(6, 10) to generate the unqiue password for the user. but I have notice that sometimes( i got 5 out of 150 users) same password is generated and i use this as unqiueId for some purpose. How reliable is this function? I am not setting any other property like this 'numberOfNonAlphanumericCharacters...

Polluting domain types by implementing infrastructure-related interfaces

Hi all, Did about 30 minutes worth of searching, found lots of relevant info, but none that addresses this particular concern, hope I'm not repeating a common question. I would like to know what the general consensus is in regard to implementing infrastructure-related interfaces in domain types. Everything I've read about DDD leads me...

Where to get custom controls for Winforms .NET?

Hi, I'm wondering if I can get some custom controls in winforms .NET? Is there any place? I'm looking for album control. (something like this: http://joomla15.sakic.net/gallery/78th-international-motor-show-geneva/#8 ...

How to refresh data driven combo box on a winform

I have a winform with a combo box thats filled from a query in the database. If I add a field to the database, the new field won't show up in the form until I close it and reopen it. I was able to put in a MessageBox.Show() and once that popped up, I closed it, and saw the new data in the combo box. EDIT: Let me clarify a bit. I hav...

Does Decrypting a cookie convert it to local time?

Hi I have my own asp.net cookie here made like this FormsAuthenticationTicket authTicket = new FormsAuthenticationTicket(version,userName,DateTime.UtcNow,DateTime.UtcNow.AddMinutes(30),createPersistentCookie,userData,"/"); string encryptedTicket = FormsAuthentication.Encrypt(authTicket); HttpCookie authCookie...

any tools to analyze wmv file format?

Hello everyone, I am developing some application (similar to media player but performing more domain specific things) based on wmv file. I am wondering any existing free tools to analyze wmv format -- I am interested about general information about a specific wmv file (like frame rate, size, and do not need too defailed information). I ...

Why are these Timer events raised at inconsistent times?

I've been reading Illustrated C# 2008 by Daniel Solis (an excellent book, btw) and decided to spend a little more time on Events to further my understanding of the topic. I'm trying to understand why I'm seeing different results every time I run the program and what I might be able to learn from this. (Source Code Below) In the sample ...

Generate http post request from controller

Forgive me if this is a stupid question. I am not very experienced with Web programming. I am implementing the payment component of my .net mvc application. The component interacts with an external payment service. The payment service accepts http post request in the following form http://somepaymentservice.com/pay.do?MerchantID=xxx&amp...

C#: Any tool to automatically generate Interfaces from Classes?

Hi there, I'm using the Entity Framework and I want to generate an Interface class from each of my Entity classes. Is there a tool out there that can run through each class do this automatically for me so i don't have to do it one by one? ...

Possible to programmatically set COM+ Application Proxy properties in .NET?

Hi all, I have a COM+ application proxy in the form of an *.msi file. Once installed, the application proxy will be installed into Component Services. To use this application proxy, I need to get into the proxy's properties and enter a remote server name, that connects the proxy to an actual COM+ application server. My question is: Is i...

WCF: Timeout error

Hi there, I have a piece of code that calls a WCF service that is hosted on a server. The code keeps looping around and around calling this method over and over again. (It's asking for a 'status', so it's not doing any work at all). That's fine except that after a short period of time I get an error: This request operation sent to n...